github-scikit-learn-issues-dataset / github_scikit-learn_issues.csv
BeNatural's picture
Add GitHub issues dataset CSV and Parquet files
9ae1a8b verified
Raw History Blame Contribute Delete
271 kB
issue_id,issue_number,repository,title,body,state,labels,created_at,closed_at,comments,author,html_url,text_length,time_to_close_hours
295764,1,scikit-learn/scikit-learn,remove Y from fit in OneClassSVM,,closed,,2010-08-31 07:38:16+00:00,2010-08-31 07:43:11+00:00,0,fabianp,https://github.com/scikit-learn/scikit-learn/issues/1,33,0.08194444444444444
311965,5,scikit-learn/scikit-learn,Bayesian regression,"Add priors on the mean instead of assuming that the prior means are zero.
Add more reference in the doc.
Modify ARD in order to use a vector of hyperparameters for the precision instead of a single value.
Spelling : defaut -> default unless you insist on using french, spelling out ARD (Automatic Relevance Determination) regression in the docstring as in the comment line would be useful.
Thanks to Josef for the remarks.",closed,,2010-09-11 11:40:28+00:00,2012-01-06 13:37:31+00:00,11,vmichel,https://github.com/scikit-learn/scikit-learn/issues/5,443,11569.950833333334
369933,7,scikit-learn/scikit-learn,Return index of support vectors in sparse SVM,Assigned to me,closed,"Enhancement, Moderate",2010-10-19 08:00:57+00:00,2013-02-02 16:08:16+00:00,2,fabianp,https://github.com/scikit-learn/scikit-learn/issues/7,60,20096.121944444443
378489,8,scikit-learn/scikit-learn,LARS module broken,"- the parameter names are different in docstring
- error below
/software/python/nipype0.3/lib/python2.6/site-packages/scikits.learn-0.6_git-py2.6-linux-x86_64.egg/scikits/learn/glm/base.pyc in predict(self, X)
40 """"""
41 X = np.asanyarray(X)
---> 42 return np.dot(X, self.coef_) + self.intercept_",closed,,2010-10-23 23:04:24+00:00,2010-11-25 11:09:11+00:00,5,satra,https://github.com/scikit-learn/scikit-learn/issues/8,349,780.0797222222222
382343,11,scikit-learn/scikit-learn,implement warm restarts for logistic regression,assigned to me,closed,New Feature,2010-10-26 07:28:50+00:00,2014-10-12 15:30:46+00:00,12,fabianp,https://github.com/scikit-learn/scikit-learn/issues/11,62,34736.032222222224
382357,12,scikit-learn/scikit-learn,improvements for the doc,"Rename Gallery -> Example Gallery
User guide should be more nested
h2, h3 should be padded to one side",closed,,2010-10-26 07:39:56+00:00,2012-01-05 19:10:28+00:00,3,fabianp,https://github.com/scikit-learn/scikit-learn/issues/12,127,10475.50888888889
382440,13,scikit-learn/scikit-learn,add slides to doc (or reference),"put somewhere the slides so that they can be reused
http://www.scribd.com/doc/36583672/Statistical-Learning-and-Text-Classification-with-NLTK-and-scikit-learn",closed,,2010-10-26 09:10:23+00:00,2012-05-10 07:54:45+00:00,2,fabianp,https://github.com/scikit-learn/scikit-learn/issues/13,191,13486.739444444445
421506,18,scikit-learn/scikit-learn,plot examples by default and capture stdout,in the sphinx docs,closed,,2010-11-16 08:27:29+00:00,2011-01-11 14:31:30+00:00,1,fabianp,https://github.com/scikit-learn/scikit-learn/issues/18,62,1350.0669444444445
434945,20,scikit-learn/scikit-learn,kfold cross validation assertion check,"https://github.com/scikit-learn/scikit-learn/blob/master/scikits/learn/cross_val.py#L177
shouldn't this allow k=n? isn't that the definition for leave one out?",closed,,2010-11-23 17:42:24+00:00,2011-01-24 17:39:38+00:00,2,satra,https://github.com/scikit-learn/scikit-learn/issues/20,200,1487.953888888889
438591,21,scikit-learn/scikit-learn,Sort decision function in svm module,"I think decision function should be sorted just as we do for predict proba, where we sort by class label as in `probas[:,np.argsort(self.label_)]`",closed,,2010-11-25 11:10:24+00:00,2010-12-16 09:02:46+00:00,1,fabianp,https://github.com/scikit-learn/scikit-learn/issues/21,183,501.8727777777778
471380,32,scikit-learn/scikit-learn,change lasso_path output,"should output an array of coefficients, as lars_path.",closed,Enhancement,2010-12-13 08:23:56+00:00,2013-07-26 07:20:02+00:00,2,fabianp,https://github.com/scikit-learn/scikit-learn/issues/32,78,22942.935
477595,35,scikit-learn/scikit-learn,scipy.linalg.qr econ=True compatibility,"keyword econ=True has been removed from scipy.linalg.qr, write a compatibility layer for this.",closed,,2010-12-16 09:08:45+00:00,2011-01-11 14:28:44+00:00,1,fabianp,https://github.com/scikit-learn/scikit-learn/issues/35,134,629.3330555555556
480529,36,scikit-learn/scikit-learn,add docs on how to build with custom lapack,,closed,"Documentation, Build / CI",2010-12-17 17:56:03+00:00,2016-10-11 01:39:11+00:00,7,fabianp,https://github.com/scikit-learn/scikit-learn/issues/36,44,50983.71888888889
517477,37,scikit-learn/scikit-learn,New Analyzer objects for text feature extraction,"Currently, we have three level of objects for text feature extraction:
- Preprocessor
- Analyzer
- Vectorizer
In this proposal, we would like to merge Preprocessor into Analyzer as well as introducing new methods. This should give more flexibility to the user for supporting different (natural) languages.
An analyzer should implement 4 methods:
- preprocess(str) => str
Preprocessing such as punctation removal, lower case conversion. Language dependent.
- tokenize(str) => list
Split a string into tokens (words or characters). Language dependent.
- postprocess(list) => list
From a list of tokens, output a list of n-grams. Language independent (unless further post-processing is needed).
- analyze(iter) => iter
Pass a collection of documents (str, file, io) through the whole chain preprocess => tokenize => postprocess. Since an iterator is returned, CountVectorizer should convert it to a list but HashingCountVectorizer won't have.
The class hierarchy could look like this:
- Analyzer (implements postprocess)
- RomanAnalyzer (implements preprocess)
- RomanWordAnalyzer (implements tokenize)
- RomanCharacterAnalyzer (implements tokenize)
Furthermore, we can have an EnglishWordAnalyzer to handle things like stop words removal and more elaborate processing for English syntax.
ChineseWordAnalyzer and JapaneseWordAnalyzer will likely require external dependencies (library, dictionary/probabilistic model). Thus they are out of the scope of the project but we may want to provide them in a gist.",closed,,2011-01-10 14:43:09+00:00,2012-03-25 16:44:19+00:00,4,mblondel,https://github.com/scikit-learn/scikit-learn/issues/37,1576,10562.019444444444
519679,38,scikit-learn/scikit-learn,output of example logistic_l1_l2_coef.py lacks explanation,what does output represent? what do different columns represent? etc.,closed,Documentation,2011-01-11 14:28:16+00:00,2012-09-20 20:58:18+00:00,2,fabianp,https://github.com/scikit-learn/scikit-learn/issues/38,128,14838.500555555556
520993,41,scikit-learn/scikit-learn,affinity propagation failed for identity matrix,"Affinity propagation do not handle identity matrix correctly:
In [81]: s = np.array([[1, 0], [0, 1]])
In [82]: affinity_propagation(s, verbose=True)
Did not converged
Out[82]:
(None, array([[ nan],
[ nan]]))
When type of s is float, ap converged. Thus the reason might be the numerical computation consistency.
BTW, it seems there are two ways to report bugs, sf and github. Do you have any preference?",closed,,2011-01-12 01:46:30+00:00,2011-01-20 15:34:33+00:00,15,fannix,https://github.com/scikit-learn/scikit-learn/issues/41,462,205.80083333333334
521912,44,scikit-learn/scikit-learn,"broken link in ""Bayesian Ridge Regression""",Reference link is broken,closed,,2011-01-12 12:55:42+00:00,2011-05-13 10:15:39+00:00,0,fabianp,https://github.com/scikit-learn/scikit-learn/issues/44,67,2901.3325
521922,45,scikit-learn/scikit-learn,"beta parameter not explained under ""Bayesian Ridge Regression""",beta parameter is extensively used but never explained,closed,,2011-01-12 13:05:01+00:00,2012-01-07 17:14:35+00:00,0,fabianp,https://github.com/scikit-learn/scikit-learn/issues/45,117,8644.159444444444
524031,46,scikit-learn/scikit-learn,bind cross_validation methods from libsvm and liblinear,bind function cross_validation (liblinear) and svm_cross_validation (libsvm),closed,,2011-01-13 08:26:09+00:00,2011-05-13 10:17:31+00:00,1,fabianp,https://github.com/scikit-learn/scikit-learn/issues/46,132,2881.856111111111
530769,50,scikit-learn/scikit-learn,implement Mallows Cp for LAR / Lasso,"see
http://en.wikipedia.org/wiki/Mallows'_Cp
it's a way to select the regularization parameter of the Lar / Lasso without using cross-validation.
R implements it",closed,New Feature,2011-01-17 00:27:42+00:00,2015-04-06 14:20:31+00:00,10,agramfort,https://github.com/scikit-learn/scikit-learn/issues/50,201,36973.880277777775
530774,51,scikit-learn/scikit-learn,implement Generalized Cross-Validation for Ridge regression,"see
http://en.wikipedia.org/wiki/Multivariate_adaptive_regression_splines#Generalized_cross_validation_.28GCV.29
or
http://www.stat.nus.edu.sg/~staxyc/DMchapter0c.pdf (sec. 4.2)",closed,New Feature,2011-01-17 00:31:01+00:00,2012-11-21 19:54:46+00:00,5,agramfort,https://github.com/scikit-learn/scikit-learn/issues/51,241,16195.395833333334
538496,56,scikit-learn/scikit-learn,Implement Multinomial Naive Bayes,"Multinomial Naive Bayes is a simple algorithm which scales well and has probabilistic output.
use_prior=True/False would be a nice option in the constructor.
In case loops are slow, use Cython.",closed,,2011-01-20 06:34:27+00:00,2011-05-26 12:44:44+00:00,0,mblondel,https://github.com/scikit-learn/scikit-learn/issues/56,229,3030.171388888889
538730,58,scikit-learn/scikit-learn,"User Guide Rease 0.6, Section 3.2","The following sentence
SVMs perform classification as a function of some subset of the training data, called the support vectors. These vectors can be accessed in member support_:
seems to be intended to obtain support vectors. So, the term ""<code>support_</code>"" should be ""<code>support_vectors_</code>""
The subsequent example is also supposed to be:
>>> clf.support_vectors_
array([[ 0., 0.],
[ 1., 1.]])",closed,,2011-01-20 10:03:46+00:00,2011-02-02 06:05:13+00:00,3,tkamishima,https://github.com/scikit-learn/scikit-learn/issues/58,472,308.02416666666664
539575,60,scikit-learn/scikit-learn,The wepage search also search old versions of the documentation,"When I do a search on the webpage, I seem to get answers from many different versions of the documentation (0.4, 0.5, 0.6)",closed,,2011-01-20 17:42:40+00:00,2011-02-17 11:00:34+00:00,1,GaelVaroquaux,https://github.com/scikit-learn/scikit-learn/issues/60,186,665.2983333333333
539583,61,scikit-learn/scikit-learn,The logistic regression has no narritive documentation,"The logistic regression should have an entry under 'Generalized Linear Models' and the intro of the GLM section should point to it to do regression.
Right now it is not clear from the documentation that the scikit even does logistic regression. It should appear in the table of content.",closed,,2011-01-20 17:46:56+00:00,2011-01-24 17:41:04+00:00,1,GaelVaroquaux,https://github.com/scikit-learn/scikit-learn/issues/61,343,95.90222222222222
547810,62,scikit-learn/scikit-learn,GridSearchCV doc lacks information,Needs to explain what criterion is used to select the optimal parameter.,closed,,2011-01-24 19:17:34+00:00,2011-01-24 19:39:27+00:00,1,fabianp,https://github.com/scikit-learn/scikit-learn/issues/62,107,0.3647222222222222
547988,63,scikit-learn/scikit-learn,Stability of LARS,"```
>>> clf = LassoLARS()
>>> clf.fit([[0, 0], [1, 1]], [0, 1], alpha=0.0).coef_
array([ NaN, NaN])
```",closed,,2011-01-24 20:24:22+00:00,2012-06-07 20:40:59+00:00,6,fabianp,https://github.com/scikit-learn/scikit-learn/issues/63,122,12000.276944444444
550199,64,scikit-learn/scikit-learn,Make class_weights a constructor parameter for all classifier models,Most classifier models have a parameter named class_weights for the fit method. It would be more user friendly to also have it as a constructor parameter to be able to do grid search on it and potentially to have class_weights='auto' enabled by default.,closed,,2011-01-25 18:17:51+00:00,2012-03-31 22:56:43+00:00,12,ogrisel,https://github.com/scikit-learn/scikit-learn/issues/64,322,10348.647777777778
552222,65,scikit-learn/scikit-learn,RandomizedPCA does not have rst doc,,closed,,2011-01-26 14:14:57+00:00,2011-01-27 08:08:08+00:00,3,fabianp,https://github.com/scikit-learn/scikit-learn/issues/65,36,17.886388888888888
555496,66,scikit-learn/scikit-learn,Add test for multiple drops on LAR,See comments on commit 269ab1af31d362a7bb2955936646c7478602a68b,closed,"Enhancement, module:test-suite",2011-01-27 08:00:56+00:00,2021-04-20 16:16:47+00:00,6,fabianp,https://github.com/scikit-learn/scikit-learn/issues/66,98,89672.26416666666
569928,73,scikit-learn/scikit-learn,decision_function for sparse SVC (was: make sparse.svm first-class citizens),"Some functions lack in sparse svm's : probability predict, decision function",closed,"Enhancement, Moderate",2011-02-02 15:17:15+00:00,2015-03-26 17:52:47+00:00,6,fabianp,https://github.com/scikit-learn/scikit-learn/issues/73,153,36314.59222222222
580021,75,scikit-learn/scikit-learn,Pass cv as a class parameter to all *CV models,See comments in https://github.com/scikit-learn/scikit-learn/commit/19273894194bb11ccbd41c2aa6193112d939e88e,closed,,2011-02-07 10:35:21+00:00,2011-12-18 12:30:30+00:00,2,ogrisel,https://github.com/scikit-learn/scikit-learn/issues/75,155,7537.919166666667
584357,76,scikit-learn/scikit-learn,Missing documentation for the Recursive Feature Elimination module.,title says it all.,closed,,2011-02-08 22:10:28+00:00,2011-10-20 12:49:17+00:00,1,ogrisel,https://github.com/scikit-learn/scikit-learn/issues/76,86,6086.646944444445
591443,77,scikit-learn/scikit-learn,KMeans classifier lacks predict method,,closed,,2011-02-11 09:22:11+00:00,2011-12-09 14:25:26+00:00,16,fabianp,https://github.com/scikit-learn/scikit-learn/issues/77,39,7229.054166666667
593898,78,scikit-learn/scikit-learn,Use python logging to report on convergence progress it level info for long running tasks,"This is a proposal to use python's logging module instead of using stdout and verbose flags in the models API.
Using the logging module would make it easier for the user to control the verbosity of the scikit using a single and well documented configuration interface and logging API.
http://docs.python.org/library/logging.html",open,New Feature,2011-02-12 13:27:33+00:00,,32,ogrisel,https://github.com/scikit-learn/scikit-learn/issues/78,420,
595158,79,scikit-learn/scikit-learn,common file format support,"It would be nice to have loaders for common file formats such as libsvm's or weka's.
The loaders should have two modes: batch and online. In the latter case, we could have an iterator that spits X matrices of a given chunk size (suitable for partial_fit)",closed,New Feature,2011-02-13 09:24:08+00:00,2014-05-10 14:41:40+00:00,9,mblondel,https://github.com/scikit-learn/scikit-learn/issues/79,284,28373.292222222222
595164,80,scikit-learn/scikit-learn,command line interface,"Not high priority but would be nice to have a command line interface. Some possible features:
- Input in various formats (libsvm/svmlight's sparse format, arff, raw
documents, ...)
- Pipeline (transformers and estimator)
- Model selection
- Evaluation on a test set
- (Plots?)
- Model persistence (pickle)
Examples:
$ skl fit --format svmlight --model model.pickle preprocessing.Scaling
pca.PCA svm.LinearSVC --input training_data.txt
$ skl predict --format svmlight --model model.pp --input
test_data.txt --output predictions.txt
when --input is not provided, the input is read from stdin.",closed,New Feature,2011-02-13 09:30:12+00:00,2013-03-10 18:00:58+00:00,10,mblondel,https://github.com/scikit-learn/scikit-learn/issues/80,620,18152.512777777778
595344,81,scikit-learn/scikit-learn,copy parameter in all transform methods,"For consistency and to be able to write an efficient pipeline, all transform methods should honor a copy=True|False parameter.
I'm not on my working environment so I cannot check right now but we should make a list of the methods that need to be fixed in this ticket.",closed,,2011-02-13 12:49:38+00:00,2011-03-31 07:55:17+00:00,4,mblondel,https://github.com/scikit-learn/scikit-learn/issues/81,308,1099.0941666666668
605922,82,scikit-learn/scikit-learn,Bug in k-means centering,"Here is a report I received by anonymous private mail:
https://github.com/scikit-learn/scikit-learn/blob/master/scikits/learn/cluster/k_means_.py
Line 176:
```
175 elif hasattr(init, '__array__'):
176 centers = np.asanyarray(init).copy()
177 elif callable(init):
```
You take predefined centers as an optional initialization method. You
copy them directly into the kmeans, but you don't account for the fact
that the X data has already been centered on line 167:
```
167 X -= Xmean
```
Also, when you return the centers, you make sure to add xmean back:
```
208 return best_centers + Xmean, best_labels, best_inertia
```
This seems like a bug, but I could be wrong in some very subtle way.
The obvious fix for this would be to replace line 176 with this:
centers = np.asanyarray(init).copy() - Xmean",closed,,2011-02-17 07:48:49+00:00,2011-06-06 16:02:39+00:00,9,ogrisel,https://github.com/scikit-learn/scikit-learn/issues/82,868,2624.2305555555554
608818,83,scikit-learn/scikit-learn,Macro/micro average precision/recall/f1-score,"When n_classes > 2, the precision / recall / f1-score need to be averaged in some way.
Currently the code in precision_recall_fscore_support does:
<pre>
precision = true_pos / (true_pos + false_pos)
recall = true_pos / (true_pos + false_neg)
</pre>
Since true_pos, false_pos and false_neg are arrays of size n_classes, precision and recall are also arrays of the same size. Then to obtain a single average, the weighted sum is taken.
In the literature, the macro-average and micro-average are usually used but as far as I understand the current code does neither one. The macro is the _unweighted average_ of the precision/recall taken separately for each class. Therefore it is an average over classes. The micro average on the contrary is an average over instances: therefore classes which have many instances are given more importance. However, AFAIK it's not the same as taking the weighted average as currently done in the code.
I think the code should be:
<pre>
micro_avg_precision = true_pos.sum() / (true_pos.sum() + false_pos.sum())
micro_avg_recall = true_pos.sum() / (true_pos.sum() + false_neg.sum())
</pre>
<pre>
macro_avg_precision = np.mean(true_pos / (true_pos + false_pos))
macro_avg_recall = np.mean(true_pos / (true_pos + false_neg))
</pre>
It's easy to fix (add a micro=True|False option) but the tests may be a pain to update :-/",closed,,2011-02-18 09:54:06+00:00,2012-01-28 23:43:09+00:00,3,mblondel,https://github.com/scikit-learn/scikit-learn/issues/83,1407,8269.8175
616920,87,scikit-learn/scikit-learn,kernel object interface,"For precomputed kernels, a square matrix is not an efficient way to store the kernel matrix (since the kernel matrix is symmetric).
We should create a kernel object interface instead. Advantages:
- The object can store the LRU cache
- This gives a way for the user to handle kernel re-computations
- Internally the gram matrix can be stored in packed format
- This will be useful when we create our own kernel-based estimators (some like Ridge already support kernels, they just lack the interface)
- This handle nicely the kernel computations between test instances and training instances
The object could be numpy-compatible:
<pre>
kernel = GaussianKernel(X_train, sigma=0.5)
print kernel[i, j] # recompute only if not cached
print kernel.compute(X_test)
</pre>
Question: shall we create our own LRU object or shall we just bind libsvm's?
Since there's plan to bind libsvm's cross-validation code, this also means that the cache will be used more efficiently for cross-validation even when kernel=""precomputed"".
(Sorry for opening many tickets lately: I acually intend to help close them when I get more time ;-)",closed,,2011-02-22 06:28:02+00:00,2012-01-17 14:52:19+00:00,10,mblondel,https://github.com/scikit-learn/scikit-learn/issues/87,1145,7904.4047222222225
617054,88,scikit-learn/scikit-learn,Use distances provided by BallTree,"BallTree provides other distances apart from euclidean, l1 & manhattan. Use it!",closed,,2011-02-22 08:05:52+00:00,2011-09-01 18:31:30+00:00,1,fabianp,https://github.com/scikit-learn/scikit-learn/issues/88,114,4594.427222222223
624718,91,scikit-learn/scikit-learn,Sign of coefficients in libsvm,See comments on 16dc776cc83e57d9f3f564186a1bc4845dc0aa49.,closed,,2011-02-24 18:54:34+00:00,2012-01-28 23:37:38+00:00,1,fabianp,https://github.com/scikit-learn/scikit-learn/issues/91,88,8116.717777777778
637725,95,scikit-learn/scikit-learn,Covariance on non-centered data,"in covariance.py it assumes that the data is centered.
There should be an option to enable centering.",closed,,2011-03-01 15:40:44+00:00,2011-12-08 13:26:11+00:00,1,agramfort,https://github.com/scikit-learn/scikit-learn/issues/95,134,6765.7575
640366,96,scikit-learn/scikit-learn,lfw not working on scipy 0.8.0,"In my windows box I get:
```
arn\datasets\lfw.py"", line 32, in <module>
from scipy.misc import imread
ImportError: cannot import name imread
```",closed,,2011-03-02 13:47:46+00:00,2011-04-25 09:53:06+00:00,8,fabianp,https://github.com/scikit-learn/scikit-learn/issues/96,181,1292.088888888889
643995,98,scikit-learn/scikit-learn,k-means++ initialization wrong,"The k-means center initialization in https://github.com/scikit-learn/scikit-learn/blob/master/scikits/learn/cluster/k_means_.py, function k_init(), is not k-means++. The paper authors' implementation (http://www.stanford.edu/~darthur/kMeansppTest.zip, Utils.cpp, chooseSmartCenters()) does the following:
- One center is chosen randomly.
- Now repeat numCenters-1 times:
- Repeat numLocalTries times:
- Add a point x with probability proportional to the distance squared from x to the closest existing center
- Add the point chosen above that results in the smallest potential.
scikit-learn's implementation (taken from pybrain, which in turn took it from Yong Sun's blog at http://blogs.sun.com/yongsun/entry/k_means_and_k_means) does this instead:
- One center is chosen randomly.
- Now repeat numCenters-1 times:
- Repeat numSamples times:
- Add a point x that has not been tried yet
- Add the point chosen above that results in the smallest potential.
The authors' implementation samples numLocalTries points with D^2 weighting and chooses the best among those (repeated for each of the k-1 centers to find). For all the results in their paper, the authors used numLocalTries==1. (Only in their ""Conclusion and future work"" section they state that ""experiments showed that k-means++ generally performed better if it selected several new centers during each iteration, and then greedily chose the one that decreased \phi as much as possible"", and in their code you can see they tried numLocalTries==2+log(k).)
scikit-learn completely omits the sampling step (authors' Utils.cpp, lines 299-305) and instead greedily chooses the center that minimizes the potential. While this is not necessarily bad, it is not k-means++.
The easy way to fix this would be changing the documentation to not refer to k-means++ any longer (and find out how this greedy scheme is called in the literature; I assume somebody described it already), the better way would be fixing the implementation. I will do the latter (unless I decide I don't need it) and post back here; until then just take this as a warning.",closed,,2011-03-03 17:18:04+00:00,2011-05-24 20:43:35+00:00,3,f0k,https://github.com/scikit-learn/scikit-learn/issues/98,2144,1971.4252777777779
650391,100,scikit-learn/scikit-learn,Crasher in SVR with probility=True,"The following code creates a segfault:
<pre>
from scikits.learn import svm, datasets
diabetes = datasets.load_diabetes()
X = diabetes.data
y = diabetes.target
svr = svm.SVR(probability=True)
svr.fit(X, y)
</pre>
Without any surprise, inspecting the gdb traceback tells us that the segfault is in the call to libsvm_train on line 145 in svm/base.py. The first lines of the gdb backtrace are:
<pre>
Program received signal SIGSEGV, Segmentation fault.
__memcpy_ssse3 () at ../sysdeps/i386/i686/multiarch/memcpy-ssse3.S:1360
1360 ../sysdeps/i386/i686/multiarch/memcpy-ssse3.S: No such file or directory.
in ../sysdeps/i386/i686/multiarch/memcpy-ssse3.S
(gdb) bt
#0 __memcpy_ssse3 () at ../sysdeps/i386/i686/multiarch/memcpy-ssse3.S:1360
#1 0x015ff843 in copy_probB (data=0x8a594b0 ""h\344G"", model=0x89e0f68, dims=0x89d1268)
at /usr/include/bits/string3.h:52
#2 0x016147ac in __pyx_pf_7_libsvm_libsvm_train (__pyx_self=0x0, __pyx_args=
(<numpy.ndarray at remote 0x89e77c0>, <numpy.ndarray at remote 0x8954760>, 3, 2, 3, <float at remote 0x897196c>, <float at remote 0x867a3bc>, <float at remote 0x867a39c>, <float at remote 0x867a38c>, <float at remote 0x867a37c>, <float at remote 0x867a3ac>, <float at remote 0x867a36c>, <numpy.ndarray at remote 0x8a3f490>, <numpy.ndarray at remote 0x8a3f440>, <numpy.ndarray at remote 0x8a5aed8>, 1, 1), __pyx_kwds=0x0)
at scikits/learn/svm/src/libsvm/_libsvm.c:2111
#3 0x080ddd23 in call_function (f=
Frame 0x8a43d9c, for file /home/varoquau/dev/scikit-learn/scikits/learn/svm/base.py, line 150, in fit (self=<SVR(shape_fit_=(442, 10), kernel='rbf', C=<float at remote 0x867a38c>, probability=True, degree=3, shrinking=True, class_weight_label=<numpy.ndarray at remote 0x8a3f490>, p=<float at remote 0x867a36c>, impl='epsilon_svr', tol=<float at remote 0x867a39c>, cache_size=<float at remote 0x867a3ac>, coef0=<float at remote 0x867a3bc>, nu=<float at remote 0x867a37c>, gamma=<float at remote 0x897196c>, class_weight=<numpy.ndarray at remote 0x8a3f440>) at remote 0x8a0498c>, X=<numpy.ndarray at remote 0x89e77c0>, y=<numpy.ndarray at remote 0x8954760>, class_weight={}, sample_weight=<numpy.ndarray at remote 0x8a5aed8>, params={}, kernel_type=2, _X=<numpy.ndarray at remote 0x89e77c0>, solver_type=3), throwflag=0)
at ../Python/ceval.c:3750
</pre>",closed,,2011-03-06 12:30:30+00:00,2012-04-20 21:35:31+00:00,15,GaelVaroquaux,https://github.com/scikit-learn/scikit-learn/issues/100,2357,9873.083611111111
657096,101,scikit-learn/scikit-learn,prebuilt docs tarball?,"Given that building various images in the user guide requires one to download various large datasets, would it be possible to distribute a tarball containing a prebuilt copy of the docs (e.g., in html)? This would be helpful for scikit learn package maintainers for various distributions because it would obviate the need to include large datasets in the source packages in order to build the docs properly.",closed,,2011-03-08 21:04:05+00:00,2011-03-26 17:18:25+00:00,4,lebedov,https://github.com/scikit-learn/scikit-learn/issues/101,430,428.2388888888889
666168,104,scikit-learn/scikit-learn,Problem with Sparse implementation of SVM,"I am using the scikits.learn on very large sparse data. I have problems when using the sparse SVM with the 'poly' kernel. I attach a simple test case based on the iris example from the scikits.learn website. In this example I use 'linear' and 'poly' kernels both using the dense and sparse implementations. As the graphs show the 'linear' kernel gives similar results (sparse vs dense) but the sparse implementation of 'poly' gives wrong results.
I am using scikits.learn version 0.7.1, and I have tested it both on window 32bit and window 64bit implementations. I am using scipy version 0.8 on the win32 platform and scipy 0.9rc3 on the win64 platform.
```
""""""
==================================================
Plot different SVM classifiers in the iris dataset
==================================================
Comparison of different linear SVM classifiers on the iris dataset. It
will plot the decision surface for four different SVM classifiers.
""""""
print __doc__
import numpy as np
import pylab as pl
from scikits.learn import svm, datasets
import scipy as sp
# import some data to play with
iris = datasets.load_iris()
X = iris.data[:, :2] # we only take the first two features. We could
# avoid this ugly slicing by using a two-dim dataset
Xs = sp.sparse.lil_matrix( X ).tocsr()
Y = iris.target
h=.02 # step size in the mesh
# we create an instance of SVM and fit out data. We do not scale our
# data since we want to plot the support vectors
svc = svm.SVC(kernel='linear').fit(X, Y)
rbf_svc = svm.SVC(kernel='poly').fit(X, Y)
ssvc = svm.sparse.SVC(kernel='linear').fit(Xs, Y)
srbf_svc = svm.sparse.SVC(kernel='poly').fit(Xs, Y)
# create a mesh to plot in
x_min, x_max = X[:,0].min()-1, X[:,0].max()+1
y_min, y_max = X[:,1].min()-1, X[:,1].max()+1
xx, yy = np.meshgrid(np.arange(x_min, x_max, h),
np.arange(y_min, y_max, h))
# title for the plots
titles = ['SVC with linear kernel',
'SVC with polynomial (degree 3) kernel',
'Sparse SVC with linear kernel',
'Sparse SVC with polynomial (degree 3) kernel']
pl.set_cmap(pl.cm.Paired)
for i, clf in enumerate((svc, rbf_svc, ssvc, srbf_svc)):
# Plot the decision boundary. For that, we will asign a color to each
# point in the mesh [x_min, m_max]x[y_min, y_max].
pl.subplot(2, 2, i+1)
Xp = np.c_[xx.ravel(), yy.ravel()]
if i > 1:
Xp = sp.sparse.lil_matrix( Xp ).tocsr()
Z = clf.predict( Xp )
# Put the result into a color plot
Z = Z.reshape(xx.shape)
pl.set_cmap(pl.cm.Paired)
pl.contourf(xx, yy, Z)
pl.axis('tight')
# Plot also the training points
pl.scatter(X[:,0], X[:,1], c=Y)
pl.title(titles[i])
pl.axis('tight')
pl.show()
```",closed,,2011-03-11 19:24:14+00:00,2011-04-11 07:27:34+00:00,1,amitibo,https://github.com/scikit-learn/scikit-learn/issues/104,2797,732.0555555555555
717390,108,scikit-learn/scikit-learn,improvements in naive_bayes,"- across the whole module estimated parameters do not end with underscore
- non-standard names are used for some variables, like unique_y (called classes in SGD and labels in SVM), we should think about unifying these.",closed,,2011-03-30 10:57:02+00:00,2012-07-22 19:07:31+00:00,4,fabianp,https://github.com/scikit-learn/scikit-learn/issues/108,249,11528.174722222222
723675,110,scikit-learn/scikit-learn,libsvm's parameter p is not documented,,closed,,2011-04-01 08:47:35+00:00,2011-07-22 10:22:16+00:00,1,fabianp,https://github.com/scikit-learn/scikit-learn/issues/110,39,2689.5780555555557
723844,111,scikit-learn/scikit-learn,implement Logging module (was: Remaining issues in grid search),"- use logger instead of print
- factorize common parts with libsvm's cross val",closed,New Feature,2011-04-01 10:21:33+00:00,2014-05-10 14:44:57+00:00,8,fabianp,https://github.com/scikit-learn/scikit-learn/issues/111,142,27244.39
724163,115,scikit-learn/scikit-learn,ERROR: on test scikits.learn.pls.CCA,"```
ERROR: Doctest: scikits.learn.pls.CCA
----------------------------------------------------------------------
Traceback (most recent call last):
File ""/usr/lib/python2.7/site-packages/nose/plugins/doctests.py"", line 395, in tearDown
delattr(__builtin__, self._result_var)
AttributeError: _
======================================================================
FAIL: scikits.learn.cluster.tests.test_spectral.test_spectral_clustering
----------------------------------------------------------------------
Traceback (most recent call last):
File ""/usr/lib/python2.7/site-packages/nose/case.py"", line 187, in runTest
self.test(*self.arg)
File ""/home/luis/a/lib/python2.7/site-packages/scikits.learn-0.8_git-py2.7-linux-x86_64.egg/scikits/learn/cluster/tests/test_spectral.py"", line 29, in test_spectral_clustering
assert_equal(labels, [1, 1, 1, 0, 0, 0, 0])
File ""/usr/lib/python2.7/site-packages/numpy/testing/utils.py"", line 256, in assert_equal
return assert_array_equal(actual, desired, err_msg, verbose)
File ""/usr/lib/python2.7/site-packages/numpy/testing/utils.py"", line 686, in assert_array_equal
verbose=verbose, header='Arrays are not equal')
File ""/usr/lib/python2.7/site-packages/numpy/testing/utils.py"", line 618, in assert_array_compare
raise AssertionError(msg)
AssertionError:
Arrays are not equal
(mismatch 14.2857142857%)
x: array([1, 1, 1, 1, 0, 0, 0])
y: array([1, 1, 1, 0, 0, 0, 0])
======================================================================
FAIL: Check that if a function has a side effect in its arguments, it
----------------------------------------------------------------------
Traceback (most recent call last):
File ""/usr/lib/python2.7/site-packages/nose/case.py"", line 187, in runTest
self.test(*self.arg)
File ""/home/luis/a/lib/python2.7/site-packages/scikits.learn-0.8_git-py2.7-linux-x86_64.egg/scikits/learn/externals/joblib/test/test_memory.py"", line 291, in test_argument_change
assert func() == 0
AssertionError
======================================================================
FAIL: Doctest: scikits.learn.pls.CCA
----------------------------------------------------------------------
Traceback (most recent call last):
File ""/usr/lib/python2.7/doctest.py"", line 2166, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for scikits.learn.pls.CCA
File ""/home/luis/a/lib/python2.7/site-packages/scikits.learn-0.8_git-py2.7-linux-x86_64.egg/scikits/learn/pls.py"", line 598, in CCA
----------------------------------------------------------------------
File ""/home/luis/a/lib/python2.7/site-packages/scikits.learn-0.8_git-py2.7-linux-x86_64.egg/scikits/learn/pls.py"", line 674, in scikits.learn.pls.CCA
Failed example:
cca.fit(X, Y, n_components=2)
Exception raised:
Traceback (most recent call last):
File ""/usr/lib/python2.7/doctest.py"", line 1254, in __run
compileflags, 1) in test.globs
File ""<doctest scikits.learn.pls.CCA[4]>"", line 1, in <module>
cca.fit(X, Y, n_components=2)
File ""/home/luis/a/lib/python2.7/site-packages/scikits.learn-0.8_git-py2.7-linux-x86_64.egg/scikits/learn/pls.py"", line 298, in fit
linalg.inv(np.dot(self.x_loadings_.T, self.x_weights_)))
File ""/usr/lib/python2.7/site-packages/scipy/linalg/basic.py"", line 228, in inv
a1 = asarray_chkfinite(a)
File ""/usr/lib/python2.7/site-packages/numpy/lib/function_base.py"", line 547, in asarray_chkfinite
""array must not contain infs or NaNs"")
ValueError: array must not contain infs or NaNs
----------------------------------------------------------------------
File ""/home/luis/a/lib/python2.7/site-packages/scikits.learn-0.8_git-py2.7-linux-x86_64.egg/scikits/learn/pls.py"", line 677, in scikits.learn.pls.CCA
Failed example:
X_c, Y_c = cca.transform(X, Y)
Exception raised:
Traceback (most recent call last):
File ""/usr/lib/python2.7/doctest.py"", line 1254, in __run
compileflags, 1) in test.globs
File ""<doctest scikits.learn.pls.CCA[5]>"", line 1, in <module>
X_c, Y_c = cca.transform(X, Y)
File ""/home/luis/a/lib/python2.7/site-packages/scikits.learn-0.8_git-py2.7-linux-x86_64.egg/scikits/learn/pls.py"", line 350, in transform
x_scores = np.dot(Xc, self.x_rotations_)
AttributeError: 'CCA' object has no attribute 'x_rotations_'
----------------------------------------------------------------------
Ran 655 tests in 30.347s
FAILED (SKIP=2, errors=1, failures=3)
<nose.result.TextTestResult run=655 errors=1 failures=3>
```",closed,,2011-04-01 13:08:12+00:00,2012-01-04 20:27:57+00:00,2,LuisBL,https://github.com/scikit-learn/scikit-learn/issues/115,4655,6679.329166666666
729829,126,scikit-learn/scikit-learn,lda fails on the 20newsgroup dataset,I wanted to test LDA's transform method on the 20newsgroup dataset but fit fails on it.,closed,,2011-04-04 06:14:38+00:00,2011-06-03 09:05:54+00:00,7,mblondel,https://github.com/scikit-learn/scikit-learn/issues/126,124,1442.8544444444444
821549,139,scikit-learn/scikit-learn,Metrics should warn if y_true values are out of range,"scikits/learn/metrics/metrics.py should warn if y_true values are out of range.
e.g. for P, R, and F, y_true should be either 0 or 1.
If there are values that are not 0 or 1, a warning should be issued to the user.
I am not sure the correct ""warning"" module that scikits.learn uses.",closed,,2011-04-27 20:54:47+00:00,2011-08-24 16:01:42+00:00,3,turian,https://github.com/scikit-learn/scikit-learn/issues/139,337,2851.115277777778
837171,142,scikit-learn/scikit-learn,Error Importing Kmeans,"I ran `sudo python setup.py install` successfully on Ubuntu 10.04.
However, attempting to import KMeans throws the exception:
> > > from scikits.learn.cluster import MiniBatchKMeans, Kmeans
> > > Traceback (most recent call last):
> > > File ""<stdin>"", line 1, in <module>
> > > File ""scikits/learn/cluster/**init**.py"", line 7, in <module>
> > > from .hierarchical import ward_tree, Ward, WardAgglomeration
> > > File ""scikits/learn/cluster/hierarchical.py"", line 21, in <module>
> > > from . import _inertia
> > > ImportError: cannot import name _inertia",closed,,2011-05-02 00:28:05+00:00,2011-05-15 22:09:13+00:00,5,chrisspen,https://github.com/scikit-learn/scikit-learn/issues/142,595,333.68555555555554
842544,145,scikit-learn/scikit-learn,Cython wrapper for crfsuite,"http://www.chokkan.org/software/crfsuite/
crfsuite probably the fastest linear chain CRF implementation,
written in pure C with the ""Right License"" and features sgd optimizer and optional sparse priors.
This is probably a major task to do a correct wrapping. In addition it will require a quite a bit of wise thinking to come up with a simple yet expressive pythonic API to be able to deal with structured output in a efficient and numpy friendly manner.",closed,New Feature,2011-05-03 10:12:55+00:00,2013-03-10 17:50:55+00:00,31,ogrisel,https://github.com/scikit-learn/scikit-learn/issues/145,485,16255.633333333333
843161,146,scikit-learn/scikit-learn,segmentation fault in ball_tree,"In [1]: from scikits.learn import neighbors
In [2]: neighbors.BallTree()
...:
Segmentation fault",closed,,2011-05-03 12:37:13+00:00,2011-05-04 10:11:10+00:00,2,fabianp,https://github.com/scikit-learn/scikit-learn/issues/146,134,21.565833333333334
852379,156,scikit-learn/scikit-learn,Failure with python2.5 in test_spectral_clustering,"This is a strange bug. If I run `nosetests scikits/learn/cluster/tests/` I get
```
======================================================================
ERROR: scikits.learn.cluster.tests.test_spectral.test_spectral_clustering
----------------------------------------------------------------------
Traceback (most recent call last):
File ""/home/fabian/envs/np11p25/lib/python2.5/site-packages/nose-0.10.0-py2.5.egg/nose/case.py"", line 202, in runTest
File ""/home/fabian/dev/scikit-learn/scikits/learn/cluster/tests/test_spectral.py"", line 31, in test_spectral_clustering
model_copy = loads(dumps(model))
ValueError: could not convert string to float
```
however it seems fine when run from `nosetests scikits/learn/cluster/tests/test_spectral.py`",closed,,2011-05-05 07:55:21+00:00,2011-05-05 12:28:00+00:00,5,fabianp,https://github.com/scikit-learn/scikit-learn/issues/156,809,4.5441666666666665
853463,158,scikit-learn/scikit-learn,Score functions for AUC metrics,"Score functions for computing the area under the ROC curve `roc_auc_score` and the area under the Precision-Recall curve `average_precision_score`. Both should make use of existing functions such as `metrics.auc`, `metrics.roc_curve`, and `metrics.precision_recall_curve`.",closed,,2011-05-05 14:01:16+00:00,2012-08-19 13:50:06+00:00,7,pprett,https://github.com/scikit-learn/scikit-learn/issues/158,304,11327.81388888889
858750,159,scikit-learn/scikit-learn,Changed main repo tagline,"I've been so bold as to change the tagline of this repo to ""scikit-learn: machine learning in Python"" instead of ""scikit-learn main repo"". The reason is that, when a user clones the repo, the tagline is copied along so we get lots of repos labeled ""main repo"" scattered across Github. I figured this might be confusing for casual users who are not familiar with Git(Hub).
I've also updated my own repo's tagline, please update yours.",closed,,2011-05-06 14:46:41+00:00,2011-05-13 10:09:55+00:00,2,larsmans,https://github.com/scikit-learn/scikit-learn/issues/159,460,163.38722222222222
888166,165,scikit-learn/scikit-learn,Compiling issues in MSVC9,0.8 seems to fail with Windows XP SP3 32b with MSVC9,closed,,2011-05-12 07:37:05+00:00,2011-05-12 08:04:40+00:00,1,fabianp,https://github.com/scikit-learn/scikit-learn/issues/165,79,0.4597222222222222
891496,166,scikit-learn/scikit-learn,KernelPCA does not support n_components,"It turns out that KernelPCA effectively ignores its n_components parameter.
Test case committed to:
https://github.com/bsilverthorn/scikit-learn/tree/fix-kernelpca-ncomponents",closed,,2011-05-12 20:32:22+00:00,2011-05-13 06:48:09+00:00,0,bsilverthorn,https://github.com/scikit-learn/scikit-learn/issues/166,217,10.263055555555555
902858,169,scikit-learn/scikit-learn,ValueError on Sparse SVC while calling the function predict_proba,"`predict_proba` is not implemented in the sparse variant of SVC and inherits the dense implementation which is not suited for sparse datasets.
Here's the stack trace of the error :
```
Traceback (most recent call last):
File ""/Volumes/Data/workspaces/UMWA2011/WSDM2011/code/iiitd/precog/youtube/umwa2011/literature-classifier.py"", line 866, in <module>
Y_pred = clf.predict_proba(X[test])
File ""/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/scikits/learn/svm/base.py"", line 209, in predict_proba
X = np.atleast_2d(np.asanyarray(X, dtype=np.float64, order='C'))
File ""/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/numpy/core/numeric.py"", line 336, in asanyarray
return array(a, dtype, copy=False, order=order, subok=True)
ValueError: setting an array element with a sequence.
```
Check here for the discussion on the mailing list : http://sourceforge.net/mailarchive/forum.php?thread_name=BANLkTimGuDt6M_RMU6mFunEJR_nxKnHkWQ%40mail.gmail.com&forum_name=scikit-learn-general",closed,,2011-05-15 17:01:39+00:00,2011-05-16 12:51:45+00:00,1,denzilc,https://github.com/scikit-learn/scikit-learn/issues/169,1123,19.835
906526,170,scikit-learn/scikit-learn,svm.NuSVC.fit segfaults (double free or corruption),"As stated in the title, svm.NuSVC training can crash the process, when being fed with a certain dataset. To reproduce the error, download:
http://home.agh.edu.pl/~wici/pub/gh.tar.gz
Running the script gives me a message:
``` bash
python debug.py
*** glibc detected *** python: double free or corruption (!prev): 0x0000000001231800 ***
```
The dataset shape is (4868, 50).
I use 64-bit linux (Ubuntu natty). The issue manifests with both 0.8 release and with upstream trunk.",closed,,2011-05-16 13:47:33+00:00,2011-05-26 08:42:55+00:00,4,janislaw,https://github.com/scikit-learn/scikit-learn/issues/170,531,234.92277777777778
906591,171,scikit-learn/scikit-learn,strange score in grid_search,"from the GridSearchCV docstring:
```
In [1]: from scikits.learn import svm, grid_search, datasets
...: iris = datasets.load_iris()
...: parameters = {'kernel':('linear', 'rbf'), 'C':[1, 10]}
...: svr = svm.SVR()
...: clf = grid_search.GridSearchCV(svr, parameters)
...: clf.fit(iris.data, iris.target)
...:
Out[1]:
...
```
now printing the individual scores says all scores are infinity. I'm not sure it's a bug, but if sure feels strange
```
In [2]: clf.grid_scores_
Out[2]:
[({'C': 1, 'kernel': 'linear'}, -inf),
({'C': 1, 'kernel': 'rbf'}, -inf),
({'C': 10, 'kernel': 'linear'}, -inf),
({'C': 10, 'kernel': 'rbf'}, -inf)]
```",closed,,2011-05-16 14:04:53+00:00,2012-01-04 20:35:17+00:00,2,fabianp,https://github.com/scikit-learn/scikit-learn/issues/171,715,5598.506666666667
908218,172,scikit-learn/scikit-learn,default tolerance for liblinear/libsvm wrappers,"liblinear and libsvm default tolerance parameters are fine tuned for standardized data
by upstream authors and give a good compromise between accuracy and
convergence speed.
mblondel suggests having an objective
function dependent default values for tol.
We could set tol to None and use a dictionary to set the default value.",closed,Enhancement,2011-05-16 17:15:51+00:00,2016-10-24 15:59:42+00:00,4,paolo-losi,https://github.com/scikit-learn/scikit-learn/issues/172,375,47710.730833333335
914587,173,scikit-learn/scikit-learn,Vectorizer and CountVectorizer should have an inverse_transform,"It can be useful for model understanding and debugging to map from feature IDs to original terms.
So, Vectorizer and CountVectorizer should have an inverse_transform.",closed,,2011-05-17 05:36:40+00:00,2011-07-08 12:44:36+00:00,1,turian,https://github.com/scikit-learn/scikit-learn/issues/173,230,1255.1322222222223
914744,174,scikit-learn/scikit-learn,nndsvdar is default in NMF,"https://github.com/scikit-learn/scikit-learn/blob/master/scikits/learn/decomposition/nmf.py
The doc for NMF says that nndsvd is the default.
However, 'nndsvdar' is used as the default in the class init.",closed,,2011-05-17 06:32:38+00:00,2011-05-17 08:47:26+00:00,1,turian,https://github.com/scikit-learn/scikit-learn/issues/174,230,2.2466666666666666
916178,175,scikit-learn/scikit-learn,Better error message while using Grid Search,"The error message while using grid_search due to mis match of shape should be better. This is just a cosmetic change. Here's the stack trace.
Traceback (most recent call last):
File ""/Volumes/Data/workspaces/UMWA2011/WSDM2011/code/iiitd/precog/youtube/umwa2011/literature-classifier.py"", line 909, in <module>
grid_search.fit(X[train], Y[train])
File ""/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/scipy/sparse/csr.py"", line 237, in **getitem**
check_bounds(col, self.shape[1])
File ""/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/scipy/sparse/csr.py"", line 174, in check_bounds
raise IndexError('index (%d) out of range' % max_indx)
IndexError: index (336) out of range",closed,,2011-05-17 12:42:11+00:00,2011-05-18 05:50:13+00:00,2,denzilc,https://github.com/scikit-learn/scikit-learn/issues/175,799,17.13388888888889
927269,177,scikit-learn/scikit-learn,Different values on C on grid searches for sparse Linear SVC,"The C value varies on the n_jobs parameter passed to the grid search.
```
X = sparse_feats
Y = target_labels
C_start, C_end, C_step = -3, 15, 2
train, test = iter(StratifiedKFold(Y, 2, indices = True)).next()
# Generate grid search values for C, gamma
C_val = 2. ** np.arange(C_start, C_end + C_step, C_step)
grid_clf = svm.sparse.LinearSVC()
print grid_clf
linear_SVC_params = {'C': C_val}
grid_search = GridSearchCV(grid_clf , linear_SVC_params, n_jobs = 100 , score_func = f1_score)
grid_search.fit(X[train], Y[train], cv = StratifiedKFold(Y[train],10, indices = True))
y_true, y_pred = Y[test], grid_search.predict(X[test])
print ""Classification report for the best estimator: ""
print grid_search.best_estimator
print ""Tuned for with optimal value: %0.3f"" % f1_score(y_true, y_pred)
print classification_report(y_true, y_pred)
print ""Grid scores:""
pprint(grid_search.grid_scores_)
print ""Best score: %0.3f"" % grid_search.best_score
best_parameters = grid_search.best_estimator._get_params()
print ""Best C: %0.3f "" % best_parameters['C']
```
Just to make sure you can re-produce, X is a sparse CSR matrix of features.
The documentation suggests that this variable specifies only the number of jobs to be run in parallel and I hence assume it's for efficiency of the program.",closed,,2011-05-19 14:35:37+00:00,2012-01-05 14:50:27+00:00,8,denzilc,https://github.com/scikit-learn/scikit-learn/issues/177,1378,5544.247222222222
929385,179,scikit-learn/scikit-learn,Pyflakes errors in lars_path,"<pre>
scikit-learn/scikits/learn/linear_model $ pyflakes least_angle.py
least_angle.py:117: undefined name 'gamma_'
least_angle.py:117: undefined name 'eq_dir'
least_angle.py:119: undefined name 'gamma_'
least_angle.py:119: undefined name 'least_squares'
</pre>",closed,,2011-05-19 22:00:23+00:00,2011-09-14 10:02:05+00:00,4,GaelVaroquaux,https://github.com/scikit-learn/scikit-learn/issues/179,290,2820.028333333333
938198,183,scikit-learn/scikit-learn,Kmeans default initialization method inconsistent?,"I was just looking at k_means_.py and it looks as if the default initialisation method for the kmeans object is ""random"" where for the k_means function (which I guess can be called directly), it is ""k-means++"".
Is that for any particular reason? Otherwise I would use the same method for both of them to be more consistent.
Another thing in the same place: for k_means, init can be a callable according to the docstring, but how this possibility behaves is not explained.",closed,,2011-05-22 15:47:27+00:00,2011-05-24 07:35:26+00:00,4,amueller,https://github.com/scikit-learn/scikit-learn/issues/183,522,39.79972222222222
945167,187,scikit-learn/scikit-learn,High difference in classifier accuracies with LinearSVC and SVC,"The code and data are provided in this gist : https://gist.github.com/987394
There is a significantly large variation in classifier accuracies while using sparse.LinearSVC and sparse.SVC despite performing grid search and scaling the data. Please look into it.",closed,,2011-05-24 04:11:56+00:00,2012-06-05 21:41:46+00:00,16,denzilc,https://github.com/scikit-learn/scikit-learn/issues/187,325,9089.497222222222
958572,189,scikit-learn/scikit-learn,Scaler should work with sparse without centering,We should extend the `preprocessing.Scaler` / `preprocessing.scale` utilities to feature-wise scale sparse matrices to unit scale without trying to center the data first. This work should be done in a consistent way with the `RowNormalizer` refactoring (re-use low level cython functions).,closed,,2011-05-26 13:36:56+00:00,2012-01-04 21:40:07+00:00,5,ogrisel,https://github.com/scikit-learn/scikit-learn/issues/189,338,5360.053055555555
968461,190,scikit-learn/scikit-learn,kernels in pairwise module inconsistent with libsvm,The polynomial and rbf kernels in the pairwise module do not use the same parameters as libsvm. Should be fixed for consistency.,closed,,2011-05-28 15:24:19+00:00,2011-06-03 08:25:26+00:00,0,mblondel,https://github.com/scikit-learn/scikit-learn/issues/190,180,137.0186111111111
973877,191,scikit-learn/scikit-learn,make locally_linear_embedding switch to brute force in high dimensions,"As pointed by Gael, the easiest way would be to use Neighbors\* instance instead of BallTree",closed,,2011-05-30 11:49:17+00:00,2012-01-09 02:39:22+00:00,2,fabianp,https://github.com/scikit-learn/scikit-learn/issues/191,163,5366.834722222222
976523,192,scikit-learn/scikit-learn,Documentation about ROC has a mistake,"Hi,
To use ROC I'm forced to put 0 and 1 as negative and positive labels, respectively.
This is not specified in the documentation, but I'm not sure if I have version 0.8.
http://scikit-learn.sourceforge.net/modules/generated/scikits.learn.metrics.roc_curve.html
Thank you,
IgorFobia",closed,,2011-05-31 01:21:40+00:00,2011-05-31 16:05:38+00:00,5,IgorFobia,https://github.com/scikit-learn/scikit-learn/issues/192,323,14.732777777777779
993837,195,scikit-learn/scikit-learn,NeighborsClassifier kneighbors algorithm='auto',"I've been playing with some benchmarking of nearest neighbors using algorithm='brute', algorithm='ball_tree', and also scipy.spatial.ckdtree.
The basic gist is this: BallTree beats cKDtree for just about every situation. BallTree and brute force have more complicated scalings. Currently, the 'auto' algorithm uses ball_tree for nfeatures<20, and brute force otherwise. This is a bit too simplistic, and will lead to huge inefficiencies in some cases.
There are a few things that affect the speed of neighbor searches:
- number of samples N. brute-force query time grows as O[N]. Ball tree grows as O[log(N)]
- dimensionality of data D. brute-force query time grows as O[D]. Ball tree query time may grown faster or slower than this, depending on data structure. Sparse or structured data will be efficiently searched by the ball tree. Dense data which fills the whole space uniformly may lead to faster than O[D] growth.
- intrinsic dimensionality of the data d: this may be a linear or nonlinear embedded manifold. This makes no difference for brute force searches, but for d<D, ball tree performance vastly improves.
- number of neighbors k: again, this makes very little difference for brute force, but due to the queueing and sorting during the ball tree query, k>1 can slow down the process in a way that is difficult to quantify.
All that to say, the D<20 cutoff is a bit too simplistic. It's hard to determine what the crossover point is, but I think we should assume that data is structured, i.e. d<<D, and decide which algorithm to use based on N and k, as well as D. Any thoughts on how to better quantify this? Should we run a vast suite of benchmarks against some of the sample datasets and empirically determine the turning-points? It would be nice to have a more sophisticated auto algorithm choice.",closed,,2011-06-03 01:07:47+00:00,2011-09-13 22:42:28+00:00,4,jakevdp,https://github.com/scikit-learn/scikit-learn/issues/195,1879,2469.5780555555557
1008060,202,scikit-learn/scikit-learn,Whitening transform as preprocessing,"I feel there is a whitening transform missing. It seems every algorithm implements it again.
Also I think not all algorithms have it.
Thing that should be possible to do are:
- Component-wise zero mean, unit variance
- ZCA whitening transform (PCA, with ""whitening"" option, then transform back)
The PCA with ""whiten"" option definitely also belongs there, so I might put this transform in the same place.",closed,,2011-06-06 08:07:34+00:00,2011-12-18 15:33:09+00:00,8,amueller,https://github.com/scikit-learn/scikit-learn/issues/202,441,4687.426388888889
1009154,204,scikit-learn/scikit-learn,Optimize the ICA impl for 'C' layouted,The current ICA implementation might be optimized for fortran layouted inputs which is less frequent than 'C' layouted data. Bench to see if it's really impacting the performances and if so rewrite the algorithm (if possible) to work directly on the 'C' layouted data instead.,closed,Enhancement,2011-06-06 12:28:41+00:00,2013-07-26 08:03:09+00:00,4,ogrisel,https://github.com/scikit-learn/scikit-learn/issues/204,315,18739.574444444443
1019891,208,scikit-learn/scikit-learn,svr with a transposed matrix raises numpy ValueError,"In the SVR class, passing a transposed matrix into the fit() function causes a 'ValueError: ndarray is not C-contiguous' message. The same error does not happen with other regression classes, e.g. LinearRegression.
This post at stackoverflow may be relevant? http://stackoverflow.com/questions/4420622/how-to-account-for-column-contiguous-array-when-extending-numpy-with-c
Some example code follows:
import numpy
import scikits.learn.linear_model
import scikits.learn.svm
X = numpy.random.random(15)
X = numpy.reshape(X, (3,5))
X = X.T
y = numpy.random.random(5)
lin = scikits.learn.linear_model.LinearRegression()
svr = scikits.learn.svm.SVR()
lin.fit(X, y)
lin.predict(X)
svr.fit(X, y)
svr.predict(X) #causes ValueError",closed,,2011-06-07 20:24:59+00:00,2011-07-01 06:59:42+00:00,6,jonsondag,https://github.com/scikit-learn/scikit-learn/issues/208,782,562.5786111111111
1060139,213,scikit-learn/scikit-learn,Division by zero in lars_path,"as reported here:
http://sourceforge.net/mailarchive/forum.php?thread_name=20110610134529.GA6992%40phare.normalesup.org&forum_name=scikit-learn-general",closed,,2011-06-15 09:31:47+00:00,2012-06-05 20:58:20+00:00,1,fabianp,https://github.com/scikit-learn/scikit-learn/issues/213,182,8555.4425
1063370,214,scikit-learn/scikit-learn,Remove underscore in _get_params?,"The tutorial [mentions](http://scikit-learn.github.com/scikit-learn-tutorial/working_with_text_data.html#parameter-tuning-using-grid-search) `_get_params` on a `GridSearchCV` object, suggesting that it's a public method. If so, shouldn't the underscore be dropped?",closed,,2011-06-15 19:30:54+00:00,2011-12-18 12:15:13+00:00,8,larsmans,https://github.com/scikit-learn/scikit-learn/issues/214,298,4456.738611111111
1067502,215,scikit-learn/scikit-learn,Regression in py3k compatibility,"Source no longer compiles under python 3.1, 2to3 fails with the (cryptic) error
```
Traceback (most recent call last):
File ""setup.py"", line 64, in <module>
res = lib2to3.main.main(""lib2to3.fixes"", ['-w'] + [local_path])
File ""/usr/lib/python3.1/lib2to3/main.py"", line 172, in main
options.processes)
File ""/usr/lib/python3.1/lib2to3/refactor.py"", line 620, in refactor
items, write, doctests_only)
File ""/usr/lib/python3.1/lib2to3/refactor.py"", line 273, in refactor
self.refactor_dir(dir_or_file, write, doctests_only)
File ""/usr/lib/python3.1/lib2to3/refactor.py"", line 292, in refactor_dir
self.refactor_file(fullname, write, doctests_only)
File ""/usr/lib/python3.1/lib2to3/refactor.py"", line 661, in refactor_file
*args, **kwargs)
File ""/home/fabian/envs/p31/lib/python3.1/site-packages/lib2to3cache-0.1-py3.1.egg/lib2to3cache.py"", line 135, in new_refactor_file
return old_refactor_file(self, filename, write, doctests_only)
File ""/usr/lib/python3.1/lib2to3/refactor.py"", line 327, in refactor_file
tree = self.refactor_string(input, filename)
File ""/home/fabian/envs/p31/lib/python3.1/site-packages/lib2to3cache-0.1-py3.1.egg/lib2to3cache.py"", line 113, in new_refactor_string
tree = old_refactor_string(self, input, name)
File ""/usr/lib/python3.1/lib2to3/refactor.py"", line 359, in refactor_string
self.refactor_tree(tree, name)
File ""/usr/lib/python3.1/lib2to3/refactor.py"", line 393, in refactor_tree
self.traverse_by(self.post_order_heads, tree.post_order())
File ""/usr/lib/python3.1/lib2to3/refactor.py"", line 417, in traverse_by
new = fixer.transform(node, results)
File ""/usr/lib/python3.1/lib2to3/fixes/fix_reduce.py"", line 32, in transform
touch_import('functools', 'reduce', node)
File ""/usr/lib/python3.1/lib2to3/fixer_util.py"", line 301, in touch_import
root = find_root(node)
File ""/usr/lib/python3.1/lib2to3/fixer_util.py"", line 277, in find_root
assert node.parent, ""Tree is insane! root found before ""\
AssertionError: Tree is insane! root found before file_input node was found.
make: *** [inplace] Error 1
```",closed,,2011-06-16 14:00:14+00:00,2011-09-01 09:47:02+00:00,2,fabianp,https://github.com/scikit-learn/scikit-learn/issues/215,2159,1843.78
1078977,217,scikit-learn/scikit-learn,Memory problem with SVM,"I am running experiments with an SVM for which I need to create SVMs in a loop on different datasets. Training these SVMs causes the memory of my python process to grow every time I retrain (even though I'm careful to delete the data). To show that the memory problem is in your implementation of SVM learning, I've included very simple sample code where I simply retrain on the same data in a loop (see below). In testing, it's clear that the memory problem clearly becomes worse as Is this a memory leak or is there some function I need to call to release the memory? I've noticed that the code released by the LIBSVM group implements a python **del** constructor that calls a C function to deallocate memory whereas this interface does not.
EXAMPLE OF MEMORY USAGE PROBLEM (After pressing enter, you can watch the python process rapidly grow. To make the problem worse, increase the size of the trainset regulated by posSize and negSize)
<pre>
#! /usr/bin/env python
from scikits.learn import svm
import numpy
if __name__ == ""__main__"":
raw_input(""Press Enter"")
posSize = 100
negSize = 100
dimen = 10
dataPos = numpy.random.uniform(0, 1, dimen*posSize).reshape(posSize,dimen)
dataNeg = numpy.random.uniform(0, 1, dimen*negSize).reshape(negSize,dimen)
dataNeg[:,0] *= -1.0
trdata = numpy.concatenate((dataNeg,dataPos))
trlabels = numpy.array([0]*len(dataNeg) + [1]*len(dataPos))
m = svm.SVC(kernel='linear')
for k in range(100000):
print ""Training new model "" + str(k)
m.fit(trdata,trlabels)
del m
m = svm.SVC(kernel='linear')
raw_input(""Press Enter"")
</pre>",closed,,2011-06-18 22:15:31+00:00,2011-08-30 16:06:18+00:00,17,blaine-alan-nelson,https://github.com/scikit-learn/scikit-learn/issues/217,1696,1745.846388888889
1110128,220,scikit-learn/scikit-learn,Pipeline docs are incomplete,"I just noticed that the documentation for the `Pipeline` class doesn't properly show up in the [generated HTML](http://scikit-learn.org/dev/modules/generated/sklearn.pipeline.Pipeline.html). I tried to fix it, but I can't get the example to show up properly. That's a shame since the lead paragraphs refer to it.",closed,,2011-06-24 13:38:34+00:00,2012-01-06 13:49:44+00:00,15,larsmans,https://github.com/scikit-learn/scikit-learn/issues/220,341,4704.186111111111
1127297,225,scikit-learn/scikit-learn,Refactor feature_extraction.text: bad TF-IDF normalization,"Currently, `TfidfTransformer` does document length normalization before IDF reweighting. I think this should be the other way round.
Furthermore, the documentation of the `text` module is not up to date - it still refers to the dense / sparse versions.
I'd also suggest that `TfidfTransformer` and `Vectorizer` take an additional argument `norm` to specifiy L1 or L2 length normalization (we could also use `length_norm = 'l1' | 'l2' | None` instead of `use_tf` which is tricky anyways: it could also refer to using term frequencies instead of term incidence (binary) rather than normalize term frequencies.",closed,,2011-06-28 07:38:08+00:00,2011-07-04 12:21:30+00:00,22,pprett,https://github.com/scikit-learn/scikit-learn/issues/225,670,148.72277777777776
1156978,229,scikit-learn/scikit-learn,Strong Rules / Gap Safe Screening for Discarding Predictors in Lasso-type Problems,"Just a note to remember that we can arguably still greatly improve the Coordinate Descent (lasso / elastic net) convergence speed if we implement the following trick:
http://www-stat.stanford.edu/~tibs/ftp/strong.pdf",closed,"New Feature, Performance, module:linear_model",2011-07-03 10:40:04+00:00,2025-11-05 16:50:43+00:00,14,ogrisel,https://github.com/scikit-learn/scikit-learn/issues/229,302,125742.1775
1161962,231,scikit-learn/scikit-learn,Memory use of NeighborsClassifier on sparse matrices,"@pprett discovered that a `NeighborsClassifier` working on sparse data takes a disproportionately large amount of memory. The issue can be reproduced by running the document classification example on all categories; then kNN takes some 4GB of memory, which is 4x the size of its input.",closed,Enhancement,2011-07-04 12:42:33+00:00,2013-03-28 00:03:09+00:00,4,larsmans,https://github.com/scikit-learn/scikit-learn/issues/231,338,15179.343333333334
1165864,232,scikit-learn/scikit-learn,comment tests in LLE (arpack backend),"I had to comment some test in test_lle_simple_grid (arpack backend)
https://github.com/scikit-learn/scikit-learn/blob/master/scikits/learn/manifold/tests/test_locally_linear.py
The test is a bit degenerate though ...",closed,,2011-07-05 08:53:48+00:00,2012-08-19 13:50:55+00:00,3,fabianp,https://github.com/scikit-learn/scikit-learn/issues/232,256,9868.951944444445
1189823,237,scikit-learn/scikit-learn,pass Neighbors instance in *neighbors_graph functions,"kneighbors_graph and radius_neighbors_graph should work with a Neighbors instance not a BallTree.
it means that Neighbors should implement some kind of query_radius event for brute force case.",closed,,2011-07-08 13:05:12+00:00,2011-09-13 22:41:23+00:00,1,agramfort,https://github.com/scikit-learn/scikit-learn/issues/237,246,1617.6030555555556
1191432,238,scikit-learn/scikit-learn,FastICA wto whiten,"if i want to use ica = FastICA(whiten=False) but with ica.fit(X) I get the following error:
/usr/local/lib/python2.7/dist-packages/scikits/learn/decomposition/fastica_.pyc in fit(self, X, **params)
352 self.algorithm, self.whiten,
353 self.fun, self.fun_prime, self.fun_args, self.max_iter,
--> 354 self.tol, self.w_init)
355 self.unmixing_matrix_ = np.dot(unmixing_, whitening_)
356 self.components_ = sources_
ValueError: need more than 2 values to unpack
I think, this is because the function fastica returns only two values in case of disabled whitening ...",closed,,2011-07-08 17:37:42+00:00,2011-12-18 12:11:34+00:00,3,jansoe,https://github.com/scikit-learn/scikit-learn/issues/238,687,3906.5644444444442
1193195,239,scikit-learn/scikit-learn,Broken test for CountVectorizer,"As of e5ca264f4b4b7764e07bf63c14294263c4a4bd84, a test fails that relies on the ability to set a `CountVectorizer`'s parameters after construction (in fact, after fitting). It looks to me like the test itself is broken, so I suggest we fix it to not rely on such features.",closed,,2011-07-08 23:15:57+00:00,2011-07-11 18:37:47+00:00,11,larsmans,https://github.com/scikit-learn/scikit-learn/issues/239,304,67.3638888888889
1195358,240,scikit-learn/scikit-learn,"test_dataset{classif,reg} don't honor their n_informative parameter","In the sample generator module, test_dataset{classif,reg} don't honor their n_informative parameter.",closed,,2011-07-09 17:15:31+00:00,2011-08-07 15:10:49+00:00,1,mblondel,https://github.com/scikit-learn/scikit-learn/issues/240,168,693.9216666666666
1224272,245,scikit-learn/scikit-learn,Numerical instability in LLE,"In the LLE tests, if you replace the line:
```
rng = np.random.RandomState(42)
```
by:
```
rng = np.random.RandomState(1)
```
The test will fail with:
```
======================================================================
FAIL: test_locally_linear.test_lle_simple_grid
----------------------------------------------------------------------
Traceback (most recent call last):
File ""/usr/local/lib/python2.7/dist-packages/nose/case.py"", line 187, in runTest
self.test(*self.arg)
File ""/home/ogrisel/coding/scikit-learn/scikits/learn/manifold/tests/test_locally_linear.py"", line 34, in test_lle_simple_grid
clf.fit(X, eigen_solver=solver)
File ""/home/ogrisel/coding/scikit-learn/scikits/learn/manifold/locally_linear.py"", line 418, in fit
random_state=self.random_state)
File ""/home/ogrisel/coding/scikit-learn/scikits/learn/manifold/locally_linear.py"", line 356, in locally_linear_embedding
random_state=random_state)
File ""/home/ogrisel/coding/scikit-learn/scikits/learn/manifold/locally_linear.py"", line 74, in null_space
M, X, M=prec, largest=False, tol=tol, maxiter=max_iter)
File ""/usr/lib/python2.7/dist-packages/scipy/sparse/linalg/eigen/lobpcg/lobpcg.py"", line 431, in lobpcg
assert np.allclose( gramA.T, gramA )
AssertionError:
>> assert <module 'numpy' from '/usr/lib/pymodules/python2.7/numpy/__init__.pyc'>.allclose( matrix([[ 0., 0., 0., nan, nan],
[ 0., 0., 0., nan, nan],
[ 0., 0., 0., nan, nan],
[ nan, nan, nan, nan, nan],
[ nan, nan, nan, nan, nan]]).T, matrix([[ 0., 0., 0., nan, nan],
[ 0., 0., 0., nan, nan],
[ 0., 0., 0., nan, nan],
[ nan, nan, nan, nan, nan],
[ nan, nan, nan, nan, nan]]) )
```",closed,,2011-07-14 16:26:41+00:00,2011-09-01 18:36:55+00:00,2,ogrisel,https://github.com/scikit-learn/scikit-learn/issues/245,1845,1178.1705555555557
1232924,250,scikit-learn/scikit-learn,SVM verbosity,"Apparently you need to manually do
`from scikits.learn.svm import libsvm
libsvm.set_verbosity_wrap(1)
`
to get verbose output from libsvm. This issue was raised on IRC by an user, who pointed out that verbose output is very useful for methods that might converge slowly.
Furthermore there is no equivalent in the liblinear binding.
SVMs should have a `verbose` parameter.",closed,,2011-07-15 22:15:34+00:00,2012-03-15 08:05:57+00:00,3,vene,https://github.com/scikit-learn/scikit-learn/issues/250,388,5841.839722222222
1235275,252,scikit-learn/scikit-learn,linear_model.LogisticRegression is hanged up by np.NaN values,"A fit method of linear_model.LogisticRegression is hanged up if an argument X includes np.NaN values.
Isn't it better to add warning comment to documentation or to fill np.NaN values with default values or mean values?",closed,,2011-07-16 15:37:19+00:00,2011-07-19 19:43:49+00:00,31,tkamishima,https://github.com/scikit-learn/scikit-learn/issues/252,281,76.10833333333333
1235323,253,scikit-learn/scikit-learn,linear_model.LogisticRegression: predict_proba doesn't return legal probabilities,"When linear_model.LogisticRegression is fit by data whose classes are the same, the resultant classifier doesn't return legal probabilities.
If a training set consists of two classes, a predict_proba method returns legal probabilities::
```
import numpy as np
from scikits.learn.linear_model import LogisticRegression
X = np.arange(12, dtype=np.float).reshape(3,4)
y = np.array([1,0,1]).astype(np.float)
clf = LogisticRegression()
clf.fit(X, y)
print clf.predict_proba(X)
```
I got legal probabilities::
```
[[ 0.39416015 0.60583985]
[ 0.35283566 0.64716434]
[ 0.31360104 0.68639896]]
```
However, if `y` contains only zeros::
```
y = np.zeros(3)
clf.fit(X, y)
print clf.predict_proba(X)
```
We got::
```
[[ 0.88033282]
[ 0.99514032]
[ 0.99982459]]
```
The sum of each row is not one. This violates the restriction of probabilities. In this case, isn't better to add some columns?",closed,,2011-07-16 16:08:34+00:00,2012-06-05 21:57:46+00:00,24,tkamishima,https://github.com/scikit-learn/scikit-learn/issues/253,979,7805.82
1240442,256,scikit-learn/scikit-learn,fastica doesn't really take a callable argument,"Here's snippet from the [current `fastica` code](https://github.com/scikit-learn/scikit-learn/blob/804a280630feeecf54a8a26f111cf749ab753da9/scikits/learn/decomposition/fastica_.py#L209):
```
if isinstance(fun, str):
# ...
elif callable(fun):
raise ValueError('fun argument should be either a string '
'(one of logcosh, exp or cube) or a function')
else:
def g(x, fun_args):
return fun(x, **fun_args)
def gprime(x, fun_args):
return fun_prime(x, **fun_args)
```
I haven't tried it out, but it seems to that `elif callable(fun)` should really be `elif not callable(fun)`. I'd love a push this change to master, but I feel it's not really useful without a test that demonstrates passing arbitrary functions to `fastica`. Can someone please write such a test?
(@bthirion, @agramfort seem to be mostly responsible for the code in this module.)",closed,Enhancement,2011-07-18 08:55:11+00:00,2012-11-14 10:59:32+00:00,8,larsmans,https://github.com/scikit-learn/scikit-learn/issues/256,943,11642.0725
1245313,258,scikit-learn/scikit-learn,pca for m by n matrix with n>m and 0<n_components<1,"Small issue with the PCA feature that allows the user to specify n_components via the amount of variance that needs to be explained (0 < n_components < 1). When the user passes in an m by n matrix with n > m (i.e. more columns than rows) the resulting n_components is determined incorrectly.
E.g. the following code sets n_components to something like 17 for a 5 by 20 matrix:
<pre>
import numpy as np
import scikits.learn.decomposition.pca
mat = np.reshape(np.random.random(100), (5, 20))
my_pca = scikits.learn.decomposition.pca.PCA(n_components=.5).fit(mat)
print my_pca #output is PCA(copy=True, n_components=17, whiten=False)
</pre>
I think this can be fixed by changing lines 248-250 of the current development version from:
<pre>
n_remove = np.sum(self.explained_variance_ratio_.cumsum() >= self.n_components) - 1
self.n_components = n_features - n_remove
</pre>
to something like:
self.n_components = np.sum(self.explained_variance_ratio_.cumsum() < self.n_components) + 1
I am using version 0.8 and the development version appears to have the same issue.",closed,,2011-07-18 20:14:25+00:00,2011-08-03 14:05:33+00:00,1,jonsondag,https://github.com/scikit-learn/scikit-learn/issues/258,1126,377.8522222222222
1252393,262,scikit-learn/scikit-learn,Compile issues with missing PPC assembler,"Howdy,
Just wanted to offer a heads up... I was having an awful go of compiling from source on my machine until I eventually figured out the new Xcode deletes the PPC assembler from the system [[link]](https://github.com/lericson/pylibmc/issues/35). This ended up being an issue though as Python was still trying to support three architectures, and since the makefile couldn't find one, it was throwing a broken pipe error.
In the meantime, I found that setting the architecture flags in-line resolved it (even though I have this defined in my bash profile)...
`sudo env ARCHFLAGS=""-arch i386 -arch x86_64"" pip install ...`
I was particularly confused, because I had an older version and couldn't figure out why the update was failing. Hope this proves helpful in the dev process. For completeness, I'm running OS X 10.6.8, Xcode 4.2.
Thanks for all the hard work!",closed,Enhancement,2011-07-19 21:08:47+00:00,2014-05-10 14:47:46+00:00,6,ejhumphrey,https://github.com/scikit-learn/scikit-learn/issues/262,912,24617.64972222222
1270972,271,scikit-learn/scikit-learn,'make test' doesn't cach some doctest errors,"`make test` is a convenient way to run tests on UNIX platforms.
@glouppe found that, contrary to `python -c ""import scikits.learn as skl; skl.test()""`, `make test` doesn't cach doctest failures, for example those which are missing imports.
I tried different options in the `nosetests` command but couldn't reproduce the behaviour of the `test()` function in `scikits/learn/__init__.py`, so my suggestion is to use `python -c ""import scikits.learn as skl; skl.test()""` as the `test` task in the Makefile. Any thoughts?
@glouppe is planning to work on it this evening (european time)
I gotta go so don't wait for my comments.",closed,,2011-07-22 16:24:06+00:00,2012-06-14 10:32:54+00:00,16,mblondel,https://github.com/scikit-learn/scikit-learn/issues/271,673,7866.1466666666665
1276037,275,scikit-learn/scikit-learn,segfault on mac 32 bits with test_svmlight_format.py,"I get a segfault running scikits/learn/datasets/tests/test_svmlight_format.py on mac 32bits python 2.7 with EPD.
$ nosetests scikits/learn/datasets/tests/test_svmlight_format.py
...Segmentation fault",closed,,2011-07-23 22:33:34+00:00,2011-08-24 16:11:55+00:00,19,agramfort,https://github.com/scikit-learn/scikit-learn/issues/275,253,761.6391666666667
1276565,276,scikit-learn/scikit-learn,n_samples used for both fit() and predict(),"`n_samples` is used as the number of samples in `X` for the fit method in classifiers. This is fine and consistently used. However it is also used in the `predict()` functions as the number of 'test' instances in `Y` (see SVM for example). This is despite the fact that the size does not need to be the same as that used for the `fit()` function.
Would a different name be better, to make it obvious that these two shapes can be different?",closed,,2011-07-24 02:57:18+00:00,2011-07-26 00:14:48+00:00,5,robertlayton,https://github.com/scikit-learn/scikit-learn/issues/276,484,45.291666666666664
1309054,283,scikit-learn/scikit-learn,Coordinate descent stopping rule,"I'm working on a lasso/elasticnet minimizer using proximal methods.
Comparing my implementation with the ones in scikits.learn I have noticed a (probably) little bug in the stopping condition.
You check if:
```
d_w_max / w_max < d_w_tol
```
but w_max is updated only when:
```
if w[ii] > w_max:
w_max = w[ii]
```
This means that if the solution contains negative coefficients (or only negative coefficients) the tolerance is scaled
only respect to the positive ones leading to an _early_ calculation of the duality gap which may slow down the algorithm.
A solution may be:
```
if fabs(w[ii]) > w_max:
w_max = fabs(w[ii])
```",closed,,2011-07-29 09:53:36+00:00,2011-07-29 10:31:39+00:00,24,sabba,https://github.com/scikit-learn/scikit-learn/issues/283,681,0.6341666666666667
1309616,285,scikit-learn/scikit-learn,Incompatability with Scipy 0.80,"I am running Ubuntu 11.04, which is tagged to SciPy 0.80.
I checked out the latest version of scikit-learn from github (version 0.9-git). When I type `import scikits.learn`, I get the import error `ImportError: No module named _csgraph`. The traceback is below.
I have done a bit of investigation, and it looks like the module csgraph is not in scipy 0.80 (it is in verion 0.9 at sparse.sparsetools.csgraph).
This is problematic because the readme file for scikit-learn says that one only needs to have scipy >= 0.7. So either this import error needs to be fixed, or the requirements need to be updated.
``` python
In [3]: import scikits.learn
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
/home/conradlee/repositories/scikit-learn/<ipython console> in <module>()
/home/conradlee/repositories/scikit-learn/scikits/learn/__init__.py in <module>()
16 from .base import clone
17
---> 18 from . import mixture
19
20 try:
/home/conradlee/repositories/scikit-learn/scikits/learn/mixture/__init__.py in <module>()
3 """"""
4
----> 5 from .gmm import normalize, sample_gaussian, lmvnpdf
6 from .gmm import GMM, _distribute_covar_matrix_to_match_cvtype
7 from .gmm import _validate_covars
/home/conradlee/repositories/scikit-learn/scikits/learn/mixture/gmm.py in <module>()
12 from ..utils import check_random_state
13 from ..utils.extmath import logsum
---> 14 from .. import cluster
15
16 # FIXME this lacks a proper docstring
/home/conradlee/repositories/scikit-learn/scikits/learn/cluster/__init__.py in <module>()
2 Clustering algorithms
3 """"""
----> 4 from .spectral import spectral_clustering, SpectralClustering
5 from .mean_shift_ import mean_shift, MeanShift, estimate_bandwidth
6 from .affinity_propagation_ import affinity_propagation, AffinityPropagation
/home/conradlee/repositories/scikit-learn/scikits/learn/cluster/spectral.py in <module>()
10 from ..base import BaseEstimator
11 from ..utils import check_random_state
---> 12 from ..utils.graph import graph_laplacian
13 from .k_means_ import k_means
14
/home/conradlee/repositories/scikit-learn/scikits/learn/utils/graph.py in <module>()
72 cs_graph_components = sparse.cs_graph_components
73 else:
---> 74 from ._csgraph import cs_graph_components
75
76
/home/conradlee/repositories/scikit-learn/scikits/learn/utils/_csgraph.py in <module>()
11 import numpy as np
12
---> 13 from sparsetools import cs_graph_components as _cs_graph_components
14
15 from scipy.sparse import csr_matrix
/home/conradlee/repositories/scikit-learn/scikits/learn/utils/sparsetools/__init__.py in <module>()
1 """"""sparsetools - a collection of routines for sparse matrix operations
2 """"""
3
----> 4 from csgraph import cs_graph_components
5
/home/conradlee/repositories/scikit-learn/scikits/learn/utils/sparsetools/csgraph.py in <module>()
23 fp.close()
24 return _mod
---> 25 _csgraph = swig_import_helper()
26 del swig_import_helper
27 else:
/home/conradlee/repositories/scikit-learn/scikits/learn/utils/sparsetools/csgraph.py in swig_import_helper()
15 fp, pathname, description = imp.find_module('_csgraph', [dirname(__file__)])
16 except ImportError:
---> 17 import _csgraph
18 return _csgraph
19 if fp is not None:
ImportError: No module named _csgraph
```",closed,,2011-07-29 12:04:02+00:00,2011-08-24 09:32:27+00:00,10,conradlee,https://github.com/scikit-learn/scikit-learn/issues/285,3671,621.4736111111112
1310323,286,scikit-learn/scikit-learn,strange behaviors of svm.SVC,"I was working on an example to demonstrate the trade-off between sparsity in dual space and accuracy when using svm.SVC and I'm having issues.
1) Neither the sparsity nor the accuracy change when varying C with the MNIST dataset. This may just be coincidental as MNIST is a very easy dataset. I checked the C values in Solver::Solve in svm.cpp and they seemed to be fine though. (Edit: I've just checked with LinearSVC and the accuracy doesn't change either so it is probably a false alarm for this one)
2) I wanted to check with another dataset so I tried with the 20 newsgroup dataset and svm.SVC seems to fail miserably on it (I get 5% accuracy, knowing that there are 20 classes!). LinearSVC has an accuracy over 80%.
Here is the code snippet:
<pre>
n_train = 1000
n_test = 5000
import numpy as np
import pylab as pl
from scikits.learn.datasets import fetch_mldata
#from scikits.learn import svm
import scikits.learn.svm.sparse as svm
import scipy.sparse as sp
dataset = fetch_mldata('MNIST original')
#dataset = fetch_mldata('news20_scale')
X = dataset.data
y = dataset.target
# Shuffle indices.
indices = np.arange(X.shape[0])
np.random.shuffle(indices)
X = X[indices]
y = y[indices]
# Make train and test sets.
X_train = sp.csr_matrix(X[:n_train])
y_train = y[:n_train]
X_test = sp.csr_matrix(X[n_train:n_train + n_test])
y_test = y[n_train:n_train + n_test]
sparsity = []
accuracy = []
for C in np.linspace(0.001, 1000, 3):
clf = svm.SVC(kernel=""linear"", C=C)
#clf = svm.SVC(kernel=""linear"", C=1.0)
#clf = svm.LinearSVC()
clf.fit(X_train, y_train)
sparsity.append(clf.n_support_.sum() * 1.0 / n_train)
y_pred = clf.predict(X_test)
accuracy.append(np.mean(y_test == y_pred))
print sparsity
print accuracy
</pre>",closed,,2011-07-29 14:18:24+00:00,2011-09-26 08:11:55+00:00,2,mblondel,https://github.com/scikit-learn/scikit-learn/issues/286,1789,1409.8919444444443
1333451,291,scikit-learn/scikit-learn,fmin_cobyla used in gaussian_process.py does not like np.inf,"The reduced_likelihood_function() in gaussian_process/gaussian_process.py returns np.inf when the Cholesky decomposition of R raises an np.linalg.LinAlg exception. When the objective function of scipy.optimize.fmin_cobyla returns np.inf, the optimizer passes np.nan to the objective function (I raised this issue on scipy-user). This np.nan causes an exception when trying to do the Cholesky decomposition again, because this time R is full of np.nan.
Maybe there are three routes to fixing this issue
1. Do something other than return np.inf when the Cholesky decomposition raises a LinAlg exception
2. Have reduced_likelihood_function() treat a nan argument better than raising an exception, in such a way that fmin_cobyla can proceed.
3. Use an optimizer different from fmin_cobyla -- one that handles values of np.inf better.",closed,Bug,2011-08-02 21:43:09+00:00,2015-02-25 19:02:28+00:00,10,goretkin,https://github.com/scikit-learn/scikit-learn/issues/291,892,31269.321944444444
1346618,294,scikit-learn/scikit-learn,Retreiving the lastest code onto Ubuntu 10.04 x86_64 GNU/Linux,"I have been trying to get the latest version of scikits-learn on to Ubuntu 64 bit system, but I get the following errors when I try to ""make"" or ""python setup.py build_ext --inplace"".
The error is
collect2: ld terminated with signal 11 [Segmentation fault]
and
error: Command ""gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions build/temp.linux-x86_64-2.6/cd_fast.o -lcblas -o ./cd_fast.so"" failed with exit status 1
I am not sure, what dependencies I need to install . I tried a lot but couldn't figure it out. It would be really helpful if I get the latest version of scikits working on my system.
Thanks a lot for all your time and help.",closed,,2011-08-04 19:00:25+00:00,2012-01-04 20:51:40+00:00,15,tezdeepthi,https://github.com/scikit-learn/scikit-learn/issues/294,714,3673.8541666666665
1393831,312,scikit-learn/scikit-learn,Different effect of alpha between dict_learning and dict_learning_online,"Basically, for the same value of `alpha`, `dict_learning_online` is much sparser.
I'll let this code sample & output speak for itself:
https://gist.github.com/05c5daa3b27f2df9b67c",closed,,2011-08-12 10:03:47+00:00,2012-03-25 16:31:18+00:00,1,vene,https://github.com/scikit-learn/scikit-learn/issues/312,254,5430.458611111111
1474994,321,scikit-learn/scikit-learn,_svmlight_format.cpp broken for Python3,"The _svmlight_format.cpp does not build over Python3. I'm putting it as a milestone as I would really like to have python3 support in the next release.
Here is the backtrace:
```
g++: scikits/learn/datasets/_svmlight_format.cpp
scikits/learn/datasets/_svmlight_format.cpp:82:67: warning: missing braces around initializer for 'PyObject'
scikits/learn/datasets/_svmlight_format.cpp:83:67: warning: missing braces around initializer for 'PyObject'
scikits/learn/datasets/_svmlight_format.cpp: In function 'PyObject* init_svmlight_format()':
scikits/learn/datasets/_svmlight_format.cpp:332:5: error: return-statement with no value, in function returning 'PyObject*'
scikits/learn/datasets/_svmlight_format.cpp:336:37: error: 'Py_InitModule3' was not declared in this scope
scikits/learn/datasets/_svmlight_format.cpp:337:1: warning: no return statement in function returning non-void
scikits/learn/datasets/_svmlight_format.cpp:82:67: warning: missing braces around initializer for 'PyObject'
scikits/learn/datasets/_svmlight_format.cpp:83:67: warning: missing braces around initializer for 'PyObject'
scikits/learn/datasets/_svmlight_format.cpp: In function 'PyObject* init_svmlight_format()':
scikits/learn/datasets/_svmlight_format.cpp:332:5: error: return-statement with no value, in function returning 'PyObject*'
scikits/learn/datasets/_svmlight_format.cpp:336:37: error: 'Py_InitModule3' was not declared in this scope
scikits/learn/datasets/_svmlight_format.cpp:337:1: warning: no return statement in function returning non-void
```
ping also @mblondel :-)",closed,,2011-08-24 14:58:30+00:00,2011-08-24 16:00:55+00:00,4,fabianp,https://github.com/scikit-learn/scikit-learn/issues/321,1604,1.0402777777777779
1475710,322,scikit-learn/scikit-learn,Rewrite svmlight loader in Cython,"I think the way to go to rewrite the svmlight loader in Cython is to stop doing memory management plain and simple. I suggest one of the following 2 solutions:
- give up on not making copy: we build the arrays incrementally in std vectors then make a copy to obtain a numpy arrays
- use a subset of the file to estimate the size of the arrays and then allocate them once for all (hopefully!)",closed,,2011-08-24 16:14:47+00:00,2011-10-20 19:00:54+00:00,2,mblondel,https://github.com/scikit-learn/scikit-learn/issues/322,425,1370.768611111111
1494418,323,scikit-learn/scikit-learn,pickle support for BallTree,"```
>>> X = np.random.random((10, 3))
>>> balltree = BallTree(X)
>>> s = pickle.dumps(balltree, protocol=2)
...
pickle.PicklingError: Can't pickle <type 'ball_tree.BallTree'>: it's not found as ball_tree.BallTree
```",closed,,2011-08-26 11:44:11+00:00,2011-09-01 18:30:21+00:00,4,fabianp,https://github.com/scikit-learn/scikit-learn/issues/323,245,150.76944444444445
1502628,324,scikit-learn/scikit-learn,RBF kernel does not take degree,"Hello,
I believe there is a typo in the svm.SVC() class doc:
https://github.com/scikit-learn/scikit-learn/blob/master/scikits/learn/svm/classes.py#L98
if i understand correctly, degree is only relevant for polynomial kernels
and not rbf and sigmoid
ivan",closed,,2011-08-28 02:43:19+00:00,2011-08-28 04:58:46+00:00,2,ivanistheone,https://github.com/scikit-learn/scikit-learn/issues/324,288,2.2575
1516847,325,scikit-learn/scikit-learn,argmin and and argmax utilities in pairwise module,"Very often, one doesn't care about the pairwise distance matrix but just about the argmin or the argmax along an axis. It would be nice if all distance functions in the pairwise module had argmin / argmax utilities (e.g., `euclidean_distances_argmin`). This should greatly improve memory consumption.
To benefit from blas acceleration, we can add a `chunk_size` argument. Then the original distance function can be called one chunk at a time. Another alternative to be really memory efficient is to use Cython but we lose blas acceleration.",closed,New Feature,2011-08-30 06:48:28+00:00,2013-08-30 13:06:41+00:00,27,mblondel,https://github.com/scikit-learn/scikit-learn/issues/325,594,17550.30361111111
1539041,329,scikit-learn/scikit-learn,save dialog in SVM gui,"It would be nice if there was a save dialog in the SVM gui to save the current picture as PNG / PDF or the current data as pickle file. The first one is for easily inserting pictures in a presentation (I could use print screen but the result won't be vectorized) and the second one is for easily creating mini datasets.
CC @pprett",closed,,2011-09-01 08:17:47+00:00,2011-10-09 14:48:21+00:00,8,mblondel,https://github.com/scikit-learn/scikit-learn/issues/329,354,918.5094444444444
1539130,330,scikit-learn/scikit-learn,segfault in manifold,The example examples/manifold/plot_compare_methods.py segfaults when using scipy from the development version.,closed,,2011-09-01 08:37:07+00:00,2011-11-17 09:14:24+00:00,4,fabianp,https://github.com/scikit-learn/scikit-learn/issues/330,131,1848.621388888889
1548707,332,scikit-learn/scikit-learn,difference in run time when using libsvm via scikits-learn,"To reproduce (Reported by Tim Sheerman-Chase in the mailing list):
```
from sklearn import datasets, svm
from sklearn.cross_val import KFold
import numpy as np
from svmutil import *
#import mvpa.clfs.libsvmc
from datetime import datetime
C = 10000.
nu = 0.5
gamma = 0.
dataset = datasets.load_boston()
kfold = KFold(len(dataset.data), k=2)
print ""\n================""
print ""Using Scikits""
startTime = datetime.now()
for train, test in kfold:
X = dataset.data
Y = dataset.target
X_train, X_test, y_train, y_test = X[train], X[test], Y[train], Y[test]
reg = svm.NuSVR(nu=nu,C=C,gamma=gamma)
print reg
reg.fit(X_train,y_train)
predict = reg.predict(X_test)
#for p,a in zip(predict,y_test):
# print p,a
msError = ((predict - y_test) ** 2.).mean()
print ""Mean squared error"",msError
print ""Run time"", datetime.now() - startTime
print ""\n================""
print ""Using Libsvm""
startTime = datetime.now()
for train, test in kfold:
X = dataset.data
Y = dataset.target
X_train, X_test, y_train, y_test = X[train], X[test], Y[train], Y[test]
problem = svm_problem(y_train, X_train.tolist())
# parameter s = 4 for libsvm: nusvr
# parameter t = 2 for libsvm: radial basis function kernel
# parameter g = 0.0 for libsvm: gamma
param = svm_parameter(""-s 4 -t 2 -g "" + str(gamma) + "" -c ""+str(C)+"" -n ""+str(nu))
model = svm_train(problem, param)
predict = svm_predict(y_test,X_test.tolist(),model)
predictV = predict[0]
msError = ((np.array(predictV) - y_test) ** 2.).mean()
print ""Mean squared error"",msError
print ""Run time"", datetime.now() - startTime
```",closed,,2011-09-02 06:50:54+00:00,2011-09-13 10:25:51+00:00,5,fabianp,https://github.com/scikit-learn/scikit-learn/issues/332,1720,267.5825
1548833,333,scikit-learn/scikit-learn,failed doctests when PIL is not available,"here is the backtrace:
```
FAIL: Doctest: scikits.learn.datasets.base.load_sample_image
----------------------------------------------------------------------
Traceback (most recent call last):
File ""/home/fabian/lib/python2.7/doctest.py"", line 2153, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for scikits.learn.datasets.base.load_sample_image
File ""/home/fabian/dev/scikit-learn/scikits/learn/datasets/base.py"", line 403, in load_sample_image
----------------------------------------------------------------------
File ""/home/fabian/dev/scikit-learn/scikits/learn/datasets/base.py"", line 406, in scikits.learn.datasets.base.load_sample_image
Failed example:
china = load_sample_image('china.jpg')
Exception raised:
Traceback (most recent call last):
File ""/home/fabian/lib/python2.7/doctest.py"", line 1248, in __run
compileflags, 1) in test.globs
File ""<doctest scikits.learn.datasets.base.load_sample_image[0]>"", line 1, in <module>
china = load_sample_image('china.jpg')
File ""/home/fabian/dev/scikit-learn/scikits/learn/datasets/base.py"", line 418, in load_sample_image
images = load_sample_images()
File ""/home/fabian/dev/scikit-learn/scikits/learn/datasets/base.py"", line 389, in load_sample_images
raise ImportError(""The Python Imaging Library (PIL)""
ImportError: The Python Imaging Library (PIL)is required to load data from jpeg files
```",closed,,2011-09-02 07:21:09+00:00,2012-01-09 14:16:07+00:00,20,fabianp,https://github.com/scikit-learn/scikit-learn/issues/333,1536,3102.916111111111
1549607,336,scikit-learn/scikit-learn,spectral clustering: the first data point always forms a cluster of itself,"when running the spectral clustering (scikits.learn.cluster.SpectralClustering), the first data point almost always form a cluster containing only one element that is the data point itself.
Here is the blog post containing the source code and the screen shot of the visualization on 2D data points generated randomly: http://hieuza.wordpress.com/2011/09/02/code-test-scikits-learn-cluster-spectralclustering/",closed,,2011-09-02 09:50:07+00:00,2011-09-25 19:21:43+00:00,6,hieuza,https://github.com/scikit-learn/scikit-learn/issues/336,483,561.5266666666666
1550998,337,scikit-learn/scikit-learn,Installation issue with sgd_fast,"When I installed the scikit-learn with: python setup.py install --home ~/python
The installation ended correctly but when I want to import svm (from scikits.learn import svm), I got a sgd_fast not a module name exception.
If I first build the scikit ""inplace"" (python setup.py build_ext --inplace) then python setup.py install --home ~/python, it was no problem with svm import.
Probably a bug with the copy of sgd_fast during installation.",closed,,2011-09-02 12:52:17+00:00,2011-09-02 15:50:21+00:00,6,BenoitDamota,https://github.com/scikit-learn/scikit-learn/issues/337,476,2.9677777777777776
1551887,338,scikit-learn/scikit-learn,SGDClassifier warm start problem,"I'm trying to use the warm starting in the SGDClassifier.
I want to use the coef_ and intercept_ I got from an earlier training.
I'm doing binary classification and I get an intercept that is just a float (as expected).
In base.py in the sgd folder there is an assert
if intercept_init.shape ≠ (1,): [...]
But my numpy returns a shape of ""()"", throwing an exception. Does that depend on the numpy version or is that a bug in the code?
I'm using Numpy 1.5.1",closed,,2011-09-02 14:51:02+00:00,2011-09-20 06:30:32+00:00,7,amueller,https://github.com/scikit-learn/scikit-learn/issues/338,493,423.65833333333336
1557542,339,scikit-learn/scikit-learn,Unit test times,"Following a discussion on the mailing list about the total build time, including testing, it was suggested that some of the unit tests are slow. The following functions take the most cumulative time in running the tests, and give insight into which tests should be addressed first. The hmm/gmm tests are currently the worst for taking time to run. Can someone please have a look at these tests and work out if its possible to make them faster?
I've taken some liberty with the following output, but its basically the result of running `$ python profile_sklearn.py | grep ""test""`
```
8564043 function calls (8511572 primitive calls) in 54.349 CPU seconds
Ordered by: cumulative time
List reduced from 4738 to 10 due to restriction <10>
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 54.389 54.389 __init__.py:27(test)
1 0.001 0.001 54.389 54.389 nosetester.py:249(test)
17 0.002 0.000 13.312 0.783 test_hmm.py:211(train_hmm_and_keep_track_of_log_likelihood)
5 0.001 0.000 6.735 1.347 test_hmm.py:315(test_fit)
6 0.001 0.000 3.641 0.607 test_hmm.py:610(test_fit)
12 0.001 0.000 3.594 0.300 test_gmm.py:202(test_train)
2475 0.007 0.000 3.343 0.001 test_hmm.py:216(<genexpr>)
7 0.000 0.000 2.653 0.379 test_gaussian_process.py:35(test_2d)
1 0.001 0.001 2.420 2.420 test_ridge.py:237(test_dense_sparse)
4 0.001 0.000 2.369 0.592 test_hmm.py:353(test_fit_with_priors)
1 0.004 0.004 1.893 1.893 test_image.py:57(test_connect_regions)
1 0.000 0.000 1.782 1.782 test_gaussian_process.py:83(test_ordinary_kriging)
2 0.046 0.023 1.622 0.811 test_ridge.py:115(_test_ridge_loo)
1 0.004 0.004 1.610 1.610 test_image.py:65(test_connect_regions_with_grid)
2 0.000 0.000 1.504 0.752 test_sgd.py:255(test_auto_weight)
1 0.000 0.000 1.470 1.470 test_cross_val.py:63(test_permutation_score)
4 0.000 0.000 1.466 0.367 cross_val.py:812(permutation_test_score)
404 0.040 0.000 1.242 0.003 cross_val.py:754(_permutation_test_score)
2 0.000 0.000 1.179 0.590 test_hmm.py:495(test_fit)
1 0.000 0.000 1.142 1.142 test_hmm.py:396(test_fit_startprob_and_transmat)
1 0.001 0.001 1.141 1.141 test_coordinate_descent.py:137(test_enet_path)
1 0.000 0.000 1.126 1.126 test_image.py:167(test_reconstruct_patches_perfect_color)
602 0.006 0.000 1.116 0.002 doctest.py:780(find)
77 0.001 0.000 1.104 0.014 doctest.py:2144(runTest)
77 0.001 0.000 1.102 0.014 doctest.py:1344(run)
1 0.006 0.006 1.000 1.000 test_neighbors.py:70(test_neighbors_sparse_classification)
77 0.009 0.000 0.982 0.013 doctest.py:1196(__run)
1 0.000 0.000 0.914 0.914 test_parallel.py:82(test_error_capture)
4804/2383 0.046 0.000 0.888 0.000 doctest.py:893(_find)
1874 0.007 0.000 0.836 0.000 suite.py:370(_get_wrapped_tests)
1370 0.002 0.000 0.809 0.001 suite.py:92(_get_tests)
1 0.000 0.000 0.804 0.804 test_nmf.py:108(test_projgrad_nmf_sparseness)
```
For reference, `profile_sklearn.py` is:
``` python
import cProfile
from sklearn import test
cProfile.run(""test()"", 'sklearn.prof')
import pstats
p = pstats.Stats('sklearn.prof')
p.strip_dirs().sort_stats('cumulative').print_stats(500)
```",closed,"Easy, Enhancement",2011-09-03 10:24:13+00:00,2014-03-10 17:38:08+00:00,13,robertlayton,https://github.com/scikit-learn/scikit-learn/issues/339,3715,22063.231944444444
1566600,342,scikit-learn/scikit-learn,sklearn/ball_tree.so has no package name,"**tl;dr** nose doesn't give a package name for .pyx files, so ball_tree.so fails when printing out results of doctests. Recommend moving doctests to specific test module instead.
**Long version**
When running the tests with `from sklearn import test; test(verbose=3)`, the test run great, but when printing out the results, I get an error on this line in `nose/plugins/doctests.py`:
``` python
def id(self):
name = self._dt_test.name
filename = self._dt_test.filename
if filename is not None:
pk = getpackage(filename)
if not name.startswith(pk):
name = ""%s.%s"" % (pk, name)
return name
```
If I `print pk, filename` just above the second if statement, I find out the error happens when dealing with printing out the doctest error for `nose/plugins/doctests.py`:
`None /usr/local/lib/python2.7/dist-packages/scikit_learn-0.9_git-py2.7-linux-i686.egg/sklearn/ball_tree.so`
So the error is basically, that ball_tree.so has doctests, but no package name. This is because on line 273 in `nose/util.py`, there is a line:
``` python
if not src_file.endswith('.py') and not ispackage(src_file):
return None
```
In other words, if its not a .py file, it won't have a package name. I checked the latest source for nose, and this is still there, so my version of nose is not out of date.
If nobody else is getting these, its probably because these tests fail on my computer, and hence nose needs to print out the details. However showing failed tests is important, so these should probably be moved to a specific test module so that they do print out when they fail.
thoughts?",closed,,2011-09-05 10:52:42+00:00,2012-01-07 17:24:12+00:00,11,robertlayton,https://github.com/scikit-learn/scikit-learn/issues/342,1698,2982.525
1576675,344,scikit-learn/scikit-learn,more intelligible errors when using wrong parameter combination in liblinear,"In liblinear-based classifiers, the solver is automatically selected depending on the parameter combination. However, some combinations are not possible (e.g. `dual=True, penalty='l1'`) and the error message is not clear at all. It would be better to print a message along the lines of `only dual=False is supported when penalty='l1'`.
Don't have time to fix it right now, hence this report.
CC @fabianp",closed,,2011-09-06 10:36:50+00:00,2011-09-26 08:10:23+00:00,3,mblondel,https://github.com/scikit-learn/scikit-learn/issues/344,482,477.55916666666667
1591168,345,scikit-learn/scikit-learn,upgrade our libsvm version to 3.1,We currently have 3.0,closed,,2011-09-07 16:55:46+00:00,2011-12-16 15:59:36+00:00,4,fabianp,https://github.com/scikit-learn/scikit-learn/issues/345,55,2399.063888888889
1620065,349,scikit-learn/scikit-learn,Stop words in feature_extraction.text do not contain reference,"I was wondering where the list of stop words in `feature_extraction.text` come from?
The specific list used can greatly affect the final model in many implementations, so its important to keep a reference with this.",closed,,2011-09-11 23:24:41+00:00,2012-01-05 12:48:38+00:00,6,robertlayton,https://github.com/scikit-learn/scikit-learn/issues/349,279,2773.3991666666666
1639037,351,scikit-learn/scikit-learn,minkowski p-distance in sklearn.neighbors,"Once PR #313 is merged, it should be fairly straightforward to add a keyword `p` to classes in `sklearn.neighbors` to specify an arbitrary Minkowski metric for nearest neighbors searches.
- `BallTree` accepts `p` upon construction
- `cKDTree` accepts `p` upon querying
- Brute-force will be able to make use of the updates in PR #313: the new `sklearn.pairwise` module will have functions `manhattan_distance` for `p=1`, `euclidean_distance` for `p=2`, and `minkowski_distance` for arbitrary `p`. These should have output format similar to what is currently used in `sklearn.neighbors` with `algorithm='brute'`. The code should use these two specialized functions for `p=1` and `p=2`, as they are faster than the general routine.",closed,New Feature,2011-09-13 22:56:05+00:00,2013-07-25 13:27:01+00:00,8,jakevdp,https://github.com/scikit-learn/scikit-learn/issues/351,774,16334.515555555556
1695174,355,scikit-learn/scikit-learn,test_omp broken under python 2.5,"It seems that the `with` statement doesn't work properly in python2.5:
```
======================================================================
ERROR: Failure: SyntaxError (invalid syntax (test_omp.py, line 63))
----------------------------------------------------------------------
Traceback (most recent call last):
File ""/home/fabian/envs/np13p25/lib/python2.5/site-packages/nose-1.0.0-py2.5.egg/nose/loader.py"", line 390, in loadTestsFromName
addr.filename, addr.module)
File ""/home/fabian/envs/np13p25/lib/python2.5/site-packages/nose-1.0.0-py2.5.egg/nose/importer.py"", line 39, in importFromPath
return self.importFromDir(dir_path, fqname)
File ""/home/fabian/envs/np13p25/lib/python2.5/site-packages/nose-1.0.0-py2.5.egg/nose/importer.py"", line 86, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File ""/home/fabian/dev/scikit-learn/sklearn/linear_model/tests/test_omp.py"", line 63
with warnings.catch_warnings(record=True) as w:
^
SyntaxError: invalid syntax
```",closed,,2011-09-21 08:41:15+00:00,2011-11-16 21:45:12+00:00,5,fabianp,https://github.com/scikit-learn/scikit-learn/issues/355,1065,1357.0658333333333
1699413,356,scikit-learn/scikit-learn,build of pdf documentation is broken,"Steps to reproduce:
1. cd doc/
2. make latex
3. cd _build/latex
4. make all-pdf
And it hangs there",closed,,2011-09-21 14:52:27+00:00,2011-11-10 09:35:00+00:00,1,fabianp,https://github.com/scikit-learn/scikit-learn/issues/356,137,1194.7091666666668
1705471,358,scikit-learn/scikit-learn,fetch_mldata doctests will fail with no internet connection,The doctests in function datasets.fetch_mldata will fail if there is no internet connection and data is not already stored in disk,closed,,2011-09-21 21:59:41+00:00,2012-05-05 20:35:51+00:00,3,fabianp,https://github.com/scikit-learn/scikit-learn/issues/358,190,5446.602777777778
1715578,359,scikit-learn/scikit-learn,ImportError: Please do not forget to run `make` first,"> > > from sklearn import svm
Traceback (most recent call last):
File ""<pyshell#0>"", line 1, in <module>
from sklearn import svm
File ""C:\Python26\lib\site-packages\sklearn__init__.py"", line 19, in <module>
raise ImportError(""Please do not forget to run `make` first"")
ImportError: Please do not forget to run `make` first
I installed 'scikit-learn-0.9.win32-py2.6' in just simple 'double-click '.
Is it bugs?",closed,,2011-09-22 16:25:30+00:00,2011-09-24 11:23:10+00:00,13,hesety,https://github.com/scikit-learn/scikit-learn/issues/359,479,42.96111111111111
1723163,361,scikit-learn/scikit-learn,"scikit-learn has been upgraded to a core plugin in Python( x, y )",http://code.google.com/p/pythonxy/wiki/StandardPlugins,closed,,2011-09-23 13:09:06+00:00,2011-09-23 14:57:07+00:00,2,mindw,https://github.com/scikit-learn/scikit-learn/issues/361,120,1.8002777777777779
1733091,362,scikit-learn/scikit-learn,Compilation issues in Mageia,"Here is the patch:
http://sophie.zarb.org/distrib/Mageia/cauldron/x86_64/by-pkgid/0514b70b8ae9b173d67d7b7a89b29eb3/files/2
Looks good to me but haven't tested it.",closed,,2011-09-25 09:57:08+00:00,2012-05-05 20:47:19+00:00,1,fabianp,https://github.com/scikit-learn/scikit-learn/issues/362,193,5362.836388888889
1733145,363,scikit-learn/scikit-learn,sklearn 0.9 test failure under Mageia,"On Mageia developpement version, there is a test failure under i586 arch (no failure under x86_64).
My configuration is :
python 2.7.2
numpy 1.6.1
scipy 0.9.0
lapack 3.3.1
atlas 3.8.3
Here is my test log:
```
======================================================================
FAIL: Check that lars_path is robust to collinearity in input
----------------------------------------------------------------------
Traceback (most recent call last):
File ""/usr/lib/python2.7/site-packages/nose/case.py"", line 187, in
runTest
self.test(*self.arg)
File
""/net/nfs/home/revillet/RPM/BUILDROOT/python-scikits-learn-0.9-1.mga2.i386/usr/lib/python2.7/site-packages/sklearn/linear_model/tests/test_least_angle.py"",
line 86, in test_collinearity
assert_array_almost_equal(np.dot(X, coef_path_[:, -1]), y)
File ""/usr/lib/python2.7/site-packages/numpy/testing/utils.py"", line
800, in assert_array_almost_equal
header=('Arrays are not almost equal to %d decimals' % decimal))
File ""/usr/lib/python2.7/site-packages/numpy/testing/utils.py"", line
636, in assert_array_compare
raise AssertionError(msg)
AssertionError:
Arrays are not almost equal to 6 decimals
(mismatch 100.0%)
x: array([ 0.82457083, -0.25 , -0.125 ])
y: array([ 1., 0., 0.])
----------------------------------------------------------------------
```",closed,,2011-09-25 10:29:57+00:00,2012-05-08 08:39:38+00:00,4,grenoya,https://github.com/scikit-learn/scikit-learn/issues/363,1395,5422.161388888889
1749196,365,scikit-learn/scikit-learn,"same input, different result from svm","I'm not sure it is normal or not. Just I hope to check.
svmfitted=LinearSVC(loss='l2', penalty=""l1"", C=1000,dual=False, tol=1e-3).fit(X_train, y_train)
pred = svmfitted.predict(X_test)
print 1.0*sum(pred)/len(pred)
knnfitted=KNeighborsClassifier(n_neighbors=10).fit(X_train, y_train)
pred = knnfitted.predict(X_test)
print 1.0*sum(pred)/len(pred)
When I using above code, I have different result from same input data.
Am I wrong something? or is it normal?
X_test variable has only one category for easy computation. But training data have two categories.",closed,,2011-09-27 05:22:55+00:00,2011-09-27 05:50:26+00:00,35,hesety,https://github.com/scikit-learn/scikit-learn/issues/365,601,0.45861111111111114
1755746,366,scikit-learn/scikit-learn,SGDClassifier should clear self.sample_weight after training,"I was getting extremely large pickled strings from a trained SGDClassifier and tracked the problem down to the sample_weight field. Since I don't think this field has any use after training, it should probably be cleared at the end of 'fit' or excluded from serialization.",closed,,2011-09-27 19:53:40+00:00,2012-01-08 17:12:33+00:00,23,iskandr,https://github.com/scikit-learn/scikit-learn/issues/366,333,2469.3147222222224
1767386,367,scikit-learn/scikit-learn,Memory leak in sparse csr_set_model() function.,"I run a lot of predict() calls with sparse vectors, and wanted to start using scikit-learn's libsvm wrapper due to its csrmatrix support. I patched in the code in a matter of minutes, but quickly realised I had a big memory leak issue. After an afternoon of thinking it was my fault, then pulling out valgrind, I've found the following:
==13996== 310,293,560 bytes in 13,927 blocks are definitely lost in loss record 1,716 of 1,716
==13996== at 0x4C2779D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==13996== by 0x12AEDC28: csr_set_model (libsvm_sparse_helper.c:145)
==13996== by 0x12AF9B08: __pyx_pf_7sklearn_3svm_6sparse_6libsvm_1libsvm_sparse_predict (libsvm.c:3010)
==13996== by 0x49C32C: PyEval_EvalFrameEx (in /usr/bin/python2.6)
==13996== by 0x49D389: PyEval_EvalFrameEx (in /usr/bin/python2.6)
==13996== by 0x49D389: PyEval_EvalFrameEx (in /usr/bin/python2.6)
==13996== by 0x49D389: PyEval_EvalFrameEx (in /usr/bin/python2.6)
==13996== by 0x49DFDE: PyEval_EvalCodeEx (in /usr/bin/python2.6)
==13996== by 0x49C749: PyEval_EvalFrameEx (in /usr/bin/python2.6)
==13996== by 0x49D389: PyEval_EvalFrameEx (in /usr/bin/python2.6)
==13996== by 0x49DFDE: PyEval_EvalCodeEx (in /usr/bin/python2.6)
==13996== by 0x53072A: ??? (in /usr/bin/python2.6)
Line 145 in that file is:
if ((model->sv_coef[i] = malloc((model->l) \* sizeof(double))) == NULL)
So it seems these sv_coefs aren't getting freed. I'm not very intimate with libsvm's code so I thought I'd bring this to your attention first before trying to dig away any further at this issue.
Thanks,
Gabe",closed,,2011-09-28 19:00:17+00:00,2011-10-04 12:17:56+00:00,14,tehf0x,https://github.com/scikit-learn/scikit-learn/issues/367,1673,137.29416666666665
1768790,368,scikit-learn/scikit-learn,Failed to install sklearn 0.9 on Windows XP (py 2.7),"After installed the ms installer, there was a import error message come up when I tried to import sklearn package.
> > > import sklearn
> > > Traceback (most recent call last):
> > > File ""<stdin>"", line 1, in <module>
> > > File ""C:\Python27\lib\site-packages\scikit_learn-0.9-py2.7-win32.egg\sklearn__init__.py"", line 19, in <modu
> > > le>
> > > raise ImportError(""Please do not forget to run `make` first"")
> > > ImportError: Please do not forget to run `make` first",closed,,2011-09-28 21:22:40+00:00,2011-10-02 09:50:26+00:00,10,joeycn,https://github.com/scikit-learn/scikit-learn/issues/368,532,84.46277777777777
1772598,369,scikit-learn/scikit-learn,load_svmlight_file wastes too much memory,"When trying to load a 1.1GB dataset in svmlight format from kaggle.com `skearn.datasets.load_svmlight_file` is trying to allocate several times this amount as intermediate python lists before being killed by the OS.
IMHO: This code should be refactored as a two passes algorithm that counts the number of samples (for labels and indptr which has length n_samples + 1) and the total number of non-zero values (for data and indices) so as to pre-allocate them upfront and then to a second pass to actually fill the arrays with the values.
FYI the former C++ impl that has moved to https://github.com/mblondel/svmlight-loader loads the same dataset without wasting memory.",closed,,2011-09-29 07:50:07+00:00,2011-12-22 09:42:03+00:00,14,ogrisel,https://github.com/scikit-learn/scikit-learn/issues/369,713,2017.8655555555556
1805320,378,scikit-learn/scikit-learn,linear_model.LinearRegression attr. coef_ wrong shape,"Hi,
I tried to use sklearn.feature_selection.rfe.RFECV with linear_model.LinearRegression as an estimator and it doesn't work because the shape of the coef_ attribute is 1D (n,) when it should be (1,n).
From the documentation for RFECV, it says ""The first dimension of the coef_ array must be equal to the number of features of the input dataset of the estimator.""
When I use svm.SVR as the estimator, RFECV works, and coef_.shape = (1,n) so I think the shape of linear_model.LinearRegression.coef_ just needs to be changed",closed,,2011-10-03 18:46:41+00:00,2011-10-03 19:16:55+00:00,1,akeshavan,https://github.com/scikit-learn/scikit-learn/issues/378,583,0.5038888888888889
1805532,379,scikit-learn/scikit-learn,AttributeError with sparse SVC and OneVsRestClassifier,"```
>>> from sklearn.svm.sparse import SVC
>>> from sklearn.multiclass import OneVsRestClassifier
>>> c = OneVsRestClassifier(SVC())
>>> X = [[1,0,0],[0,1,0],[0,0,1],[1,0,1]]
>>> Y = [[1],[2],[3],[1,3]]
>>> c.fit(X,Y)
OneVsRestClassifier(estimator=SVC(C=1.0, coef0=0.0, degree=3, gamma=0.0, kernel='rbf', probability=False,
shrinking=True, tol=0.001))
>>> c.predict([[1,0,1]])
```
```
Traceback (most recent call last):
File ""<stdin>"", line 1, in <module>
File ""/usr/local/lib/python2.7/dist-packages/scikit_learn-0.10_git-py2.7-linux-i686.egg/sklearn/multiclass.py"", line 135, in predict
return predict_ovr(self.estimators_, self.label_binarizer_, X)
File ""/usr/local/lib/python2.7/dist-packages/scikit_learn-0.10_git-py2.7-linux-i686.egg/sklearn/multiclass.py"", line 66, in predict_ovr
Y = np.array([predict_binary(e, X) for e in estimators]).T
File ""/usr/local/lib/python2.7/dist-packages/scikit_learn-0.10_git-py2.7-linux-i686.egg/sklearn/multiclass.py"", line 40, in predict_binary
return np.ravel(estimator.decision_function(X))
File ""/usr/local/lib/python2.7/dist-packages/scikit_learn-0.10_git-py2.7-linux-i686.egg/sklearn/svm/base.py"", line 279, in decision_function
X, self.support_, self.support_vectors_, self.n_support_,
AttributeError: 'SVC' object has no attribute 'support_'
```
But using the sklearn.svm i have the result:
```
[(1, 3)]
```
Thanks.",closed,,2011-10-03 19:09:04+00:00,2011-10-09 02:30:21+00:00,1,diogojc,https://github.com/scikit-learn/scikit-learn/issues/379,1450,127.35472222222222
1813337,382,scikit-learn/scikit-learn,Enhancements to the tree module,"- Add sample weights to trees (for boosting DTs)
- support a loss matrix (ala R's rpart)
- <del>support multivariate regression (ala R's mvpart)
- <del>support Randomized Trees",closed,Enhancement,2011-10-04 13:07:24+00:00,2013-07-22 12:43:38+00:00,13,bdholt1,https://github.com/scikit-learn/scikit-learn/issues/382,208,15767.603888888889
1813493,384,scikit-learn/scikit-learn,doc building,"i was trying to build the docs for a clean tree branch that is not installed and it ran into an import error when trying to get the tree module. i don't know enough about the sphinx doc building process, but can we ensure that docs can be built perhaps with an inplace build of sklearn?",closed,,2011-10-04 13:28:08+00:00,2011-10-04 13:51:30+00:00,9,satra,https://github.com/scikit-learn/scikit-learn/issues/384,299,0.3894444444444444
1843038,387,scikit-learn/scikit-learn,Decision Tree Threshold Invalid (Due To Rounding?),"I have a problem with the 32 bit build of the master branch. I raised this issue in the decision tree pull request, but it has not been fully addressed. I use the following test case:
``` python
import pickle
import numpy as np
from sklearn.tree import DecisionTreeRegressor
np.seterr('raise','raise','raise','ignore','raise') #We are unforgiving!
features = np.array([[ 152.08097839, 140.40744019, 129.75102234,
159.90493774],
[ 142.50700378, 135.8193512, 117.82884979, 162.7578125 ],
[ 127.28772736, 140.40744019, 129.75102234, 159.90493774],
[ 132.37025452, 143.71923828, 138.35694885, 157.84558105],
[ 103.10237122, 143.71928406, 138.35696411, 157.84559631],
[ 127.71276855, 143.71923828, 138.35694885, 157.84558105],
[ 120.91514587, 140.40744019, 129.75102234, 159.90493774]])
labels = np.array([ 1., 0.70209277,0.53896582, 0., 0.90914464,
0.48026916, 0.49622521])
dt = DecisionTreeRegressor()
dt.fit(features,labels)
dt.fit(-features,labels)
```
The error message I receive is:
```
File ""test.py"", line 24, in <module>
dt.fit(-features,labels)
File ""/home/ts00051/data/dev/src/scikits-learn/sklearn/tree/tree.py"", line 284, in fit
sample_mask)
File ""/home/ts00051/data/dev/src/scikits-learn/sklearn/tree/tree.py"", line 203, in _build_tree
return recursive_partition(X, X_argsorted, y, sample_mask, 0)
File ""/home/ts00051/data/dev/src/scikits-learn/sklearn/tree/tree.py"", line 195, in recursive_partition
depth + 1)
File ""/home/ts00051/data/dev/src/scikits-learn/sklearn/tree/tree.py"", line 195, in recursive_partition
depth + 1)
File ""/home/ts00051/data/dev/src/scikits-learn/sklearn/tree/tree.py"", line 195, in recursive_partition
depth + 1)
File ""/home/ts00051/data/dev/src/scikits-learn/sklearn/tree/tree.py"", line 195, in recursive_partition
depth + 1)
File ""/home/ts00051/data/dev/src/scikits-learn/sklearn/tree/tree.py"", line 195, in recursive_partition
depth + 1)
File ""/home/ts00051/data/dev/src/scikits-learn/sklearn/tree/tree.py"", line 195, in recursive_partition
depth + 1)
File ""/home/ts00051/data/dev/src/scikits-learn/sklearn/tree/tree.py"", line 195, in recursive_partition
depth + 1)
File ""/home/ts00051/data/dev/src/scikits-learn/sklearn/tree/tree.py"", line 195, in recursive_partition
depth + 1)
File ""/home/ts00051/data/dev/src/scikits-learn/sklearn/tree/tree.py"", line 195, in recursive_partition
depth + 1)
File ""/home/ts00051/data/dev/src/scikits-learn/sklearn/tree/tree.py"", line 198, in recursive_partition
depth + 1)
File ""/home/ts00051/data/dev/src/scikits-learn/sklearn/tree/tree.py"", line 179, in recursive_partition
value = np.asanyarray(np.mean(current_y))
File ""/usr/lib/pymodules/python2.7/numpy/core/fromnumeric.py"", line 2341, in mean
return mean(axis, dtype, out)
FloatingPointError: invalid value encountered in divide
```
This is caused by an empty sample_mask, which is in turn caused by a threshold being rounded and making all the samples on one side of the split threshold. This doesn't seem to occur in 64 bit builds.
Modifying the threshold check from < to <= amounts to moving the threshold but this doesn't solve the underlying problem.
In my view, the problem is _find_best_split returns the threshold as a float, which can be numerically unstable. It should return the indices of the samples that are used to compute the threshold. We can then ensure at least one sample occurs on each side of the split. I will do a pull request shortly.",closed,,2011-10-07 12:36:06+00:00,2011-10-13 10:36:47+00:00,10,TimSC,https://github.com/scikit-learn/scikit-learn/issues/387,3588,142.0113888888889
1856148,388,scikit-learn/scikit-learn,implement (Linear)SVC predict and decision_function in pure Python,"`LinearSVC` and `SVC`'s `predict` and `decision_function` could easily be implemented in pure python.
Advantages:
- Reduce binding size
- Avoid the creation of liblinear and libsvm's internal models from numpy arrays / sparse matrices at each call
Disadvantage:
- Less memory efficient if `predict` is implemented as the argmax of `decision_function`
This should also solve the problem that `decision_function` is not implemented in `sparse.SVC`.
In any case, we should probably do a little benchmark to make sure we don't loose too much in runtime speed.",closed,"Enhancement, Moderate",2011-10-09 13:58:37+00:00,2018-04-01 11:42:38+00:00,7,mblondel,https://github.com/scikit-learn/scikit-learn/issues/388,626,56781.733611111114
1856294,389,scikit-learn/scikit-learn,implement predict_scores proposal,"`predict_scores` is a method to unify predict methods which output a score such as `decision_function`, `predict_proba`, etc. It should return a `[n_samples, n_classes]` array containing scores (the bigger, the more likely to choose the corresponding class).
The method signature should be `predict_scores(self, X, score=""margin|proba|log_proba|..."")` or maybe `predict_scores(self, X, score_func=""margin|proba|log_proba|..."")`.
TODO list (please comment):
- Add a `PredictorMixin` which implements `predict_scores` (just calling the underlying `decision_function`, `predict_proba`, etc if present and raising a `NotImplementedError` if not)
- Add `PredictorMixin` to objects which have a `decision_function` or a `predict_proba` method
- Currently, `decision_function` returns an array of shape `[n_samples, 1]` in the binary case. Break API to return `[n_samples, 2]` or handle `decision_function` separately in `PredictorMixin.predict_scores`. I suggest we create a new method `predict_margin` which is basically the same as `decision_function` but with the array shape fixed and deprecate `decision_function` (keep it for two releases).
- Override `predict_scores` in `KMeans` and other clustering modules to return the opposite of the distances to the clusters.
- Implement `predict_log_proba` as the log of `predict_proba` in `PredictorMixin` (?)
- Change `multiclass` module to internally use `predict_scores` (currently it looks for `decision_function` and `predict_proba`)
- Add `predict_scores` to the multiclass estimators. `OneVsOneClassifier` and `OutputCodeClassifier` will need to override `predict_scores`
Probably a good candidate for the next sprint.",closed,"New Feature, API",2011-10-09 14:32:26+00:00,2015-08-29 12:44:50+00:00,30,mblondel,https://github.com/scikit-learn/scikit-learn/issues/389,1705,34078.206666666665
1863729,390,scikit-learn/scikit-learn,cluster.Ward crashes with empty heap,"The fit method of the Ward class crashes frequently for me with an IndexError (due to exhausting the heap used internally in the ward_tree)
The following minimalistic test case reproduces the problem:
```
import numpy
from sklearn.neighbors import kneighbors_graph
from sklearn.cluster import Ward
data = map(eval, ['(0.0140, 0.1020)', '(0.0141, 0.0997)', '(0.0142, 0.0967)',
'(0.0142, 0.0951)', '(0.0141, 0.0954)', '(0.0139, 0.0961)',
'(0.0134, 0.0974)', '(0.0124, 0.0991)', '(0.0111, 0.1012)',
'(0.0094, 0.1035)', '(0.0074, 0.1052)', '(0.0057, 0.1044)',
'(0.0039, 0.1033)', '(0.0018, 0.1017)', '(-0.0005, 0.0996)',
'(-0.0030, 0.0973)', '(-0.0055, 0.0951)', '(-0.0076, 0.0952)',
'(-0.0094, 0.0959)', '(-0.0106, 0.0975)', '(-0.0111, 0.0999)',
'(-0.0107, 0.1034)', '(-0.0094, 0.1048)', '(-0.0076, 0.1047)',
'(-0.0053, 0.1053)', '(-0.0028, 0.1053)', '(-0.0001, 0.1053)',
'(0.0026, 0.1053)', '(0.0055, 0.1053)', '(0.0086, 0.1053)',
'(0.0121, 0.1053)', '(0.0161, 0.1053)', '(0.0164, 0.1051)',
'(0.0158, 0.1053)', '(0.0161, 0.1053)', '(0.0168, 0.1053)',
'(0.0167, 0.1053)', '(0.0167, 0.1053)', '(0.0167, 0.1053)',
'(0.0167, 0.1053)', '(0.0167, 0.1053)', '(0.0167, 0.1053)',
'(0.0167, 0.1053)', '(0.0167, 0.1053)', '(0.0168, 0.1053)',
'(0.0168, 0.1053)', '(0.0168, 0.1053)', '(0.0168, 0.1053)',
'(0.0168, 0.1053)', '(0.0168, 0.1053)', '(0.0168, 0.1053)',
'(0.0168, 0.1052)', '(0.0168, 0.1049)', '(0.0168, 0.1044)',
'(0.0168, 0.1037)', '(0.0168, 0.1027)', '(0.0168, 0.1012)',
'(0.0168, 0.0994)', '(0.0168, 0.0971)', '(0.0168, 0.0951)',
'(0.0168, 0.0951)', '(0.0168, 0.0952)', '(0.0168, 0.0955)',
'(0.0168, 0.0964)', '(0.0168, 0.0979)', '(0.0165, 0.1002)',
'(0.0159, 0.1032)', '(0.0154, 0.1049)', '(0.0147, 0.1046)',
'(0.0138, 0.1051)', '(0.0126, 0.1053)', '(0.0112, 0.1054)',
'(0.0097, 0.1053)', '(0.0079, 0.1053)', '(0.0060, 0.1053)',
'(0.0040, 0.1053)', '(0.0020, 0.1053)', '(-0.0002, 0.1053)',
'(-0.0026, 0.1053)', '(-0.0051, 0.1053)', '(-0.0077, 0.1053)',
'(-0.0104, 0.1053)', '(-0.0132, 0.1053)', '(-0.0160, 0.1053)',
'(-0.0187, 0.1053)', '(-0.0212, 0.1054)', '(-0.0239, 0.1053)',
'(-0.0267, 0.1054)', '(-0.0296, 0.1054)', '(-0.0327, 0.1054)',
'(-0.0360, 0.1054)', '(-0.0398, 0.1054)', '(-0.0441, 0.1054)',
'(-0.0486, 0.1054)', '(-0.0533, 0.1054)', '(-0.0584, 0.1054)',
'(-0.0601, 0.1053)', '(-0.0602, 0.1054)', '(-0.0600, 0.1053)',
'(-0.0596, 0.1054)'])
X = numpy.array(data)
connectivity = kneighbors_graph(X, n_neighbors=10)
ward = Ward(n_clusters=4, connectivity=connectivity).fit(X)
labeling = ward.labels_
import pylab
for l in numpy.unique(labeling):
pylab.plot(X[labeling == l, 0],
X[labeling == l, 1],
'o', color=pylab.cm.jet(float(l) / numpy.max(labeling + 1)))
pylab.scatter(X[:,0], X[:,1], )
pylab.show()
```
The traceback is:
```
Traceback (most recent call last):
File ""minimal_error.py"", line 42, in <module>
ward = Ward(n_clusters=4, connectivity=connectivity).fit(X)
File ""/usr/local/lib/python2.6/dist-packages/scikit_learn-0.9-py2.6-linux-x86_64.egg/sklearn/cluster/hierarchical.py"", line 314, in fit
n_components=self.n_components, copy=self.copy)
File ""/usr/local/lib/python2.6/dist-packages/scikit_learn-0.9-py2.6-linux-x86_64.egg/sklearn/cluster/hierarchical.py"", line 135, in ward_tree
node = heapq.heappop(inertia)
IndexError: index out of range
```
The problem does not occur for a more densely connected neighbor graph (e.g. kneighbors_graph(X, n_neighbors=20)). An easy fix for the problem would be to replace in hierarchical.py:
```
# identify the merge
while True:
node = heapq.heappop(inertia)
i, j = node[1], node[2]
if used_node[i] and used_node[j]:
break
```
with:
```
# identify the merge
while len(inertia) > 0:
node = heapq.heappop(inertia)
i, j = node[1], node[2]
if used_node[i] and used_node[j]:
break
if len(inertia) == 0: break
```
However, I am not sure if there is not a more subtle problem in the implementation - should it be possible that the heap gets exhausted before the merging is finished?",closed,,2011-10-10 12:47:37+00:00,2011-10-12 07:51:29+00:00,5,jmetzen,https://github.com/scikit-learn/scikit-learn/issues/390,4751,43.06444444444445
1888434,392,scikit-learn/scikit-learn,supplying a matrix (as opposed to an array) to clustering algorithms will fail on normsquared computations,"I have noticed in many places to calculate the square of an array the following idiom is used:
a **= 2
this will fail if a is a matrix, more robust (in this case) is to use:
np.exp2(a)
but when calculating sums worse occurs for matrices:
np.sum(a, axis=1).shape != np.sum(m, axis=1)
this breaks (at least) the euclideanmetric which expects (1, n) shaped normsquares
So none of this is matrix safe. Are matrices not then array-like?",closed,,2011-10-12 15:24:00+00:00,2012-01-06 11:15:52+00:00,12,biolauncher,https://github.com/scikit-learn/scikit-learn/issues/392,545,2059.8644444444444
1888929,393,scikit-learn/scikit-learn,DPGMM and VBGMM clustering weights not updating,"When trying to cluster the old faithful data set from [1] and the data set from [2] both the DPGMM and VBGMM are unable to find a suitable fit. It looks as if the component weights are not updating properly as they remain at 1/K after fitting the model. I've attached an example script which contains 2 example data sets where this problem is displayed.
Tar file including script, data and an example figure:
http://www.sendspace.com/file/vyecbg
[1] Old faithful dataset: http://research.microsoft.com/en-us/um/people/cmbishop/prml/webdatasets/datasets.htm
[2] Figueiredo and Jain, Unsupervised Learning of Finite Mixture Models, PAMI 2002
Thanks,
Martin",closed,Bug,2011-10-12 16:07:59+00:00,2013-01-17 16:43:13+00:00,17,mfergie,https://github.com/scikit-learn/scikit-learn/issues/393,705,11112.587222222222
1890823,394,scikit-learn/scikit-learn,inconsist prediction from SVC in predict and predict_proba,"Using the same set of training data and parameters (C, gamma, etc), I trained a SVM with probability=False, and the other SVM with probability=True. Then I test both SVM model on the same test data, the output of these two SVM models are inconsistent, see the following output:
0.0 [ 0.81541963 0.18458037]
1.0 [ 0.73578213 0.26421787]
1.0 [ 0.74575504 0.25424496]
0.0 [ 0.92760444 0.07239556]
0.0 [ 0.86043918 0.13956082]
1.0 [ 0.69725339 0.30274661]
0.0 [ 0.81678065 0.18321935]
...
In the above results, the first column is the binary output from the SVM with probability=False, the same column enclosed by square parenthesis is the probabilistic outputs from the SVM with probability=True. If the first column in the square parenthesis is the probability for class 0, and the second column for class 1; this assumption is supported by row 1 but not true in row 2,3,etc.
Does anybody know what is the problem?",closed,,2011-10-12 18:53:12+00:00,2011-10-12 19:53:10+00:00,2,dawnrain,https://github.com/scikit-learn/scikit-learn/issues/394,983,0.9994444444444445
1922616,395,scikit-learn/scikit-learn,"Python 3 build fails on ""ValueError: 'scikits/learn' is not a directory""","I'm trying to do ""python setup.py build""
My configuration:
python 3.1.2
numpy revision 1dc1877
scipy revision 37d1c4b
scikit-learn revision f366d52",closed,,2011-10-16 18:05:58+00:00,2011-10-17 10:42:22+00:00,3,aksarkar,https://github.com/scikit-learn/scikit-learn/issues/395,221,16.606666666666666
1929334,397,scikit-learn/scikit-learn,"""ImportError: No module named supervised"" when trying to import sklearn in python3","> > > import sklearn
> > > Traceback (most recent call last):
> > > File ""<stdin>"", line 1, in <module>
> > > File ""/home/unix/aksarkar/.local/lib/python3.1/site-packages/scikit_learn-0.10_git-py3.1-linux-x86_64.egg/sklearn/**init**.py"", line 32, in <module>
> > > from .base import clone
> > > File ""/home/unix/aksarkar/.local/lib/python3.1/site-packages/scikit_learn-0.10_git-py3.1-linux-x86_64.egg/sklearn/base.py"", line 11, in <module>
> > > from .metrics import r2_score
> > > File ""/home/unix/aksarkar/.local/lib/python3.1/site-packages/scikit_learn-0.10_git-py3.1-linux-x86_64.egg/sklearn/metrics/**init**.py"", line 12, in <module>
> > > from . import cluster
> > > File ""/home/unix/aksarkar/.local/lib/python3.1/site-packages/scikit_learn-0.10_git-py3.1-linux-x86_64.egg/sklearn/metrics/cluster/**init**.py"", line 8, in <module>
> > > from supervised import (homogeneity_completeness_v_measure,
> > > ImportError: No module named supervised
My configuration:
python 3.1.2
numpy revision 1dc1877
scipy revision 37d1c4b
scikit-learn revision fe4c258",closed,,2011-10-17 14:54:47+00:00,2011-10-17 15:13:34+00:00,2,aksarkar,https://github.com/scikit-learn/scikit-learn/issues/397,1165,0.31305555555555553
1936268,399,scikit-learn/scikit-learn,Bayesian priors in nearest neighbors classification/regression,"Currently the classification and regression algorithms in the `neighbors` module use a flat prior. They should be modified to compute a prior based on training data, and to optionally accept a user-defined prior.",open,"New Feature, module:neighbors",2011-10-18 04:47:19+00:00,,7,jakevdp,https://github.com/scikit-learn/scikit-learn/issues/399,276,
1950478,401,scikit-learn/scikit-learn,broken doctests in tutorial.rst,"on somewhat current master and I believe on 0.9:
```
$> PYTHONPATH=$PWD/.. /usr/bin/nosetests --with-doctest --doctest-extension=rst ../doc/
/usr/bin/nosetests:5: UserWarning: Module paste was already imported from None, but /usr/lib/python2.6/dist-packages is being added to sys.path
from pkg_resources import load_entry_point
F
======================================================================
FAIL: Doctest: tutorial.rst
----------------------------------------------------------------------
Traceback (most recent call last):
File ""/usr/lib/python2.6/doctest.py"", line 2163, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for tutorial.rst
File ""/home/yoh/deb/gits/scikit-learn/doc/tutorial.rst"", line 0
----------------------------------------------------------------------
File ""/home/yoh/deb/gits/scikit-learn/doc/tutorial.rst"", line 154, in tutorial.rst
Failed example:
clf.fit(digits.data[:-1], digits.target[:-1])
Expected:
SVC(kernel='rbf', C=1.0, probability=False, degree=3, coef0=0.0, tol=0.001,
cache_size=100.0, shrinking=True, gamma=0.000556792873051)
Got:
SVC(C=1.0, coef0=0.0, degree=3, gamma=0.015625, kernel='rbf',
probability=False, shrinking=True, tol=0.001)
----------------------------------------------------------------------
File ""/home/yoh/deb/gits/scikit-learn/doc/tutorial.rst"", line 162, in tutorial.rst
Failed example:
clf.predict(digits.data[-1])
Expected:
array([ 8.])
Got:
array([ 5.])
----------------------------------------------------------------------
File ""/home/yoh/deb/gits/scikit-learn/doc/tutorial.rst"", line 189, in tutorial.rst
Failed example:
clf.fit(X, y)
Expected:
SVC(kernel='rbf', C=1.0, probability=False, degree=3, coef0=0.0, tol=0.001,
cache_size=100.0, shrinking=True, gamma=0.00666666666667)
Got:
SVC(C=1.0, coef0=0.0, degree=3, gamma=0.25, kernel='rbf', probability=False,
shrinking=True, tol=0.001)
----------------------------------------------------------------------
Ran 1 test in 2.205s
FAILED (failures=1)
(git)novo:~deb/scikit-learn[master]build
$> git describe
0.4-5055-gd9acd6c
```",closed,,2011-10-18 15:36:59+00:00,2011-10-22 15:39:46+00:00,3,yarikoptic,https://github.com/scikit-learn/scikit-learn/issues/401,2226,96.04638888888888
1995271,403,scikit-learn/scikit-learn,Inconsistent behavior of OMP,"The OMP implementation sklearn.linear_model.orthogonal_mp sometimes produces inconsistent results compared to a naive implementation of the algorithm.
The following code has a particular dictionary and signal where the naive implementation is able to estimate the right solution, but sklearn.linear_model.orthogonal_mp does not.
https://gist.github.com/1298690",closed,,2011-10-19 15:48:29+00:00,2011-10-22 14:24:12+00:00,1,aweinstein,https://github.com/scikit-learn/scikit-learn/issues/403,392,70.59527777777778
2005015,406,scikit-learn/scikit-learn,factorize common tests,"**Easy:**
- in test_common, check that the ValueError raise has a useful error message. (see sparse test for an example)
- put as many of the ""specific"" tests in test_clustering, test_transformers, ... into test_non_meta_estimators.
**Not so easy:**
- calling `fit` forgets the previous model if any
- ~~check how classifiers handle only one class being present~~
- ~~test how models handle non-float input (does uint8 cause overflows?)~~
**Things done**
We should factorize common tests in a new file `test_common.py` (or maybe `test_input.py`?). Things to check:
- ~~can pickle the object~~
- ~~raise an exception when data contains nans~~
- ~~raise an exception for invalid input (e.g., `np.matrix` or `sp.csr_matrix` if dense only implementation)~~
- ~~raise an exception if `n_features` is not the same in `fit` and `predict` or `transform`~~
- ~~`__repr__` and `clone` work~~
- ~~check that we can pickle and unpickle estimators.~~
- ~~check that all classifiers have a `classes_` attribute (needs some fixes)~~
---
Edit by @amueller!
Edit by @GaelVaroquaux on Aug 13th 2014 to reflect progress in the codebase.",closed,"Easy, Enhancement",2011-10-20 14:05:17+00:00,2015-09-11 19:57:07+00:00,19,mblondel,https://github.com/scikit-learn/scikit-learn/issues/406,1147,34133.86388888889
2007123,409,scikit-learn/scikit-learn,sample_weight feature in LinearSVC (BaseLibLinear/SparseBaseLibLinear)),"Currently, there does not seem to be a way to specify sample_weights when using svm.LinearSVC or svm.sparse.LinearSVC.
Can that feature be implemented? or Is there an existing way to do that?
libsvm contains the feature in http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/#weights_for_data_instances",closed,,2011-10-20 17:22:17+00:00,2016-10-27 20:09:38+00:00,11,aabbi,https://github.com/scikit-learn/scikit-learn/issues/409,369,44018.78916666667
2017440,411,scikit-learn/scikit-learn,permutation_test_score possibly broken,"if i run the following the permutation_test_score call will fail. looking at the code, the two internal functions _cross_val_score and _permutation_test_score are rather different and it doesn't seem like they have to be. but before i do any mods, i thought i would check.
```
from sklearn.cross_validation import cross_val_score
from sklearn.linear_model import LinearRegression
import numpy as np
from sklearn.cross_validation import KFold
X = np.random.rand(10,5)
y = np.random.rand(10,1)
from sklearn.metrics import mean_square_error
cross_val_score(LinearRegression(), X, y, mean_square_error, KFold(10, 5))
from sklearn.cross_validation import permutation_test_score
permutation_test_score(LinearRegression(), X, y, mean_square_error, KFold(10, 5))
```",closed,,2011-10-21 16:59:23+00:00,2011-10-22 09:45:17+00:00,7,satra,https://github.com/scikit-learn/scikit-learn/issues/411,798,16.765
2045247,416,scikit-learn/scikit-learn,Covariance estimators handle 1-d input in an inconsistent way,"The covariance estimators such as `sklearn.covariance.EmpiricalCovariance` handle 1-d input in an inconsistent way: they assume a 1-d array is a list of univariate samples rather than a single, multivariate sample. Since this behavior is not documented, but makes the code harder to follow, I suggest we get rid of this feature.",closed,,2011-10-25 14:04:47+00:00,2012-06-05 21:11:37+00:00,9,larsmans,https://github.com/scikit-learn/scikit-learn/issues/416,390,5383.113888888889
2098134,419,scikit-learn/scikit-learn,Better SVR parameter error messages,"Setting eps<0 in SVR raises the Value Error ""p<0"".
Took me some time to find that.
The error message is in svm.c and I hesitated to change it in there.
Should the error be caught in the calling python function?",closed,,2011-10-31 15:32:53+00:00,2011-11-05 21:41:19+00:00,2,amueller,https://github.com/scikit-learn/scikit-learn/issues/419,246,126.14055555555555
2113662,420,scikit-learn/scikit-learn,bug in preprocessing.scale(),"error with shortcut operator '-='
line
https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/preprocessing/__init__.py#L87
should probably be changed to
> > > Xr
> > > array([[0, 9, 8],
> > > [0, 0, 0]])
> > > mean
> > > array([ 0. , 4.5, 4. ])
> > > Xr-mean
> > > array([[ 0. , 4.5, 4. ],
> > > [ 0. , -4.5, -4. ]])
> > > Xr-=mean
> > > Xr
> > > array([[ 0, 4, 4],
> > > [ 0, -4, -4]])",closed,,2011-11-01 18:49:02+00:00,2011-11-02 07:38:10+00:00,4,dmaniloff,https://github.com/scikit-learn/scikit-learn/issues/420,456,12.818888888888889
2113867,421,scikit-learn/scikit-learn,bug in preprocessing.normalize(),"line:
https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/preprocessing/__init__.py#L264
should probably be changed to:
X = X / norms
---
seems that coercion does not work the same way with the shortcut opertators (X.dype=='int32', norms.dtype=='float64')",closed,,2011-11-01 19:09:02+00:00,2011-11-02 07:38:08+00:00,7,dmaniloff,https://github.com/scikit-learn/scikit-learn/issues/421,303,12.485
2155480,426,scikit-learn/scikit-learn,remove resize from libsvm sparse bindings,,closed,,2011-11-06 09:29:34+00:00,2011-11-07 14:06:16+00:00,1,fabianp,https://github.com/scikit-learn/scikit-learn/issues/426,42,28.611666666666668
2178850,433,scikit-learn/scikit-learn,build issues,"Hi all,
I tried to install scikit-learn on my Mac with Lion 10.7.2 (Python 2.7, numpy 1.6.1). At first I tried easy_install and got scikit-0.9 but cannot import due to some 'Don't forget to 'make' first' error and then I searched online, finding that this issue should be fixed in the newer version in github. So I checked out the code and build from source using the following two commands:
python setup.py build
sudo python setup.py install
Now I've got scikit-0.10 in /Library/Python/2.7/site-packages. However, when I tried to run the tests, similar error shows up:
Traceback (most recent call last):
File ""<string>"", line 1, in <module>
File ""sklearn/**init**.py"", line 30, in <module>
"""""" % e)
ImportError: No module named _check_build
---
It seems that the scikit-learn has not been built correctly.
If you have installed the scikit-learn from source, please do not forget
to build the package before using it: run `python setup.py install` or
`make` in the source directory.
If you have used an installer, please check that it is suited for your
Python version, your operating system and your platform.
I didn't see errors in my build and build is finished with 'running scons'. I don't know where I am doing wrong. If you need to know more, please let me know. Any help would be very appreciated. Thanks!",closed,,2011-11-08 20:16:47+00:00,2011-11-08 22:03:25+00:00,14,dawenl,https://github.com/scikit-learn/scikit-learn/issues/433,1343,1.7772222222222223
2178863,434,scikit-learn/scikit-learn,building issues,"Hi all,
I tried to install scikit-learn on my Mac with Lion 10.7.2 (Python 2.7, numpy 1.6.1). At first I tried easy_install and got scikit-0.9 but cannot import due to some 'Don't forget to 'make' first' error and then I searched online, finding that this issue should be fixed in the newer version in github. So I checked out the code and build from source using the following two commands:
python setup.py build
sudo python setup.py install
Now I've got scikit-0.10 in /Library/Python/2.7/site-packages. However, when I tried to run the tests, similar error shows up:
Traceback (most recent call last):
File ""<string>"", line 1, in <module>
File ""sklearn/**init**.py"", line 30, in <module>
"""""" % e)
ImportError: No module named _check_build
---
It seems that the scikit-learn has not been built correctly.
If you have installed the scikit-learn from source, please do not forget
to build the package before using it: run `python setup.py install` or
`make` in the source directory.
If you have used an installer, please check that it is suited for your
Python version, your operating system and your platform.
I didn't see errors in my build and build is finished with 'running scons'. I don't know where I am doing wrong. If you need to know more, please let me know. Any help would be very appreciated. Thanks!",closed,,2011-11-08 20:17:42+00:00,2011-11-08 20:45:45+00:00,2,dawenl,https://github.com/scikit-learn/scikit-learn/issues/434,1346,0.4675
2181668,435,scikit-learn/scikit-learn,Segmentation fault while running sklearn.test(),"Hi all,
Thanks to the help this afternoon, I finally got sklearn working with my test logistic regression. However, while I run the test, I got the segmentation fault at last, here is the output (very long), it seems to me that something is not implemented yet and not sure if that's the cause of the error:
```
Running unit tests and doctests for sklearn
NumPy version 2.0.0.dev-7297785
NumPy is installed in /Library/Python/2.7/site-packages/numpy-2.0.0.dev_7297785_20111104-py2.7-macosx-10.7-x86_64.egg/numpy
Python version 2.7.1 (r271:86832, Jun 16 2011, 16:59:05) [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)]
nose version 1.1.2
/Library/Python/2.7/site-packages/scikit_learn-0.10_git-py2.7-macosx-10.7-intel.egg/sklearn/cross_val.py:2: UserWarning: sklearn.cross_val namespace is deprecated in version 0.9 and will be removed in version 0.11. Please use sklearn.cross_validation instead.
warnings.warn('sklearn.cross_val namespace is deprecated in version 0.9'
/Library/Python/2.7/site-packages/scikit_learn-0.10_git-py2.7-macosx-10.7-intel.egg/sklearn/hmm.py:16: UserWarning: sklearn.hmm is orphaned, undocumented and has known numerical stability issues. If nobody volunteers to write documentation and make it more stable, this module will be removed in version 0.11.
warnings.warn('sklearn.hmm is orphaned, undocumented and has known numerical'
.........../Library/Python/2.7/site-packages/scikit_learn-0.10_git-py2.7-macosx-10.7-intel.egg/sklearn/neighbors/base.py:23: UserWarning: kneighbors: neighbor k+1 and neighbor k have the same distance: results will be dependent on data order.
warnings.warn(msg)
......../Library/Python/2.7/site-packages/scikit_learn-0.10_git-py2.7-macosx-10.7-intel.egg/sklearn/cluster/k_means_.py:219: UserWarning: Explicit initial center position passed: performing only one init in the k-means
warnings.warn('Explicit initial center position passed: '
.............../Library/Python/2.7/site-packages/scikit_learn-0.10_git-py2.7-macosx-10.7-intel.egg/sklearn/cluster/spectral.py:77: UserWarning: pyamg not available, using scipy.sparse
warnings.warn('pyamg not available, using scipy.sparse')
.S...................S.S.........................FFF............/Library/Python/2.7/site-packages/scikit_learn-0.10_git-py2.7-macosx-10.7-intel.egg/sklearn/decomposition/fastica_.py:199: UserWarning: Please note: the interface of fastica has changed: X is now assumed to be of shape [n_samples, n_features]
warnings.warn(""Please note: the interface of fastica has changed: ""
..................../Library/Python/2.7/site-packages/scikit_learn-0.10_git-py2.7-macosx-10.7-intel.egg/sklearn/decomposition/nmf.py:237: UserWarning: Iteration limit reached in nls subproblem.
warnings.warn(""Iteration limit reached in nls subproblem."")
.................../Library/Python/2.7/site-packages/scikit_learn-0.10_git-py2.7-macosx-10.7-intel.egg/sklearn/decomposition/sparse_pca.py:146: RuntimeWarning: invalid value encountered in divide
U /= np.sqrt((U ** 2).sum(axis=0))
......................./Library/Python/2.7/site-packages/scikit_learn-0.10_git-py2.7-macosx-10.7-intel.egg/sklearn/externals/joblib/test/test_func_inspect.py:101: UserWarning: Cannot inspect object <functools.partial object at 0x103a760a8>, ignore list will not work.
nose.tools.assert_equal(filter_args(ff, ['y'], 1),
........................................................................................________________________________________________________________________________
test_memory setup
________________________________________________________________________________
________________________________________________________________________________
test_memory teardown
________________________________________________________________________________
..________________________________________________________________________________
test_memory setup
________________________________________________________________________________
......................................................................................................................________________________________________________________________________________
test_memory teardown
________________________________________________________________________________
.________________________________________________________________________________
setup numpy_pickle
________________________________________________________________________________
.......................................Failed to save <class 'numpy.ma.core.MaskedArray'> to .npy file:
Traceback (most recent call last):
File ""/Library/Python/2.7/site-packages/scikit_learn-0.10_git-py2.7-macosx-10.7-intel.egg/sklearn/externals/joblib/numpy_pickle.py"", line 62, in save
self.np.save(filename, obj)
File ""/Library/Python/2.7/site-packages/numpy-2.0.0.dev_7297785_20111104-py2.7-macosx-10.7-x86_64.egg/numpy/lib/npyio.py"", line 434, in save
format.write_array(fid, arr)
File ""/Library/Python/2.7/site-packages/numpy-2.0.0.dev_7297785_20111104-py2.7-macosx-10.7-x86_64.egg/numpy/lib/format.py"", line 409, in write_array
array.tofile(fp)
File ""/Library/Python/2.7/site-packages/numpy-2.0.0.dev_7297785_20111104-py2.7-macosx-10.7-x86_64.egg/numpy/ma/core.py"", line 5380, in tofile
raise NotImplementedError(""Not implemented yet, sorry..."")
NotImplementedError: Not implemented yet, sorry...
.________________________________________________________________________________
teardown numpy_pickle
________________________________________________________________________________
...............E..................................F................/Library/Python/2.7/site-packages/scikit_learn-0.10_git-py2.7-macosx-10.7-intel.egg/sklearn/linear_model/least_angle.py:218: RuntimeWarning: invalid value encountered in divide
z = -coefs[n_iter, active] / least_squares
....Segmentation fault: 11
```
Any help will be appreciated. Thanks!",closed,,2011-11-09 00:51:16+00:00,2011-11-09 18:20:02+00:00,8,dawenl,https://github.com/scikit-learn/scikit-learn/issues/435,5994,17.479444444444443
2210625,437,scikit-learn/scikit-learn,Document datasets API,Document the API of the toy dataset classes in sklearn.datasets.,closed,,2011-11-11 16:00:00+00:00,2011-12-19 16:34:28+00:00,1,amueller,https://github.com/scikit-learn/scikit-learn/issues/437,86,912.5744444444445
2231305,441,scikit-learn/scikit-learn,SGDClassifier can't be cloned due to rho parameter fiddling,"This is part of a traceback I got today:
```
File ""/scratch/lars/apps/src/scikit-learn/sklearn/grid_search.py"", line 346, in fit
best_estimator = clone(best_estimator)
File ""/scratch/lars/apps/src/scikit-learn/sklearn/base.py"", line 73, in clone
'seem to set parameter %s' % (estimator, name)
AssertionError: Cannot clone object SGDClassifier(alpha=0.001, class_weight=None, eta0=0.0, fit_intercept=True,
learning_rate=optimal, loss=hinge, n_iter=20, n_jobs=1, penalty=l2,
power_t=0.5, rho=0.85, seed=0, shuffle=False, verbose=0), as the constructor does not seem to set parameter rho
```
This seems to be caused by `BaseSGD._set_penalty_type`, which resets `self.rho` when L1 or L2 (as opposed to e-net) penalties are used. I'm not sure what would be the proper fix. My workaround is to always use an e-net penalty.",closed,,2011-11-14 15:04:25+00:00,2011-12-09 11:01:01+00:00,7,larsmans,https://github.com/scikit-learn/scikit-learn/issues/441,904,595.9433333333334
2238392,442,scikit-learn/scikit-learn,Add Gaussian kernel to mean shift clustering,"# Motivation
Currently the mean shift clustering uses a flat kernel.
While this is quick and simple, there are some disadvantages. There is no guarantee that the center will be the densest part a flat kernel---it might be that the center is sparse and that a single kernel covers the centers of two or more clusters at its periphery (If you mess around a bit with the test case by changing the bandwidth or seeding method, this disturbing behavior comes out---the center of the found clusters are in fact _between_ the true cluster centers).
I propose that we should also implement a Gaussian kernel because such a kernel would prefer to have dense regions near the center (and this is a common kernel in the literature). The bandwidth parameter would act as the standard deviation for the gaussian kernel. I propose that we use the same standard deviation in all dimensions (just as we used the same radius in all dimensions for the flat kernel).
# Efficiency considerations
The flat kernel is efficient because only points with a certain radius (specified by the bandwidth parameter) are relevant for the mean shift calculation. These points can be efficiently looked up from the larger dataset using the BallTree.
In theory, each time we update a Gaussian kernel we should also consider _all_ points in the dataset, but in practice the method may work well if we ignore all points beyond some distance--let's call this the ""cutoff distance"". Given that we expect over 99% of points to fall within three standard deviations of the center of a gaussian distribution, perhaps we could set this cutoff to 3X the bandwidth.",open,"New Feature, module:cluster",2011-11-15 00:16:30+00:00,,16,conradlee,https://github.com/scikit-learn/scikit-learn/issues/442,1676,
2254049,445,scikit-learn/scikit-learn,Segmentation faults in tests on Mac OS X 10.7,"Hi all,
I am getting segfaults when running the test suite. Specifically, they occur in the manifold module.
Furthermore, all of the examples in that module end in segfaults.
I am using Mac OS X Lion 10.7,
the latest scipy superpack (superpack_10.7_2011.11.04.sh)
gcc version i686-apple-darwin11-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
I use the following flags:
declare -x CC=""gcc-4.2""
declare -x CXX=""g++-4.2""
declare -x FFLAGS=""-ff2c""
Maybe I should try with different permutations of these flags.
I have to mention that I have a failing numpy test (tests polyfit) and a lot of failing scipy tests (specifically all the ones related to symmetric arpack modes). Detailed version and output is in this pastebin:
http://pastebin.com/Dm1dwsUt",closed,,2011-11-16 08:55:25+00:00,2011-11-17 09:14:15+00:00,6,vene,https://github.com/scikit-learn/scikit-learn/issues/445,808,24.31388888888889
2338698,449,scikit-learn/scikit-learn,add more tests for nu SVC and SVR,"More tests need to be added for the nu variants of SVC and SVR. In particular, we should test the estimators when a non-default value is passed as parameter for C or nu.",closed,,2011-11-24 08:58:59+00:00,2012-01-04 21:37:12+00:00,6,mblondel,https://github.com/scikit-learn/scikit-learn/issues/449,203,996.6369444444445
2342345,450,scikit-learn/scikit-learn,Enabling Grid Search using AUC,"Grid search is currently not possible with auc score since fit_grid_point calls ""predict"" on the classifier.",closed,New Feature,2011-11-24 15:18:57+00:00,2013-02-03 16:17:34+00:00,6,amueller,https://github.com/scikit-learn/scikit-learn/issues/450,139,10488.976944444445
2347358,451,scikit-learn/scikit-learn,random assignments based init in k-means,"Currently, `KMeans` supports mainly two types of initializations:
- kmeans++
- select training points at random
Another strategy we could add is to generate the initial cluster assignments randomly and take the averages of the points in each cluster as initial clusters. I must admit I don't know how well it works in practice but it seems easy to implement and could potentially be useful to some users.",closed,,2011-11-25 08:17:00+00:00,2011-11-27 16:50:52+00:00,2,mblondel,https://github.com/scikit-learn/scikit-learn/issues/451,446,56.56444444444445
2452322,454,scikit-learn/scikit-learn,mclust for gmm,"MCLUST (http://www.stat.washington.edu/mclust/) is the standard package for mixture modeling in the stats world. essentially, it is doing model based clustering as described in Fraley and Raftery, 2002 (www.stat.washington.edu/raftery/Research/PDF/fraley2002.pdf). this means gaussian mixture modeling, essentially. it has a number of choices for regularizing the covariance matrix. it then uses BIC to choose. the current implementation of gmm in sklearn has several of these options (full, diag, tied, spherical), but that is only about half the options in MCLUST. and then while i see BIC is implemented for LassoLars, it seems to be tied to that.
so, i wonder whether there are plans to:
1) update gmm.py to include other versions of covariance regularization
2) update model selection to include BIC generally (i couldn't find the src for the BIC implementation, so i can't tell how BIC is implemented now).
if no plans exist, i might fork. PyMix has some model selection using BIC (http://pymix.org/docu/mixture-pysrc.html#modelSelection), so some of that code could be borrowed.....
thanks all for building such useful stuff!",open,"Enhancement, module:mixture",2011-12-05 17:54:45+00:00,,18,jovo,https://github.com/scikit-learn/scikit-learn/issues/454,1158,
2533088,462,scikit-learn/scikit-learn,univariate_selection.py:92: RuntimeWarning: invalid value encountered in divide f = msb / msw,"Long story, but I kept getting errors on the AWS MapReduce cluster saying the jobs failed... right starting today...
And the error message I got from the console was this
```
univariate_selection.py:92: RuntimeWarning: invalid value encountered in divide f = msb / msw
```
This doesn't happen every time... I guess it's because I was randomly sampling the data...
Also, something strange is that this only happens on the cluster (debian lenny, I manually installed python2.7.2 from source, and numpy 1.6.1, scipy.0.10.0, and the latest source from the trunk for scikit-learn), and I haven't been able to reproduce this on my dev machine (i.e., Mac Lion, used fink to install python and other dependencies...)
What could be the issue?
Thanks,
Jiang",closed,,2011-12-13 05:25:08+00:00,2011-12-18 12:21:40+00:00,19,h0cked,https://github.com/scikit-learn/scikit-learn/issues/462,851,126.94222222222223
2592923,470,scikit-learn/scikit-learn,LogisticRegression and LinearSVC should have read-write coef_ and intercept_ attributes,"As reported on this [stackoverflow question](http://stackoverflow.com/questions/8539141/sklearn-scikit-learn-logistic-regression-package-set-trained-coefficients-f/8551193#8551193) the current implementation of liblinear models is using a special memory layout for the coefficient (currently stored in the `raw_coef_` array). Those coefficients are made read-only accessible to the user by means of the python properties `coef_` and `intercept_`. However this solution prevents the user to change some of the coefficient values or to reassign a complete `coef_` array on a the fitted estimator.
It would be much nicer to have `coef_` / `intercept_` as traditional array attributes instead.
Options:
- store parameters fitted by liblinear using the traditional `coef_` / `intercept_` layout and copy those parameters at prediction time to a temporary array suitable for prediction using liblinear
- implement `predict` and `predict_proba` in numpy instead of using `liblinear` at prediction time hence we could use standard numpy arrays with the usual layout for `coef_` and `intercept_`",closed,Enhancement,2011-12-18 11:00:31+00:00,2012-09-20 21:05:28+00:00,4,ogrisel,https://github.com/scikit-learn/scikit-learn/issues/470,1176,6658.0825
2594431,474,scikit-learn/scikit-learn,Implement Gaussian Process based hyper-parameter optimizer,"Following Bergstra NIPS 2011 (@jaberg for the intimates) it would be great to have a GridSearch-like object implementing Gaussian-Process based hyper-parameter optimization.
To keep things simple, we would optimize only on continuous parameter, i.e. in a hyper-cube. The API would specify an initial bounding box, and also whether each parameter should be varied in the log-domain or in the linear-domain.
Some notes from a discussion with James Bergstra:
- The algorithm goes mostly as
<pre>
- Compute the score on a set of random points in the specified hyper-cube
- For i in budget:
2.a fit Gaussian Process to the pairs (parameters, scores)
2.b find the parameters that optimizes the expectation of getting a lower score then the best currently available. For this, optimize it using a black-box scipy optimizer, such as the simulated annealing).
</pre>
- A lot of the gain comes from sequentially choosing the points, so, as we don't have a queue mechanism, we should do this sequentially for now. Parallel can be done in internal cross-validations, or to compute initial points.
Remark: to computing the expectancy of (X, y) with Gaussian process, we should overide score to use something more clever than the standard LinearRegression score.",closed,New Feature,2011-12-18 18:35:57+00:00,2017-12-13 22:30:26+00:00,34,GaelVaroquaux,https://github.com/scikit-learn/scikit-learn/issues/474,1324,52491.908055555556
2599500,479,scikit-learn/scikit-learn,Program crash on data loaded by load_svmlight_file,"I load the dataset with load_svmlight_file()
```
Xc, yc = load_svmlight_file(""../ch.vec"", ch_feature)
```
and then fit it with
```
nb = MultinomialNB()
nb.fit(Xc, yc)
```
And then the program crashed and no exception and warning message is displayed.
This problem is caused by off-by-one error. My feature index starts from 1, while load_svmlight_file() requires the index to start from 0. However, this exception behavior is quite confusing and very hard to debug.",closed,,2011-12-19 12:15:02+00:00,2012-05-26 16:31:01+00:00,32,fannix,https://github.com/scikit-learn/scikit-learn/issues/479,523,3820.2663888888887
2604301,485,scikit-learn/scikit-learn,fix horrible test_least_angle,"the test is test_lars_add_features
Assigning to me",closed,,2011-12-19 19:10:33+00:00,2011-12-20 16:12:07+00:00,1,fabianp,https://github.com/scikit-learn/scikit-learn/issues/485,82,21.02611111111111
2610421,487,scikit-learn/scikit-learn,Precision issue in least_angle.py,"On line 192-198 of least_angle.py, there is this code:
<pre>
# least squares solution
least_squares, info = potrs(L[:n_active, :n_active],
sign_active[:n_active], lower=True)
# is this really needed ?
AA = 1. / np.sqrt(np.sum(least_squares * sign_active[:n_active]))
least_squares *= AA
</pre>
When there are correlated predictors, instability in the least squares solution can cause the sum np.sum(least_squares \* sign_active[:n_active]) to be negative, causing a bunch of nans to hit the rest of the code, ultimately causing the function to raise the following exception:
<pre>
...
calculator.fit(independentValues, dependentValues)
File ""/u/swcontrol/sfw/python/lib/python2.7/site-packages/scikit_learn-0.9-py2.7-solaris-2.10-i86pc.egg/sklearn/linear_model/least_angle.py"", line 427, in fit
max_iter=max_iter, eps=self.eps)
File ""/u/swcontrol/sfw/python/lib/python2.7/site-packages/scikit_learn-0.9-py2.7-solaris-2.10-i86pc.egg/sklearn/linear_model/least_angle.py"", line 158, in lars_path
sign_active[n_active] = np.sign(C_)
ValueError: cannot convert float NaN to integer
</pre>
It looks like I can get around my particular issue by increasing the 'eps' parameter passed to the constructor, but I thought this was worth bringing up.",closed,Enhancement,2011-12-20 08:33:27+00:00,2012-09-14 13:33:19+00:00,9,plubans580,https://github.com/scikit-learn/scikit-learn/issues/487,1365,6460.997777777778
2615817,494,scikit-learn/scikit-learn,DBSCAN docs don't build,"The docstring for `DBSCAN` doesn't show up on the website (it should be [here](scikit-learn.org/dev/modules/generated/sklearn.cluster.DBSCAN.html), I guess). I tried fixing this by adding
```
.. currentmodule:: sklearn.cluster.dbscan_
```
in `doc/modules/clustering.rst`, but that didn't solve the issue. Also, listing it in `doc/modules/classes.rst` doesn't do the trick.
The first mention of `DBSCAN` in the [narrative docs](http://scikit-learn.org/dev/modules/clustering.html#dbscan) is a `:class:` link in the rST, but it doesn't become a link in the HTML.",closed,,2011-12-20 17:55:53+00:00,2012-01-01 11:47:28+00:00,1,larsmans,https://github.com/scikit-learn/scikit-learn/issues/494,587,281.8597222222222
2627358,509,scikit-learn/scikit-learn,sphinx docstring parsing,"the doesn't get correctly parsed
```
Attributes
===========
steps: list of (names, object)
List of the named object that compose the pipeline, in the
order that they are applied on the data.
```
but this does (not trailing backslash)
```
Attributes
----------
`steps` : list of (name, object)
List of the named object that compose the pipeline, in the \
order that they are applied on the data.
```
see also c78df18d8871c5149ac061cb24b9a4ccd652339f",closed,,2011-12-21 17:25:43+00:00,2011-12-31 13:54:18+00:00,1,fabianp,https://github.com/scikit-learn/scikit-learn/issues/509,570,236.4763888888889
2655949,516,scikit-learn/scikit-learn,sparse-sparse and sparse-dense dot product with dense output,"`safe_sparse_dot` has an option `dense_output` which allows to specify that the dot product between two sparse matrices or between a sparse matrix and a numpy array should be output to a numpy array. However, scipy currently always return a sparse matrix, therefore `safe_sparse_dot` converts it afterwards with `toarray()`. It would be better if we had Cython utilities that can directly output to a numpy array, thus avoiding needless memory allocation and copying. Those utilities are fairly low level and should probably be contributed to scipy too but I feel we should have them in scikit-learn, until the version of scipy that implements them becomes mainstream.
Used in:
- euclidean_distances
- linear_kernel
- ridge regression (n_features > n_samples case)
- NMF
Necessary functions for sparse-dense:
- dot(X_csr, Y_c, out)
- dot(X_csr, Y_fortran, out)
Necessary functions for sparse-sparse:
- dot(X_csr, Y_csc, out)
Other situations can be handled by using:
- dot(a, b) = dot(b.T, a.T).T",closed,"New Feature, Performance, help wanted",2011-12-25 21:31:49+00:00,2025-08-19 01:11:15+00:00,14,mblondel,https://github.com/scikit-learn/scikit-learn/issues/516,1061,119643.65722222222
2668461,517,scikit-learn/scikit-learn,Shape problems building a pipeline containing PatchExtractor and MiniBatchDictionaryLearning,"As part of a learning project, I was trying to adapt the [Image Denoising example](http://scikit-learn.org/stable/auto_examples/decomposition/plot_image_denoising.html#example-decomposition-plot-image-denoising-py) to use a pipeline containing `PatchExtractor` instead of manipulating the image data using `extract_patches_2d`.
The attempt can be found here: https://gist.github.com/1525765. For either value of `RESHAPE`, the code throws a `ValueError`. Expected result: No exceptions thrown (perhaps with the introduction of a `Reshape` preprocessor or a `flatten` or `shape` parameter to `PatchExtractor`).
As far as I can tell, the issue is due to shape incompatibilities between `PatchExtractor` and `MiniBatchDictionaryLearning`. `PatchExtractor` expects, and yields, a 3d tensor of images `(n_images, image_height, image_width)`. However, `MiniBatchDictionaryLearning` wants the `image_height` and `image_width` flattened: `(n_images, image_height * image_width)`. The original example code explicitly reshapes the output of `extract_patches_2d`; that's not currently easily available in the middle of a pipeline.",closed,Enhancement,2011-12-28 01:53:29+00:00,2016-10-27 20:12:51+00:00,2,josharian,https://github.com/scikit-learn/scikit-learn/issues/517,1215,42378.32277777778
2682594,518,scikit-learn/scikit-learn,Factorize code dupplication with SelectorMixin,"(I put this here for further reference.)
With the introduction of `SelectorMixin` (feature_selection module) in #478, it has been noticed that some code could be factorized around that new class. In particular, `CoefSelectTransformerMixin` (from linear_model/base.py) should be deprecated, and some other code in the univariate selection module might be factorized.
See the discussion in #478 for further details.",closed,,2011-12-29 20:47:27+00:00,2012-01-25 09:07:34+00:00,0,glouppe,https://github.com/scikit-learn/scikit-learn/issues/518,462,636.3352777777778
2726791,525,scikit-learn/scikit-learn,Score is not the mean error rate.,"There is a doc error in : scikit-learn / sklearn / base.py
ClassifierMixin.score's doc states ""Returns the mean error rate on the given test data and labels."",
while it returns a success rate :
```
return np.mean(self.predict(X) == y)
```",closed,,2012-01-04 18:51:28+00:00,2012-01-04 20:58:27+00:00,1,fulmicoton,https://github.com/scikit-learn/scikit-learn/issues/525,279,2.116388888888889
2738422,531,scikit-learn/scikit-learn,GridSearchCV.best_estimator and .best_score,"Something that is always confusing me is that these two attributes don't end with an underscore.
As they are estimated, I think they should.
What do you think?
Also: how to rename a attribute? Should one just break the API?",closed,,2012-01-05 18:14:35+00:00,2012-01-06 08:35:01+00:00,5,amueller,https://github.com/scikit-learn/scikit-learn/issues/531,269,14.340555555555556
2740724,533,scikit-learn/scikit-learn,LinearRegression does not work with sparse matrix,"The following code
```
from scipy import sparse
from sklearn.linear_model import LinearRegression
import numpy as np
np.random.seed(0)
n = 100
diag = np.random.random(n)
X = sparse.dia_matrix((diag, [0]), shape=(n, n))
beta = np.random.random(n)[:, np.newaxis]
y = X * beta
ols = LinearRegression()
# works fine
ols.fit(X.todense(), y.ravel())
# doesn't work
ols.fit(X, y.ravel())
```
yields the following traceback
<pre>
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/home/emma/travail/2011/signal_processing/tomo/discussions/marc/marc/traceback.py in <module>()
14 ols.fit(X.todense(), y.ravel())
15 # doesn't work
---> 16 ols.fit(X, y.ravel())
17
18
/usr/local/lib/python2.7/dist-packages/scikit_learn-0.10_git-py2.7-linux-x86_64.egg/sklearn/linear_model/base.pyc in fit(self, X, y)
143
144 X, y, X_mean, y_mean, X_std = self._center_data(X, y,
--> 145 self.fit_intercept, self.normalize, self.copy_X)
146
147 self.coef_, self.residues_, self.rank_, self.singular_ = \
/usr/local/lib/python2.7/dist-packages/scikit_learn-0.10_git-py2.7-linux-x86_64.egg/sklearn/linear_model/base.pyc in _center_data(X, y, fit_intercept, normalize, copy)
61 If copy is False, modifies X in-place.
62 """"""
---> 63 X = as_float_array(X, copy)
64
65 if fit_intercept:
/usr/local/lib/python2.7/dist-packages/scikit_learn-0.10_git-py2.7-linux-x86_64.egg/sklearn/utils/validation.pyc in as_float_array(X, copy)
60 X = X.astype(np.float32)
61 else:
---> 62 X = X.astype(np.float64)
63 return X
64
TypeError: float() argument must be a string or a number
WARNING: Failure executing file: <traceback.py>
</pre>
PS: @GaelVaroquaux said he would do ti",closed,,2012-01-05 21:20:19+00:00,2012-01-06 06:37:55+00:00,1,emmanuelle,https://github.com/scikit-learn/scikit-learn/issues/533,1963,9.293333333333333
2750510,540,scikit-learn/scikit-learn,omp.py: gamma undefined after early break,"In `linear_model/omp.py`, function `_gram_omp`, if optimization ends early due to `warn`/`break` right after the `while` statement, then `gamma` never gets set before the return. This then raises an `UnboundLocalError`.
The warning displayed is helpful, but it'd be nice to also set some default value of `gamma` initially, rather than just bailing. I'd fix and submit a pull request, but I have no idea what an appropriate default value for `gamma` is. :)
Sorry that I don't have a handy test case for this; I encountered it in the middle of a very long test run (> 1 day) over a lot of data.",closed,,2012-01-06 18:50:34+00:00,2012-01-08 22:49:36+00:00,2,josharian,https://github.com/scikit-learn/scikit-learn/issues/540,638,51.98388888888889
2762362,542,scikit-learn/scikit-learn,coef_ memory layout,"If coef_ is a c-style array than `safe_sparse_dot(X, self.coef_.T)` causes a memory copy which degrades test time significantly.
This applies to SGDClassifier, NaiveBayes and maybe others too.
see http://sourceforge.net/mailarchive/message.php?msg_id=28644874",closed,,2012-01-08 19:27:42+00:00,2012-01-09 08:42:17+00:00,2,pprett,https://github.com/scikit-learn/scikit-learn/issues/542,282,13.243055555555555
2762629,543,scikit-learn/scikit-learn,Implement Average SGD,"Average SGD is an old computational trick (namely Polyak Rupert averaging applied to SGD) that was recently rediscovered and theoretically studied by Wei Xu ([arxiv link](http://arxiv.org/abs/1107.2490)) and Francis Bach & Eric Moulines ([hal link](http://hal.archives-ouvertes.fr/hal-00608041/en)) and further empirically validated in the public implementation of SGD by Leon Bottou ([SGD project page](http://leon.bottou.org/projects/sgd)).
This trick makes the SGD algorithm converge much faster with a very small modification of the original SGD code. It would be great to have it implemented in the scikit along with some examples that reproduce Leon Bottou's experiments on the RCV1 and Alpha datasets (that would require 2 new dataset loaders).
@npinto also has a [pure numpy implementation](https://github.com/npinto/asgd) that could also serve as a reference for additional comparison & benchmark.
@pprett the original author of the scikit-learn SGD module does not plan to work on this in the short term so anyone motivated enough, please feel free to embark (just send an email on the mailing to avoid // implementation efforts).
_Edit_: See also [this thread](http://thread.gmane.org/gmane.comp.python.scikit-learn/327) on the mailing list.",closed,New Feature,2012-01-08 20:16:50+00:00,2015-02-03 20:09:41+00:00,5,ogrisel,https://github.com/scikit-learn/scikit-learn/issues/543,1278,26927.880833333333
2762769,544,scikit-learn/scikit-learn,Sphinx chokes on properties with setters,"Sphinx pours out weird errors when trying to document properties.
This does not seem to be a problem when defined using property decorators without prop.setter.
when using foo = property(_getter_foo, _setter_foo)
something goes wrong, though.
If properties are not listed in the ""Attributes"" section, they are not documented at all.
This is an issue for the hmm and gmm modules.
Without this issue, the doc build errors would be actually readable.",closed,,2012-01-08 20:41:34+00:00,2012-03-13 15:21:34+00:00,6,amueller,https://github.com/scikit-learn/scikit-learn/issues/544,490,1554.6666666666667
2803124,548,scikit-learn/scikit-learn,specify label encoding in LabelBinarizer,"Currently, `LabelBinarizer` encodes the positive and negative labels with 1 and 0 by default and this cannot be changed. It would be nice if the user could specify the encoding with `LabelBinarizer(pos_label=1, neg_label=-1)`.",closed,,2012-01-11 11:09:28+00:00,2012-02-28 08:00:29+00:00,2,mblondel,https://github.com/scikit-learn/scikit-learn/issues/548,267,1148.8502777777778
2806271,549,scikit-learn/scikit-learn,Duplicate entry on PyPi,http://pypi.python.org/pypi/scikits.learn (v. 0.8.1) vs http://pypi.python.org/pypi/scikit-learn (v. 0.10).,closed,,2012-01-11 16:14:59+00:00,2012-01-11 23:00:40+00:00,6,sfermigier,https://github.com/scikit-learn/scikit-learn/issues/549,131,6.761388888888889
2806771,550,scikit-learn/scikit-learn,categories in vectorized 20newsgroup loader,"It's not possible yet to specify categories in the 20newsgroup loader. Once this is done, we can migrate examples to this loader (except for the one that illustrates feature extraction). Note that due to joblib memoization, the categories must be filtered after the entire dataset have been loaded.",closed,New Feature,2012-01-11 16:50:55+00:00,2014-04-06 15:25:39+00:00,1,mblondel,https://github.com/scikit-learn/scikit-learn/issues/550,343,19582.57888888889
2818287,552,scikit-learn/scikit-learn,dual_coef_ and coef_ in SVC deserve some more explanations,"Even though, `SVC` uses one-vs-one training internally, the shape of `dual_coef_` is `[n_classes-1, nSV]` and not `[n_classes * (n_classes - 1) / 2, nSV]` as one may expect. It would be nice if someone (@fabianp? @amueller?) competent on the subject could add some more explanations.
If I understood correctly, this representation allows to factorize the alphas with respect to a given support vector and thus precompute a few summations at training time (instead of doing the entire voting at predict time).
I don't understand why it's `n_classes-1` and not `n_classes`.
This FAQ may help too.
http://www.csie.ntu.edu.tw/~cjlin/libsvm/faq.html#f402",closed,,2012-01-12 14:09:52+00:00,2012-01-28 23:37:07+00:00,7,mblondel,https://github.com/scikit-learn/scikit-learn/issues/552,712,393.45416666666665
2840738,555,scikit-learn/scikit-learn,Implement Adaptive Lasso / reweighted L1,"Here is a proof of concept implementation by @agramfort
https://gist.github.com/1610922
Implementing this in the scikit would require a conversion to the scikit-learn API / naming conventions + example comparing with classic Lasso + narrative doc.
What motivated @agramfort's gist was:
http://books.nips.cc/papers/files/nips24/NIPS2011_1135.pdf
See references therein for the original contributions.",closed,"New Feature, module:linear_model",2012-01-14 12:38:03+00:00,2024-04-17 12:45:36+00:00,7,ogrisel,https://github.com/scikit-learn/scikit-learn/issues/555,451,107448.12583333334
2847712,556,scikit-learn/scikit-learn,Accept arbitrary object as class labels,"Update:
I think most people agree now. The estimators should call `unique` from the utilities (which is a backport of `numpy.unique`) and save the results in a `classes_` attribute.
You can look at QDA and LDA for the pattern.
To find classes that not yet support this, use the `test_common.py`.
Just comment out [this line](https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/tests/test_common.py#L385) in `test_classifiers_classes`.
Once that works, we can use the text of the classes as labels and see where it breaks next ;)
If anyone decides to work on this, have a look at my branch [here](https://github.com/amueller/scikit-learn/tree/arbitrary_labels) where I started work.",closed,"Easy, Enhancement",2012-01-15 20:26:57+00:00,2015-07-11 15:09:45+00:00,44,amueller,https://github.com/scikit-learn/scikit-learn/issues/556,736,30546.713333333333
2852739,558,scikit-learn/scikit-learn,Evaluation metrics for multi label classifiers,"As far as I can tell, these are completely missing.
I feel this makes the multi label classifiers much less useful.
I am not sure what common measure there are but two that seem natural to me would be Hamming loss (how many classes per example were correct?) and 0-1 loss (for how many examples were all classes correct).
At least these are two losses that are commonly used in structured prediction afaik.",closed,New Feature,2012-01-16 10:21:20+00:00,2013-07-22 15:25:05+00:00,13,amueller,https://github.com/scikit-learn/scikit-learn/issues/558,455,13277.0625
2854903,559,scikit-learn/scikit-learn,OvR can not handle one class being not present or always,"Multi label (haven't testet multi class) classification with ovr crashes when one class is always present or absent.
The reason is that the decision function of the ""positive"" class is taken.
If a class is allways on or off, though, n_classes is 1 for this particular classifier and the decision function is only one row -
the second row would correspond to the ""positive"" class.
Maybe this case should be handled explicitly. It is not clear to me whether a classifier should be fit at all.",closed,,2012-01-16 14:10:19+00:00,2012-07-23 12:48:31+00:00,5,amueller,https://github.com/scikit-learn/scikit-learn/issues/559,549,4534.636666666666
2855582,560,scikit-learn/scikit-learn,Narrative docs for LDA missing,I didn't find anything about LDA in the user guide...,closed,,2012-01-16 15:12:43+00:00,2012-03-04 19:06:45+00:00,1,amueller,https://github.com/scikit-learn/scikit-learn/issues/560,84,1155.9005555555555
2870227,565,scikit-learn/scikit-learn,grid search keeps all estimators in memory,"I mentioned this issue on the ML a while back but since it hasn't been addressed yet, I create this report to track it.
Basically, grid search uses `Parallel` to compute `out`, which is a list of triplets (score, estimator, n_test_samples). Unfortunately, some estimators take a lot of space in memory (e.g., SVCs because the support vectors are _copied_ in each estimator). It would be better to return only the best estimator directly and delete the other ones as they are computed.",closed,,2012-01-17 15:43:10+00:00,2012-04-20 21:17:05+00:00,12,mblondel,https://github.com/scikit-learn/scikit-learn/issues/565,528,2261.5652777777777
2873760,566,scikit-learn/scikit-learn,No user guide on text feature extraction,a lot to do there ;),closed,,2012-01-17 20:02:49+00:00,2012-03-13 21:15:17+00:00,1,amueller,https://github.com/scikit-learn/scikit-learn/issues/566,61,1345.2077777777777
2873843,567,scikit-learn/scikit-learn,Links to Vectorizer and CountVectorizer in References broken,,closed,,2012-01-17 20:08:27+00:00,2012-01-20 19:40:11+00:00,0,amueller,https://github.com/scikit-learn/scikit-learn/issues/567,61,71.52888888888889
2881701,569,scikit-learn/scikit-learn,Move benchmarks into ml-benchmarks repository,"Some are already there and can just be removed in the scikit-learn repo, other have to be ported and made consistent with the ml-benchmarks interface.",closed,Enhancement,2012-01-18 12:19:08+00:00,2014-07-18 16:11:13+00:00,1,amueller,https://github.com/scikit-learn/scikit-learn/issues/569,196,21891.868055555555
2883551,570,scikit-learn/scikit-learn,Replace asserts by errors,"There are some asserts in the code that should be replaced by raising appropriate errors.
Asserts should only be used in testing.",closed,,2012-01-18 15:10:45+00:00,2012-01-20 19:26:37+00:00,4,amueller,https://github.com/scikit-learn/scikit-learn/issues/570,155,52.26444444444444
2889914,572,scikit-learn/scikit-learn,Implement Factor Analysis,"Or maybe get it from MDP (they have it but I haven't looked at their code).
This should really be included in sklearn.",closed,New Feature,2012-01-18 22:42:37+00:00,2012-10-24 14:01:34+00:00,1,amueller,https://github.com/scikit-learn/scikit-learn/issues/572,144,6711.315833333333
2908693,575,scikit-learn/scikit-learn,test failure in LLE,"I'm (still?) getting a test failure in the LLE module.
```
======================================================================
FAIL: test_locally_linear.test_lle_simple_grid
----------------------------------------------------------------------
Traceback (most recent call last):
File ""/usr/lib/pymodules/python2.6/nose/case.py"", line 183, in runTest
self.test(*self.arg)
File ""/home/mathieu/Desktop/projects/scikit-learn/sklearn/manifold/tests/test_locally_linear.py"", line 67, in te
st_lle_simple_grid
assert_lower(np.linalg.norm(X_reembedded - clf.embedding_), tol)
File ""/home/mathieu/Desktop/projects/scikit-learn/sklearn/manifold/tests/test_locally_linear.py"", line 15, in as
sert_lower
assert a < b, message
AssertionError: 0.67260012006758951 is not lower than 0.10000000000000001
>> assert 0.67260012006758951 < 0.10000000000000001, '0.67260012006758951 is not lower than 0.10000000000000001'
```
The strange thing is that the test passes when test_locally_linear.py is run individually but fails when run from `make test-code`.
BTW, `make test` is supposed to run the `test-code` and `test-doc` targets but I noticed that when there is a failure in `test-code`, `test-doc` is not executed. This means that a failure in a unrelated module to your changes can hide doctest failures.
If the test is difficult to fix, we could just skip it, maybe?",closed,,2012-01-20 09:14:57+00:00,2012-08-20 14:22:07+00:00,16,mblondel,https://github.com/scikit-learn/scikit-learn/issues/575,1399,5117.1194444444445
2926338,579,scikit-learn/scikit-learn,Numpy and Scipy version requirements,"I couldn't find the versions of numpy and scipy (and python for that matter) that the scikit currently supports anywhere in the docs.
I think it should be on the installation page.",closed,,2012-01-22 12:12:15+00:00,2012-01-22 20:00:51+00:00,3,amueller,https://github.com/scikit-learn/scikit-learn/issues/579,217,7.81
2931083,581,scikit-learn/scikit-learn,Rhel 5: MurmurHash3 does not compile (but fix is simple),"Fix discussed here:
https://github.com/Vaizard/MurmurHash3PHP/issues/4",closed,,2012-01-23 05:36:20+00:00,2012-01-23 06:42:09+00:00,3,ndawe,https://github.com/scikit-learn/scikit-learn/issues/581,128,1.0969444444444445
2931650,582,scikit-learn/scikit-learn,ridge path,"This would be a nice addition to the ridge module:
http://fseoane.net/blog/2011/ridge-regression-path/",closed,New Feature,2012-01-23 07:51:49+00:00,2016-01-12 21:32:42+00:00,0,mblondel,https://github.com/scikit-learn/scikit-learn/issues/582,114,34813.68138888889
2947922,584,scikit-learn/scikit-learn,NMF inititialization does not work for n_samples < n_components,"It raises an index error. NMF works with random init.
If there is an easy fix for still using SVD, that would be best. If not, we could check if n_samples < n_components and then use random init.",closed,Bug,2012-01-24 09:59:55+00:00,2012-09-18 11:51:22+00:00,10,amueller,https://github.com/scikit-learn/scikit-learn/issues/584,259,5713.8575
2951324,585,scikit-learn/scikit-learn,Memory Issues in BallTree,"From a discussion on the mailing list (http://sourceforge.net/mailarchive/message.php?msg_id=28717412). There seems to be a memory error in ball tree which causes strange results under some circumstances.
```
import warnings
from sklearn import datasets
from sklearn.neighbors import NearestNeighbors
import numpy as np
n_points = 1000
n_neighbors = 10
out_dim = 2
n_trials = 100
X, _ = datasets.samples_generator.make_s_curve(n_points, random_state=123)
knn = NearestNeighbors(n_neighbors)
for i in xrange(n_trials):
print i + 1
knn.fit(X)
#print X # <-- uncomment this line and the test will no longer fail.
with warnings.catch_warnings(record=True) as w:
knn.kneighbors(X)
assert(len(w) == 0)
```
I think the best way to address this is to do something I should have done from the beginning: unit-test the various components of the ball tree algorithm. This will involve writing some basic python wrappers for functionality like the priority queue, partial sort, etc. I'm hoping that through that process, the source of this behavior will become clear.",closed,,2012-01-24 14:48:07+00:00,2012-01-28 20:55:49+00:00,8,jakevdp,https://github.com/scikit-learn/scikit-learn/issues/585,1122,102.12833333333333
2954139,586,scikit-learn/scikit-learn,assert_less and assert_greater,"The version of nose that scikit-learn requires doesn't contain `assert_less` and `assert_greater` so it would be nice to add them in `sklearn.utils.testing`. When doing `assert_true(... < ...)` or `assert_true(... > ...)`, we loose the output, which is VERY inconvenient when the test breaks...",closed,,2012-01-24 17:53:00+00:00,2012-05-06 14:28:24+00:00,8,mblondel,https://github.com/scikit-learn/scikit-learn/issues/586,325,2468.59
2981389,589,scikit-learn/scikit-learn,Generate libsvm models only once per object instanciation.,"Every time you call predict() on an SVC object the internals re-generate the libsvm model, and then re-destroy it. This takes quite a bit of time if you're calling predict() a lot, especially on single data-points. Apparently this is because:
> We have to reconstruct model and parameters to make sure we stay in sync with the python object.
But I have a set of classes that don't reconstruct this all the time and they function fine. What was the original logic to recreating the models each time, and if we can get around this, how can I best merge in this feature (which already exists in my local code).
Thanks,
Gabe",closed,,2012-01-26 15:56:37+00:00,2012-01-26 16:29:05+00:00,11,tehf0x,https://github.com/scikit-learn/scikit-learn/issues/589,688,0.5411111111111111
2982518,590,scikit-learn/scikit-learn,"Broken ""Citing scikit-learn"" link from nested documentation pages","For instance see:
http://scikit-learn.org/stable/auto_examples/index.html
The link in the left column points to http://scikit-learn.org/stable/auto_examples/about.html#citing-scikit-learn instead of http://scikit-learn.org/stable/about.html#citing-scikit-learn",closed,,2012-01-26 17:09:41+00:00,2012-01-26 17:34:55+00:00,3,ogrisel,https://github.com/scikit-learn/scikit-learn/issues/590,328,0.42055555555555557
2996973,592,scikit-learn/scikit-learn,run KMeans n_init runs in parallel,`KMeans` is run `n_init` times with a different initialization and the best is taken in the end. This offers easy opportunity for parallelization with joblib.,closed,,2012-01-27 17:03:14+00:00,2012-02-07 08:05:34+00:00,1,mblondel,https://github.com/scikit-learn/scikit-learn/issues/592,193,255.0388888888889
3005316,594,scikit-learn/scikit-learn,examples/plot_precision_recall.py doesn't run,There is an error in `sklearn/metrics/metrics.py(763)precision_recall_curve()`.,closed,,2012-01-28 14:38:33+00:00,2012-01-30 19:33:55+00:00,3,amueller,https://github.com/scikit-learn/scikit-learn/issues/594,125,52.922777777777775
3014501,597,scikit-learn/scikit-learn,Fibonacci Heaps for Ball Tree,The Ball Tree neighbor search could potentially be sped up greatly (especially for large `n_neighbors` and `n_features`) by using Fibonacci heaps instead of the binary heap/priority queue structures used currently. There is a fast cython Fibonacci heap in `sklearn/utils/graph_nearest_neighbor.pyx`. This should be factored out so that it can also be used in the Ball Tree.,closed,"New Feature, Moderate, help wanted, module:tree",2012-01-29 23:53:48+00:00,2022-08-01 12:36:11+00:00,7,jakevdp,https://github.com/scikit-learn/scikit-learn/issues/597,405,92076.7063888889
3023992,598,scikit-learn/scikit-learn,ARDRegression - array is too big error,"Hello,
When I run the ARDRegression algorithm I get the ""array is too big"" error. The data is indeed large about 113K records or 11 integer columns.
1. Is there a work around for this issue ?
2. Are there methods for the learner to load the data progressively ?
3. If I divide the data into chunks and train the algorithm sequentially what is the effect ? I know this sounds really stupid but how can I divide the work in smaller pieces.
Traceback (most recent call last):
File ""\Program.py"", line 58, in <module>
clf.fit(input, target)
File ""C:\Python27\lib\site-packages\sklearn\linear_model\bayes.py"", line 401, in fit
sigma_ = linalg.pinv(np.eye(n_samples) / alpha_ +
File ""C:\Python27\lib\site-packages\numpy\lib\twodim_base.py"", line 210, in eye
m = zeros((N, M), dtype=dtype)
ValueError: array is too big.",closed,Bug,2012-01-30 17:51:13+00:00,2012-09-05 20:12:24+00:00,6,vicpara,https://github.com/scikit-learn/scikit-learn/issues/598,872,5258.353055555555
3032398,599,scikit-learn/scikit-learn,Error in following scikit-learn-tutorial: cannot import name sparse,"Hi,
I am following the scikit-learn-tutorial. I got from the beginning to section 2.2.1 (A first classifier example with scikit-learn) without any issues, but am not able to make any more progress unfortunately:
> from sklearn.svm import LinearSVC
> Traceback (most recent call last):
> File ""<stdin>"", line 1, in <module>
> File ""C:\Python27-enthought\lib\site-packages\scikit_learn-0.11_git-py2.7-win-amd64.egg\sklearn\svm__init__.py"", line 15, in <module>
> from . import sparse, libsvm, liblinear
> ImportError: cannot import name sparse
I can, however, import the sparse class directly from scipy without any issues. i.e. from scipy import sparse works fine.
I don't know how to troubleshoot this issue. Your help would be much appreciated.
My environment is Windows 7 64 bit, Enthought Python 2.7 64 bit.
Thanks!",closed,,2012-01-31 07:55:34+00:00,2012-02-03 06:24:03+00:00,9,inverseofverse,https://github.com/scikit-learn/scikit-learn/issues/599,900,70.47472222222223
3037940,600,scikit-learn/scikit-learn,sklearn.svm.tests.test_svm.test_liblinear_set_coef failing,"the following test failing on my box:
<pre>
======================================================================
ERROR: sklearn.svm.tests.test_svm.test_liblinear_set_coef
----------------------------------------------------------------------
Traceback (most recent call last):
File ""/usr/lib/pymodules/python2.7/nose/case.py"", line 187, in runTest
self.test(*self.arg)
File ""/home/varoquau/dev/scikit-learn/sklearn/svm/tests/test_svm.py"",
line 493, in test_liblinear_set_coef
values2 = clf.decision_function(iris.data)
File ""/home/varoquau/dev/scikit-learn/sklearn/svm/base.py"", line 501,
in decision_function
self.class_weight, self.label_, self._get_bias())
File ""liblinear.pyx"", line 178, in
sklearn.svm.liblinear.decision_function_wrap
(sklearn/svm/liblinear.c:2775)
ValueError: ndarray is not Fortran contiguous
</pre>",closed,,2012-01-31 16:09:36+00:00,2012-02-02 22:02:06+00:00,1,GaelVaroquaux,https://github.com/scikit-learn/scikit-learn/issues/600,905,53.875
3054549,604,scikit-learn/scikit-learn,"linear_model.SGDRegressor : Buffer has wrong number of dimensions (expected 1, got 2)","Hello,
I'm using SGDRegressor to fit a data set of 74K entries and 11 features.When I call the fit method I get the error from below. I've tried to understand the problem but I cannot say what shall I do differently. The entries from y are equal with the entries in X.
The error:
Traceback (most recent call last):
File ""D:\Work\Python\HeritagePrize\HeritagePrize\Program.py"", line 45, in <module>
error = sgd.Train()
File ""D:\Work\Python\HeritagePrize\HeritagePrize\MyPredictors.py"", line 103, in Train
self.predictor.fit(data.trainData, data.trainTarget)
File ""C:\Python27\lib\site-packages\sklearn\linear_model\base.py"", line 506, in fit
self._fit_regressor(X, y)
File ""C:\Python27\lib\site-packages\sklearn\linear_model\stochastic_gradient.py"", line 330, in _fit_regressor
self.eta0, self.power_t)
File ""sgd_fast.pyx"", line 214, in sklearn.linear_model.sgd_fast.plain_sgd (sklearn\linear_model\sgd_fast.c:4954)
ValueError: Buffer has wrong number of dimensions (expected 1, got 2)",closed,Bug,2012-02-01 16:37:56+00:00,2013-07-26 15:17:45+00:00,22,vicpara,https://github.com/scikit-learn/scikit-learn/issues/604,1097,12982.663611111111
3059568,605,scikit-learn/scikit-learn,Error on gaussian_process/gp_diabetes_dataset.py,"Taceback:
```
Traceback (most recent call last):
File ""/usr/lib/python2.6/pdb.py"", line 1296, in main
pdb._runscript(mainpyfile)
File ""/usr/lib/python2.6/pdb.py"", line 1215, in _runscript
self.run(statement)
File ""/usr/lib/python2.6/bdb.py"", line 372, in run
exec cmd in globals, locals
File ""<string>"", line 1, in <module>
File ""gp_diabetes_dataset.py"", line 49, in <module>
R2 = cross_val_score(gp, X, y=y, cv=KFold(y.size, K), n_jobs=1).mean()
File ""/home/amueller/checkout/scikit-learn/sklearn/cross_validation.py"", line 847, in cross_val_score
for train, test in cv)
File ""/home/amueller/checkout/scikit-learn/sklearn/externals/joblib/parallel.py"", line 472, in __call__
for function, args, kwargs in iterable:
File ""/home/amueller/checkout/scikit-learn/sklearn/cross_validation.py"", line 847, in <genexpr>
for train, test in cv)
File ""/home/amueller/checkout/scikit-learn/sklearn/base.py"", line 66, in clone
and param1[0] == param2[0]
```
In clone.. no idea....",closed,,2012-02-01 22:00:31+00:00,2012-02-01 22:41:12+00:00,3,amueller,https://github.com/scikit-learn/scikit-learn/issues/605,1068,0.6780555555555555
3074962,606,scikit-learn/scikit-learn,default stop_words not being applied in WordNGramAnalyzer,"Default English stop words are not being extracted in line 177 of text.py:
https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/feature_extraction/text.py#L177
```
>>> from sklearn.feature_extraction.text import WordNGramAnalyzer
>>> w=WordNGramAnalyzer()
>>> w.stop_words
'english'
```
Instantiating explicity with `WordNGramAnalyzer(stop_words=ENGLISH_STOP_WORDS)` does work.",closed,,2012-02-02 21:45:15+00:00,2012-04-20 21:29:12+00:00,2,dmaniloff,https://github.com/scikit-learn/scikit-learn/issues/606,451,1871.7325
3076346,607,scikit-learn/scikit-learn,problem with install,"Hey,
I just installed scikit-learn using easy-install on my linux box running RHEL 5.6 and I am running into some trouble. Installation looked fine with only warnings popping up (or so I thought) but running the test showed problems (see below). Any idea what is happening? I am using python 2.7 and the enthought installation.
Thanks
[root@ares bin]# ./python -c ""import sklearn; sklearn.test()""
Running unit tests and doctests for sklearn
NumPy version 1.6.1
NumPy is installed in /usr/lib64/enthought/lib/python2.7/site-packages/numpy
Python version 2.7.2 |EPD_free 7.2-2 (64-bit)| (default, Jul 3 2011, 15:17:51) [GCC 4.1.2 20080704 (Red Hat 4.1.2-44)]
nose version 1.1.2
/usr/lib64/enthought/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-linux-x86_64.egg/sklearn/cross_val.py:2: UserWarning: sklearn.cross_val namespace is deprecated in version 0.9 and will be removed in version 0.11. Please use sklearn.cross_validation instead.
warnings.warn('sklearn.cross_val namespace is deprecated in version 0.9'
/usr/lib64/enthought/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-linux-x86_64.egg/sklearn/hmm.py:24: UserWarning: sklearn.hmm is orphaned, undocumented and has known numerical stability issues. If nobody volunteers to write documentation and make it more stable, this module will be removed in version 0.11.
warnings.warn('sklearn.hmm is orphaned, undocumented and has known numerical'
.........../usr/lib64/enthought/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-linux-x86_64.egg/sklearn/neighbors/base.py:23: UserWarning: kneighbors: neighbor k+1 and neighbor k have the same distance: results will be dependent on data order.
warnings.warn(msg)
................................/usr/lib64/enthought/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-linux-x86_64.egg/sklearn/cluster/spectral.py:77: UserWarning: pyamg not available, using scipy.sparse
warnings.warn('pyamg not available, using scipy.sparse')
.S...................E..SS...................................../usr/lib64/enthought/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-linux-x86_64.egg/sklearn/decomposition/dict_learning.py:262: UserWarning: Please note: the interface of sparse_encode has changed: It now follows the dictionary learning API and it also handles parallelization. Please read the docstring for more information.
warnings.warn(""Please note: the interface of sparse_encode has changed: ""
.........S........................./usr/lib64/enthought/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-linux-x86_64.egg/sklearn/decomposition/nmf.py:237: UserWarning: Iteration limit reached in nls subproblem.
warnings.warn(""Iteration limit reached in nls subproblem."")
.................../usr/lib64/enthought/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-linux-x86_64.egg/sklearn/decomposition/sparse_pca.py:147: RuntimeWarning: invalid value encountered in divide
U /= np.sqrt((U *\* 2).sum(axis=0))
.....S...../usr/lib64/enthought/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-linux-x86_64.egg/sklearn/ensemble/forest.py:309: RuntimeWarning: divide by zero encountered in log
return np.log(self.predict_proba(X))
....................../usr/lib64/enthought/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-linux-x86_64.egg/sklearn/externals/joblib/test/test_func_inspect.py:111: UserWarning: Cannot inspect object <functools.partial object at 0x63681b0>, ignore list will not work.
nose.tools.assert_equal(filter_args(ff, ['y'], 1),
........................................................................................________________________________________________________________________________
test_memory setup
---
---
test_memory teardown
---
..________________________________________________________________________________
test_memory setup
---
.........................................................................................................................________________________________________________________________________________
test_memory teardown
---
.________________________________________________________________________________
setup numpy_pickle
---
.....................................Exception AttributeError: AttributeError(""'NoneType' object has no attribute 'tell'"",) in <bound method memmap.__del__ of memmap(5.6315863e-316)> ignored
Exception AttributeError: AttributeError(""'NoneType' object has no attribute 'tell'"",) in <bound method memmap.__del__ of memmap(5.63224876e-316)> ignored
Exception AttributeError: AttributeError(""'NoneType' object has no attribute 'tell'"",) in <bound method memmap.__del__ of memmap(5.63224876e-316)> ignored
/usr/lib64/enthought/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-linux-x86_64.egg/sklearn/externals/joblib/test/test_numpy_pickle.py:179: Warning: file ""/tmp/tmpxaBM9P/test.pkl952"" appears to be a zip, ignoring mmap_mode ""r"" flag passed
numpy_pickle.load(this_filename, mmap_mode='r')
Exception AttributeError: AttributeError(""'NoneType' object has no attribute 'tell'"",) in <bound method memmap.__del__ of memmap(5.6115802e-316)> ignored
....________________________________________________________________________________
teardown numpy_pickle
---
............An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (38, 0))
# .........................................................................................S.........................................................................................................................................................................................................FEFEFE............................................................................EEE...................................................................................................................................................................EE
#
## ERROR: Doctest: sklearn.datasets.base.load_sample_images
Traceback (most recent call last):
File ""/usr/lib64/enthought/lib/python2.7/site-packages/nose-1.1.2-py2.7.egg/nose/plugins/doctests.py"", line 395, in tearDown
delattr(builtin_mod, self._result_var)
AttributeError: _
#",closed,,2012-02-02 23:36:51+00:00,2012-02-07 00:45:43+00:00,11,onares,https://github.com/scikit-learn/scikit-learn/issues/607,6249,97.14777777777778
3153420,614,scikit-learn/scikit-learn,KernelPCA with fit_inverse_transform=True doesn't support precomputed kernels,"The following happens when I try to use a precomputed kernel with kernelpca and fit_inverse_transform=True. It looks like this case isn't handled in the code but I haven't had a chance to patch it yet.
Traceback (most recent call last):
File ""<stdin>"", line 37, in <module>
File ""/usr/local/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-linux-i686.egg/sklearn/decomposition/kernel_pca.py"", line 212, in fit_transform
self.fit(X, **params)
File ""/usr/local/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-linux-i686.egg/sklearn/decomposition/kernel_pca.py"", line 195, in fit
self._fit_inverse_transform(X_transformed, X)
File ""/usr/local/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-linux-i686.egg/sklearn/decomposition/kernel_pca.py"", line 173, in _fit_inverse_transfor\
m
self.dual_coef_ = linalg.solve(K, X, sym_pos=True, overwrite_a=True)
File ""/usr/local/lib/python2.7/site-packages/scipy-0.10.0-py2.7-linux-i686.egg/scipy/linalg/basic.py"", line 47, in solve
raise ValueError('expected square matrix')
ValueError: expected square matrix",closed,,2012-02-09 07:27:10+00:00,2012-02-17 08:34:56+00:00,3,bwhite,https://github.com/scikit-learn/scikit-learn/issues/614,1163,193.12944444444443
3169805,615,scikit-learn/scikit-learn,Normalization in SparsePCA,"In SparsePCA, there transform method tries to normalize each output feature. If one feature is zero for all input samples, this results in NaN.",closed,,2012-02-10 09:40:05+00:00,2012-03-19 12:12:53+00:00,1,amueller,https://github.com/scikit-learn/scikit-learn/issues/615,170,914.5466666666666
3173338,616,scikit-learn/scikit-learn,RandomForrestClassifier,"Hi,
I'm trying to use RandomForestClassifier and apparently I cannot find the sklearn.ensamble module. Where can I find it ?
Thank you",closed,,2012-02-10 15:28:57+00:00,2012-02-10 15:59:20+00:00,5,vicpara,https://github.com/scikit-learn/scikit-learn/issues/616,158,0.5063888888888889
3180308,617,scikit-learn/scikit-learn,Normalization in OMP,"With `normalization=True` in OMP and giving a gram matrix to `fit` the result is different if `Xy`is given to the function vs the function computing it.
Don't see why but after scaling with ""X_std"", `Xy` is different from the `Xy` computed with the already normalized `X`.",closed,,2012-02-10 22:07:56+00:00,2012-05-05 18:42:29+00:00,3,amueller,https://github.com/scikit-learn/scikit-learn/issues/617,294,2036.5758333333333
3180622,619,scikit-learn/scikit-learn,LassoCV docs,"I am not familiar with the generalized cross validation but something seems to be missing here:
http://scikit-learn.org/dev/modules/linear_model.html#using-cross-validation
the lower plot looks a bit empty.
Also, the attribute `alpha` of `LassoCV` is not documented and I guess it should end with an underscore if I understand it correctly.",closed,,2012-02-10 22:30:54+00:00,2012-02-26 22:15:18+00:00,3,amueller,https://github.com/scikit-learn/scikit-learn/issues/619,354,383.74
3189562,621,scikit-learn/scikit-learn,keyword argument error in randomized_svd,"I am using version 0.11-git. When I tried to run wikipedia_principal_eigenvector.py in examples/application directory, I got following error.
Traceback (most recent call last):
File ""wikipedia_principal_eigenvector.py"", line 175, in <module>
U, s, V = randomized_svd(X, 5, q=3)
TypeError: randomized_svd() got an unexpected keyword argument 'q'
It seems after fast_svd was replaced by randomized_svd, keyword argument 'q' was left unchanged.",closed,,2012-02-12 07:03:35+00:00,2012-02-13 08:22:40+00:00,3,ghost,https://github.com/scikit-learn/scikit-learn/issues/621,492,25.318055555555556
3193122,622,scikit-learn/scikit-learn,RandomForrestClassifier for n_jobs != 1,"Hi,
I'm using a RandomForestClassifier with n_jobs =-1. I have also tried values != 1 with the same effect.
The problem is that python process gets replicated infinitely until the OS crashes. There are no loops in my code which reads like this:
1. init the RandomForest
2. Load the data
3. Prepare the data
4. predictor.fit_transform(X,y)
5. print some predictor parameters
It seems that all the processes start from very beginning and when they reach the 4th step...they replicate again. I end up soon having tens of processes running over and over again. 5th step never gets executed.
When I have set the n_jobs =1 everything works fine.
I'm running Win 7 x64, Python 2.7.2 32bit with scikit 0.10",closed,,2012-02-12 21:03:10+00:00,2012-02-12 23:19:10+00:00,13,vicpara,https://github.com/scikit-learn/scikit-learn/issues/622,743,2.2666666666666666
3195264,624,scikit-learn/scikit-learn,What would be the best way to add precomputed kernel support in RidgeCV ?,"I'd like to be able to use precomputed kernels with RidgeCV. Would you be interested in this? If so, I'd like to hear your thoughts on how to do this well so that I can contribute a PR.
Related question: when `n_samples > n_features`, there is a more efficient way to get RidgeCV ""LOOE"" for free (with an SVD of `X`). Again would you be interested in this? How should I factor the code to contribute?
And thanks again for such a great package !
n",closed,"New Feature, module:linear_model",2012-02-13 02:51:51+00:00,2024-04-17 12:48:20+00:00,3,npinto,https://github.com/scikit-learn/scikit-learn/issues/624,523,106737.9413888889
3201332,625,scikit-learn/scikit-learn,NearestNeighbors API,"I just noticed that the `NearestNeighbors` class has neither a `transform` nor a `predict` method.
This seems like an API break to me.
It has `kneighbors` and `epsilon_neighbors` (and graph functions).
I feel it would be more consistent to have a single function for both k and epsilon and have an additional argument.
I would prefer the method that returns the nearest neighbors to a point to be the `predict` method, which
would be consistent (in some way) with the kmeans API.",closed,,2012-02-13 14:32:25+00:00,2012-03-18 17:09:53+00:00,5,amueller,https://github.com/scikit-learn/scikit-learn/issues/625,501,818.6244444444444
3207767,626,scikit-learn/scikit-learn,Dense SVM Prediction with precomputed kernel should error check,If the kernel is provided transposed no exception is produced yet this is something that we can easily check for.,closed,,2012-02-13 19:41:16+00:00,2012-06-13 20:30:21+00:00,2,bwhite,https://github.com/scikit-learn/scikit-learn/issues/626,177,2904.8180555555555
3229933,629,scikit-learn/scikit-learn,"'ignore' for Unicode conversion in {Word,Char}NGramAnalyzer","When analysing documents, if a bytes array is given to one of the n-gram analyzers, it is decoded using a given charset. However the errors are set to 'ignore', which I feel may hide problems in codes (i.e. using the incorrect encoding may screw with results).
Location: in `feature_extraction.text.py`, lines 156 and 208, for classes WordNGramAnalyzer and CharNGramAnalyzer.
Fix: I'd like to add a keyword to the classes on what to do, default being 'error' rather than 'ignore' (i.e. if people want to ignore errors, they have to explicitly state so).",closed,,2012-02-15 03:55:17+00:00,2012-02-16 22:15:20+00:00,2,robertlayton,https://github.com/scikit-learn/scikit-learn/issues/629,615,42.33416666666667
3231088,630,scikit-learn/scikit-learn,Regression in SVC.decision_function,"This change by @amueller
https://github.com/scikit-learn/scikit-learn/commit/658897497399147a78fad5f7001fc62dd1e487ed
breaks the ability to train an OVA model with SVC as demonstrated by the following snippet by @mblondel :
```
def test_ovr_fit_predict_svc():
ovr = OneVsRestClassifier(SVC())
pred = ovr.fit(iris.data, iris.target).predict(iris.data)
assert_equal(len(ovr.estimators_), n_classes)
print ovr.score(iris.data, iris.target)
```",closed,,2012-02-15 07:33:52+00:00,2012-02-17 07:53:40+00:00,7,ogrisel,https://github.com/scikit-learn/scikit-learn/issues/630,499,48.33
3248768,636,scikit-learn/scikit-learn,Parallel K-Means hangs on Mac OS X Lion,"I first noticed this when running 'make test' hanged. I tried with stable and bleeding edge scipy (I initially thought it was something arpack related).
The test `sklearn.cluster.tests.test_k_means.test_k_means_plus_plus_init_2_jobs` hangs the process.
Running in IPython something like `KMeans(init='k-means++', n_jobs=2).fit(np.random.randn(100, 100))` hangs as well.
I thought maybe there was something wrong with my setup, but `cross_val_score` works OK with `n_jobs=2`.",closed,Bug,2012-02-16 10:26:14+00:00,2014-06-20 13:20:28+00:00,59,vene,https://github.com/scikit-learn/scikit-learn/issues/636,517,20522.90388888889
3268425,638,scikit-learn/scikit-learn,Intercept sign in SVM needs love,"I made an ugly hack in #634 to fix a regression I introduced earlier.
I would prefer a prettier solution.",closed,"Enhancement, module:svm",2012-02-17 14:47:14+00:00,2024-04-17 12:46:52+00:00,4,amueller,https://github.com/scikit-learn/scikit-learn/issues/638,138,106629.99388888889
3273986,639,scikit-learn/scikit-learn,LassoCV.estimator and ElasticNetCV.estimator,"These are two member types of these classes. As far as I can tell, they are never used and are undocumented.
What are they for?",closed,,2012-02-17 21:03:30+00:00,2012-02-17 21:46:26+00:00,2,amueller,https://github.com/scikit-learn/scikit-learn/issues/639,172,0.7155555555555555
3274040,640,scikit-learn/scikit-learn,Old Version Warning on Docs,"The old docs need to be rebuild with the ""old version warning"" that Jake made.
Also, the 0.7 docs seem to be unavailable atm.",closed,Documentation,2012-02-17 21:07:41+00:00,2013-01-11 12:12:43+00:00,6,amueller,https://github.com/scikit-learn/scikit-learn/issues/640,154,7887.083888888889
3293034,642,scikit-learn/scikit-learn,Gaussian Process exception' ambiguous notation,"I was writing a simple classifier using GP (one vs all)
Using the iris data set.
``` python
iris=load_iris()
Y=np.array(iris.target)
x=np.array(iris.data)
y1=np.copy(Y)
y1[:50]=np.ones(50) #For the first one vs all
y1[50:]=np.zeros(100)
gp = GaussianProcess(theta0=5e-1)
gp.fit(x,y1)
```
If you run this, you'll get the exception
Exception: Multiple X are not allowed
It took me a while to figure out it refers to the fact that multiple X's have the same value (the iris data set has only one significant digit, thus multiple inputs have the same value)
Unless you go into the code, you don't even figure if X refers to the features or the classes.
I think the notation could be improved to something like:
""Multiple input features cannot have the same value""
Thanks",closed,,2012-02-20 10:38:03+00:00,2012-02-22 20:37:30+00:00,5,leonpalafox,https://github.com/scikit-learn/scikit-learn/issues/642,827,57.990833333333335
3315460,644,scikit-learn/scikit-learn,Upgrade numpy extension for sphinx,"So we can get ""References"" sections.
see:
https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt",closed,,2012-02-21 18:03:11+00:00,2012-03-03 19:50:37+00:00,1,amueller,https://github.com/scikit-learn/scikit-learn/issues/644,146,265.79055555555556
3332596,646,scikit-learn/scikit-learn,SVM examples,"It seems many SVM examples got screwed up by the recent ""scale_C"" change. For example the plot comparing different kernels and the plot showing decision boundaries for unbalanced data.
Also, I noticed there is no suggestion on how to set C (or gamma) in the narrative. I thought it was there before and I think it should be there... saying something like: do cross-validation with exponential spacing. The ranges where one has to search changed dramatically with the ""scale_C"" change... obviously ;)",closed,,2012-02-22 13:33:29+00:00,2012-02-22 20:24:48+00:00,5,amueller,https://github.com/scikit-learn/scikit-learn/issues/646,513,6.855277777777777
3376203,652,scikit-learn/scikit-learn,linear regression coefficients of inconsistent shape,"Shape of output coefficient arrays are of varying _dimension_.
``` python
from sklearn.linear_model import LinearRegression
X2 = array([[ 0.38349978, 0.61650022],
[ 0.58853682, 0.41146318]])
X3 = array([[ 0.27677969, 0.70693172, 0.01628859],
[ 0.08385139, 0.20692515, 0.70922346]])
Y = array([1,1])
lr2 = LinearRegression(fit_intercept=False).fit(X2,Y)
lr3 = LinearRegression(fit_intercept=False).fit(X3,Y)
lr2.coef_.shape #(2,)
lr3.coef_.shape #(3, 1)
```",closed,,2012-02-24 17:38:02+00:00,2012-05-15 19:58:25+00:00,9,benjaminwilson,https://github.com/scikit-learn/scikit-learn/issues/652,532,1946.3397222222222
3384030,653,scikit-learn/scikit-learn,DOC: document inaccuracy for linear model,"Doc here (http://scikit-learn.sourceforge.net/dev/modules/classes.html#module-sklearn.linear_model) says that LinearRegression is for ""dense"" data, but I find it also accept sparse matrix. Maybe this page needs updates.",closed,,2012-02-25 09:41:59+00:00,2012-03-03 18:40:59+00:00,1,fannix,https://github.com/scikit-learn/scikit-learn/issues/653,261,176.98333333333332
3413388,655,scikit-learn/scikit-learn,The ensembles like random forest classifier need to support sparse matrix,"Currently rfc only support array like input , thus it can not apply to huge dataset. If the sparse matrix could be supported in the near future, would Be Greatly Appreciated!",closed,New Feature,2012-02-28 04:48:07+00:00,2015-05-11 07:39:51+00:00,47,sworddish,https://github.com/scikit-learn/scikit-learn/issues/655,248,28034.862222222222
3414587,656,scikit-learn/scikit-learn,document classification example is broken,"<pre>
$ python examples/document_classification_20newsgroups.py
[...]
Loading 20 newsgroups dataset for categories:
['alt.atheism', 'talk.religion.misc', 'comp.graphics', 'sci.space']
data loaded
2034 documents (training set)
1353 documents (testing set)
4 categories
Extracting features from the training dataset using a sparse vectorizer
Traceback (most recent call last):
File ""examples/document_classification_20newsgroups.py"", line 110, in <module>
X_train = vectorizer.fit_transform(data_train.data)
File ""/home/mathieu/Desktop/projects/scikit-learn/sklearn/feature_extraction/text.py"", line 637, in fit_transform
X = self.tc.fit_transform(raw_documents)
File ""/home/mathieu/Desktop/projects/scikit-learn/sklearn/feature_extraction/text.py"", line 401, in fit_transform
term_count_current = Counter(self.analyzer.analyze(doc))
File ""/home/mathieu/Desktop/projects/scikit-learn/sklearn/feature_extraction/text.py"", line 191, in analyze
self.charset_error)
File ""/usr/lib/python2.6/encodings/utf_8.py"", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xda in position 537: invalid continuation byte
</pre>",closed,Documentation,2012-02-28 07:48:27+00:00,2013-06-28 16:18:42+00:00,25,mblondel,https://github.com/scikit-learn/scikit-learn/issues/656,1252,11672.504166666668
3418006,657,scikit-learn/scikit-learn,more documentation needed,"Hi guys,
I have a hard time struggling with parameter tuning for most of the models in the scikit. I'm a machine learning student and I'm using scikit at various projects. I know in theory how each ML technique works and what is its goal but still I have a hard time figuring out what most of the parameters a model takes in the constructor means. I think a more detailed documentation should be available. The names of the parameters are rarely self explaining and most of the time the details covered on their explanation is tautological. Parameter and hyper-parameter tuning for ML models is tricky. But I find it more obscure when I cannot apply my intuition because I have no idea what a parameter is actually doing/meaning.
I think most of new comers and users will find your platform more easy to understand and efficiently use if there is a detailed explanation for the parameters and the models / algorithm / objective functions that are used under the hood of scikit.
Thanks",closed,,2012-02-28 12:51:26+00:00,2012-03-18 17:05:21+00:00,19,vicpara,https://github.com/scikit-learn/scikit-learn/issues/657,1010,460.2319444444444
3425766,658,scikit-learn/scikit-learn,Release for Windows x64,"Hi guys,
Could you please make available on the next release of scikit a version for python x64 on Windows ?
It is a huge pain to build scikit on windows x64. Basically you have to transform windows in linux by installing a lot of linux equivalent tools.It really messes up any machine and in the end it still doesn't work .
Thank's",closed,,2012-02-28 20:45:41+00:00,2012-02-28 20:56:38+00:00,4,vicpara,https://github.com/scikit-learn/scikit-learn/issues/658,358,0.1825
3445149,661,scikit-learn/scikit-learn,PCA fails with n_components='mle' when n_features > n_samples,"Here is code to reproduce the error with git @ 6783466. The tests only have the case where n_features <= n_samples
``` python
from sklearn.decomposition import PCA
from numpy.random import randn
X = randn(100, 10)
PCA(n_components='mle').fit(X) # OK
PCA(n_components='mle').fit(X.T) # ERROR
```
The error is in the _assess_dimension function.
```
Traceback (most recent call last):
File ""t.py"", line 9, in <module>
PCA(n_components='mle').fit(X.T) # ERROR
File ""/usr/local/src/scikit-learn/sklearn/decomposition/pca.py"", line 192, in fit
self._fit(X, **params)
File ""/usr/local/src/scikit-learn/sklearn/decomposition/pca.py"", line 240, in _fit
n_samples, X.shape[1])
File ""/usr/local/src/scikit-learn/sklearn/decomposition/pca.py"", line 88, in _infer_dimension_
ll.append(_assess_dimension_(spectrum, rank, n, p))
File ""/usr/local/src/scikit-learn/sklearn/decomposition/pca.py"", line 72, in _assess_dimension_
pa += (np.log((spectrum[i] - spectrum[j])
IndexError: index out of bounds
```",closed,,2012-02-29 22:02:03+00:00,2012-03-04 17:19:20+00:00,7,brentp,https://github.com/scikit-learn/scikit-learn/issues/661,1087,91.28805555555556
3452335,663,scikit-learn/scikit-learn,Bug in error message in StratifiedKFold initialization,"In the initialization method of StratifiedKFold (in cross_validation.py), there is some code that makes sure that `k` is smaller than the number of entries in the least-populated class. I guess the idea is that each fold should contain at least one example from every class.
In the case that the least populated class has fewer entires than k, the error message says `""Cannot have number of folds k=%d smaller than %d, the minimum number of labels for any class."" % (k, min_labels)`
I think it should say ""Cannot have number of folds k=%d **greater** than %d, the minimum number of labels for any class."" Here's a snippet of the error message in context
``` python
def __init__(self, y, k, indices=True):
y = np.asarray(y)
n = y.shape[0]
_validate_kfold(k, n)
_, y_sorted = unique(y, return_inverse=True)
min_labels = np.min(np.bincount(y_sorted))
if k > min_labels:
raise ValueError(""Cannot have number of folds k=%d""
"" smaller than %d, the minimum""
"" number of labels for any class.""
% (k, min_labels))
```",closed,,2012-03-01 10:45:41+00:00,2012-03-03 18:40:05+00:00,4,conradlee,https://github.com/scikit-learn/scikit-learn/issues/663,1216,55.906666666666666
3461218,665,scikit-learn/scikit-learn,Nose Tests Fail,"OS - Mac OS X 10.6.8
```
python -c ""import sklearn; sklearn.test()""
Running unit tests and doctests for sklearn
NumPy version 1.5.1
NumPy is installed in /Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/numpy
Python version 2.7.1 |EPD 7.0-2 (32-bit)| (r271:86832, Dec 3 2010, 15:41:32) [GCC 4.0.1 (Apple Inc. build 5488)]
nose version 1.0.0
/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-macosx-10.5-i386.egg/sklearn/cross_val.py:2: UserWarning: sklearn.cross_val namespace is deprecated in version 0.9 and will be removed in version 0.11. Please use sklearn.cross_validation instead.
warnings.warn('sklearn.cross_val namespace is deprecated in version 0.9'
/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-macosx-10.5-i386.egg/sklearn/hmm.py:24: UserWarning: sklearn.hmm is orphaned, undocumented and has known numerical stability issues. If nobody volunteers to write documentation and make it more stable, this module will be removed in version 0.11.
warnings.warn('sklearn.hmm is orphaned, undocumented and has known numerical'
.........../Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-macosx-10.5-i386.egg/sklearn/neighbors/base.py:23: UserWarning: kneighbors: neighbor k+1 and neighbor k have the same distance: results will be dependent on data order.
warnings.warn(msg)
................................/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-macosx-10.5-i386.egg/sklearn/cluster/spectral.py:77: UserWarning: pyamg not available, using scipy.sparse
warnings.warn('pyamg not available, using scipy.sparse')
.S...................E..SS...................................../Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-macosx-10.5-i386.egg/sklearn/decomposition/dict_learning.py:262: UserWarning: Please note: the interface of sparse_encode has changed: It now follows the dictionary learning API and it also handles parallelization. Please read the docstring for more information.
warnings.warn(""Please note: the interface of sparse_encode has changed: ""
.........S........................./Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-macosx-10.5-i386.egg/sklearn/decomposition/nmf.py:237: UserWarning: Iteration limit reached in nls subproblem.
warnings.warn(""Iteration limit reached in nls subproblem."")
.................../Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-macosx-10.5-i386.egg/sklearn/decomposition/sparse_pca.py:147: RuntimeWarning: invalid value encountered in divide
U /= np.sqrt((U ** 2).sum(axis=0))
.....S...../Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-macosx-10.5-i386.egg/sklearn/ensemble/forest.py:309: RuntimeWarning: divide by zero encountered in log
return np.log(self.predict_proba(X))
....................../Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-macosx-10.5-i386.egg/sklearn/externals/joblib/test/test_func_inspect.py:111: UserWarning: Cannot inspect object <functools.partial object at 0x1a8a76c0>, ignore list will not work.
nose.tools.assert_equal(filter_args(ff, ['y'], 1),
........................................................................................________________________________________________________________________________
test_memory setup
________________________________________________________________________________
________________________________________________________________________________
test_memory teardown
________________________________________________________________________________
..________________________________________________________________________________
test_memory setup
________________________________________________________________________________
.........................................................................................................................________________________________________________________________________________
test_memory teardown
________________________________________________________________________________
.________________________________________________________________________________
setup numpy_pickle
________________________________________________________________________________
.....................................Exception AttributeError: AttributeError(""'NoneType' object has no attribute 'tell'"",) in <bound method memmap.__del__ of memmap(2.8286046898131197e-183)> ignored
Exception AttributeError: AttributeError(""'NoneType' object has no attribute 'tell'"",) in <bound method memmap.__del__ of memmap(2.20861708294445e-183)> ignored
/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-macosx-10.5-i386.egg/sklearn/externals/joblib/test/test_numpy_pickle.py:179: Warning: file ""/var/folders/AL/ALAqpXbxHs44xCiaqcTiZk+++TI/-Tmp-/tmpJXhrg2/test.pkl577"" appears to be a zip, ignoring mmap_mode ""r"" flag passed
numpy_pickle.load(this_filename, mmap_mode='r')
Exception AttributeError: AttributeError(""'NoneType' object has no attribute 'tell'"",) in <bound method memmap.__del__ of memmap(5.563520520564929e-185)> ignored
....________________________________________________________________________________
teardown numpy_pickle
________________________________________________________________________________
............An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (39, 0))
.........................................................................................S.........................................................................................................................................................................................................FEFEFE............................................................................EEE...................................................................................................................................................................EE
======================================================================
ERROR: Doctest: sklearn.datasets.base.load_sample_images
----------------------------------------------------------------------
Traceback (most recent call last):
File ""/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/nose/plugins/doctests.py"", line 395, in tearDown
delattr(__builtin__, self._result_var)
AttributeError: _
======================================================================
```",closed,,2012-03-01 18:41:25+00:00,2012-03-31 14:51:27+00:00,3,denzilc,https://github.com/scikit-learn/scikit-learn/issues/665,6922,716.1672222222222
3489741,666,scikit-learn/scikit-learn,Bug in SGDClassifier class_weights?,"There seems some unintentional effect in _set_class_weights in stochastic_gradient.py.
It seems to me the effect of the if in line [200](https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/stochastic_gradient.py#L200) is thrown away in line 203 again.
I guess that can be addressed when refactoring the class_weights, so this is just a reminder for me ;)",closed,,2012-03-03 14:14:35+00:00,2012-05-05 16:58:49+00:00,4,amueller,https://github.com/scikit-learn/scikit-learn/issues/666,417,1514.7372222222223
3495267,675,scikit-learn/scikit-learn,Make linear regression support multiple outputs,,closed,,2012-03-04 09:43:21+00:00,2012-03-21 20:09:06+00:00,10,amueller,https://github.com/scikit-learn/scikit-learn/issues/675,48,418.4291666666667
3496116,676,scikit-learn/scikit-learn,ward clustering can not handle dense affinity matrix,,closed,,2012-03-04 13:02:59+00:00,2012-03-04 19:58:20+00:00,3,amueller,https://github.com/scikit-learn/scikit-learn/issues/676,53,6.9225
3497119,677,scikit-learn/scikit-learn,Affinity propagation docstring,"It is not clear to me what `p` does, in particular when it is a single float.
In general I fell the docs need a bit more love here - the docstring claims that fit computes mean shift clustering....",closed,,2012-03-04 16:33:45+00:00,2012-03-04 17:01:08+00:00,0,amueller,https://github.com/scikit-learn/scikit-learn/issues/677,228,0.4563888888888889
3499287,680,scikit-learn/scikit-learn,Clean up sparse linear model examples,"The linear model examples all generate their own datasets.
This should be simplified by using the dataset generators in `sklearn.datasets`.",closed,"Easy, Enhancement",2012-03-04 22:16:45+00:00,2012-12-05 23:00:53+00:00,9,amueller,https://github.com/scikit-learn/scikit-learn/issues/680,177,6624.735555555556
3508016,681,scikit-learn/scikit-learn,RFECV.fit() doesn't add the worst feature to cv_scores_,"Hello,
I encountered a problem in the RFECV results:
``` python
svc = SVC(kernel=""linear"", C=1, probability=False, scale_C=False, shrinking=True, tol=0.001)
rfecv = RFECV(estimator=svc, step=1, cv=StratifiedKFold(y, 2) )
rfecv.fit(X, y)
```
- the number of input features is `X.shape[1]`
- but the scores are returned for `len(rfecv.cv_scores_)` subsets of features, that is lower by one than the number of input features
- the `rfecv.cv_scores_` should include also results of the worst combination of features (often all of them)",closed,,2012-03-05 15:28:30+00:00,2012-08-26 16:35:12+00:00,5,smidm,https://github.com/scikit-learn/scikit-learn/issues/681,589,4177.111666666667
3584527,688,scikit-learn/scikit-learn,sklearn importation failed,"Hi everybody,
I'm running ubuntu 11.10 with python 2.7.
I tried to install scikit-learn from my distribution package system and so far things went ok. But i cannot import sklearn and i've got the following error message when i run unittest with `python -c ""import scikits.learn as skl; skl.test()""`:
```
======================================================================
ERROR: test_fit_works_on_sequences_of_different_length (scikits.learn.tests.test_hmm.TestGaussianHMMWithFullCovars)
----------------------------------------------------------------------
Traceback (most recent call last):
File ""/usr/lib/pymodules/python2.7/scikits/learn/tests/test_hmm.py"", line 341, in test_fit_works_on_sequences_of_different_length
h.fit(obs)
File ""/usr/lib/pymodules/python2.7/scikits/learn/hmm.py"", line 338, in fit
framelogprob = self._compute_log_likelihood(seq)
File ""/usr/lib/pymodules/python2.7/scikits/learn/hmm.py"", line 669, in _compute_log_likelihood
return lmvnpdf(obs, self._means, self._covars, self._cvtype)
File ""/usr/lib/pymodules/python2.7/scikits/learn/mixture.py"", line 79, in lmvnpdf
return lmvnpdf_dict[cvtype](obs, means, covars)
File ""/usr/lib/pymodules/python2.7/scikits/learn/mixture.py"", line 585, in _lmvnpdffull
cv_chol = linalg.cholesky(cv, lower=True)
File ""/usr/lib/python2.7/dist-packages/scipy/linalg/decomp_cholesky.py"", line 66, in cholesky
c, lower = _cholesky(a, lower=lower, overwrite_a=overwrite_a, clean=True)
File ""/usr/lib/python2.7/dist-packages/scipy/linalg/decomp_cholesky.py"", line 24, in _cholesky
raise LinAlgError(""%d-th leading minor not positive definite"" % info)
LinAlgError: 3-th leading minor not positive definite
----------------------------------------------------------------------
Ran 440 tests in 24.346s
FAILED (SKIP=4, errors=1)
```
Does anybody had similar issues ?
Thanks in advance,
Nicolas.",closed,,2012-03-09 15:29:08+00:00,2012-06-03 18:58:35+00:00,8,NehrzuL,https://github.com/scikit-learn/scikit-learn/issues/688,1928,2067.4908333333333
3634471,691,scikit-learn/scikit-learn,metrics.auc bug,"The following code should produce an area under the curve of 1.0. auc function from the metrics module does not:
import numpy as np
from sklearn.metrics import roc_curve, auc
x=np.random.rand(20)
x1=x[argsort(x)][0:10]
x2=x[argsort(x)][10:]
labels = np.repeat([0,1],[10,10])
fpr,tpr,thresholds = roc_curve(labels,np.concatenate([x1,x2]))
print auc(fpr,tpr)
I'm pretty sure the bug's related to how argsort function within auc is handling (or mishandling) rank ties. In particular, auc function sorts fpr vector but if there are many equal entries for fpr argsort appears to randomly assign a rank to them but this is a problem because then the tpr vector can (and will) get misaligned.",closed,,2012-03-13 17:42:20+00:00,2012-03-14 06:16:52+00:00,1,lwoloszy,https://github.com/scikit-learn/scikit-learn/issues/691,704,12.575555555555555
3652794,697,scikit-learn/scikit-learn,FastICA fails with whiten=False,"```
In [1]: import numpy as np
In [2]: from sklearn.decomposition import FastICA
In [3]: X = np.random.random((40, 20))
In [4]: ica = FastICA(3, whiten=False)
In [5]: ica.fit(X)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/home/jake/<ipython-input-5-219ffa0bcc4c> in <module>()
----> 1 ica.fit(X)
/usr/local/lib/python2.6/dist-packages/scikit_learn-0.11_git-py2.6-linux-i686.egg/sklearn/decomposition/fastica_.pyc in fit(self, X)
363 self.fun, self.fun_prime, self.fun_args, self.max_iter,
364 self.tol, self.w_init,
--> 365 random_state=self.random_state)
366 if self.whiten == True:
367 self.unmixing_matrix_ = np.dot(unmixing_, whitening_)
/usr/local/lib/python2.6/dist-packages/scikit_learn-0.11_git-py2.6-linux-i686.egg/sklearn/decomposition/fastica_.pyc in fastica(X, n_components, algorithm, whiten, fun, fun_prime, fun_args, max_iter, tol, w_init, random_state)
290 func = algorithm_funcs.get(algorithm, 'parallel')
291
--> 292 W = func(X1, **kwargs)
293 del X1
294
/usr/local/lib/python2.6/dist-packages/scikit_learn-0.11_git-py2.6-linux-i686.egg/sklearn/decomposition/fastica_.pyc in _ica_par(X, tol, g, gprime, fun_args, max_iter, w_init)
99 it = 0
100 while ((lim > tol) and (it < (max_iter - 1))):
--> 101 wtx = np.dot(W, X)
102 gwtx = g(wtx, fun_args)
103 g_wtx = gprime(wtx, fun_args)
ValueError: objects are not aligned
```",closed,,2012-03-14 17:45:42+00:00,2012-03-25 16:23:21+00:00,3,jakevdp,https://github.com/scikit-learn/scikit-learn/issues/697,1679,262.6275
3669120,700,scikit-learn/scikit-learn,fetch_mldata needs to handle sparse matrices as labels,"This might be a special case but the ""yeast"" data set returns a sparse matrix as labels.
As this is a standard dataset for multi-label prediction, it would be good if we supported that.
Maybe we could even make an example.",closed,,2012-03-15 16:42:43+00:00,2012-03-18 17:02:41+00:00,6,amueller,https://github.com/scikit-learn/scikit-learn/issues/700,277,72.33277777777778
3681083,703,scikit-learn/scikit-learn,shuffle option in KFold,"If the samples in my dataset are grouped by class (e.g. `y = [1, 1, 1, 1, ..., 2, 2, 2, 2, 2, ...]`), KFold may produce completely useless folds. A shuffle option could be added to solve this problem. The main difference with ShuffleSplit is that the folds would be guaranteed to not overlap.",closed,,2012-03-16 11:53:31+00:00,2012-03-23 05:32:31+00:00,2,mblondel,https://github.com/scikit-learn/scikit-learn/issues/703,316,161.65
3701244,708,scikit-learn/scikit-learn,Centering of Targets in linear_model,"I have the impression that the `center_data` function in `linear_model` does not doe the right thing.
Shouldn't the components of `y` be centered individually?
I came across this when trying to understand issue #617.",closed,,2012-03-18 17:34:22+00:00,2012-03-19 17:02:01+00:00,12,amueller,https://github.com/scikit-learn/scikit-learn/issues/708,254,23.460833333333333
3713354,713,scikit-learn/scikit-learn,irrational huge pickle file with sparse linearSVC,"I found that the pickle file of sparse linearSVC became irrational larger after shifting the index of features.
I had trained a series of models using window of tokens in natural language processing. The pickle files are less than 10M with 20,000~50,000 dense features. In order to create a flexible approach, I shifted the index of features to left by 9 bits, and all the new pickle files have the same size 582M. It seems that all the void feature weights were saved. Can we just save the useful data?",closed,Bug,2012-03-19 16:42:48+00:00,2012-09-05 20:08:55+00:00,13,XiaoLiuAI,https://github.com/scikit-learn/scikit-learn/issues/713,553,4083.4352777777776
3734301,715,scikit-learn/scikit-learn,dev website format issue,"On the dev version of the website, the formatting of the navigation bar is screwed up.
I'm running linux with firefox 10.0.2. A screenshot of the issue can be seen here:
http://www.astro.washington.edu/users/vanderplas/Screenshot-2.png",closed,,2012-03-20 19:38:24+00:00,2012-06-05 22:11:37+00:00,6,jakevdp,https://github.com/scikit-learn/scikit-learn/issues/715,261,1850.5536111111112
3745942,716,scikit-learn/scikit-learn,Problem fitting LassoLarsCV - broadcasting error,"I'm trying to follow along the example presented [here](http://scikit-learn.org/dev/auto_examples/linear_model/plot_sparse_recovery.html#example-linear-model-plot-sparse-recovery-py) on sparse feature recovery using a randomized lasso.
Part of that example requires fitting a LasoLarsCV estimator. However, when I try to fit that, I get an error, you can see the traceback [here](http://paste.org/47063).
You can re-create this problem by downloading the data that I'm using [here](http://dl.dropbox.com/u/1800572/LassoProblemData.mat). Then try the following:
``` python
from scipy import io
matlab_dict = io.loadmat(""LassoProblemData.mat"")
X, y = matlab_dict[""X""], matlab_dict[""y""]
lars_cv = LassoLarsCV(cv=3, n_jobs=1)
lars_cv.fit(X, y)
```",closed,,2012-03-21 14:06:36+00:00,2012-08-27 13:34:05+00:00,20,conradlee,https://github.com/scikit-learn/scikit-learn/issues/716,798,3815.4580555555553
3754388,718,scikit-learn/scikit-learn,Pipeline user guide,"Should go in the model selection section, probably.
Polishing up or replacing the ANOVA SVM might be a good idea for that.",closed,,2012-03-21 22:06:42+00:00,2012-05-06 17:08:17+00:00,1,amueller,https://github.com/scikit-learn/scikit-learn/issues/718,144,1099.026388888889
3754635,719,scikit-learn/scikit-learn,Parameter range check helper,BaseGradientBoosting does many many checks to see whether parameters that are passed are >=0. I think that should be factored. And also used in other places.,closed,,2012-03-21 22:21:24+00:00,2012-06-04 18:51:35+00:00,3,amueller,https://github.com/scikit-learn/scikit-learn/issues/719,186,1796.5030555555556
3775458,721,scikit-learn/scikit-learn,train_size and test_size in ShuffleSplit,"For consistency with the new `StratifiedShuffleSplit` CV generator, the options `train_fraction` and `test_fraction` should be deprecated and renamed to `train_size` and `test_size`. `train_size` and `test_size` can accept both a `float` or a `int`.",closed,,2012-03-23 05:18:13+00:00,2012-05-05 15:32:18+00:00,7,mblondel,https://github.com/scikit-learn/scikit-learn/issues/721,290,1042.2347222222222
3779711,722,scikit-learn/scikit-learn,Rename EllipticEnvelop,"To `EllipticEnvelope`, make a deprecated class with the old name. Correct all the examples.",closed,,2012-03-23 13:20:34+00:00,2012-03-31 14:53:56+00:00,3,amueller,https://github.com/scikit-learn/scikit-learn/issues/722,114,193.5561111111111
3794392,723,scikit-learn/scikit-learn,k-means compile issue with old gfortran: undefined reference to `MAIN__',"```
compile options: '-DNO_ATLAS_INFO=1 -Isklearn/src/cblas -I/atlas/software/bleedingedge/python-2.7.2-64/lib/python2.7/site-packages/numpy-1.6.1-py2.7-linux-x86_64.egg/numpy/core/include -I/atlas/software/bleedingedge/python-2.7.2-64/lib/python2.7/site-packages/numpy-1.6.1-py2.7-linux-x86_64.egg/numpy/core/include -I/atlas/software/bleedingedge/python-2.7.2-64/include/python2.7 -c'
gcc: sklearn/cluster/_k_means.c
/atlas/software/bleedingedge/python-2.7.2-64/lib/python2.7/site-packages/numpy-1.6.1-py2.7-linux-x86_64.egg/numpy/core/include/numpy/__multiarray_api.h:1533: warning: ‘_import_array’ defined but not used
/atlas/software/bleedingedge/python-2.7.2-64/lib/python2.7/site-packages/numpy-1.6.1-py2.7-linux-x86_64.egg/numpy/core/include/numpy/__ufunc_api.h:227: warning: ‘_import_umath’ defined but not used
/usr/bin/gfortran -Wall -L/atlas/software/bleedingedge/python-2.7.2-64/lib build/temp.linux-x86_64-2.7/sklearn/cluster/_k_means.o -L/usr/lib64 -L/cluster/data03/endw/analysis/analytau/grid/python/lib -Lbuild/temp.linux-x86_64-2.7 -lcblas -lpython2.7 -lgfortran -o build/lib.linux-x86_64-2.7/sklearn/cluster/_k_means.so
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/libgfortranbegin.a(fmain.o): In function `main':
(.text+0xa): undefined reference to `MAIN__'
collect2: ld returned 1 exit status
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/libgfortranbegin.a(fmain.o): In function `main':
(.text+0xa): undefined reference to `MAIN__'
collect2: ld returned 1 exit status
error: Command ""/usr/bin/gfortran -Wall -L/atlas/software/bleedingedge/python-2.7.2-64/lib build/temp.linux-x86_64-2.7/sklearn/cluster/_k_means.o -L/usr/lib64 -L/cluster/data03/endw/analysis/analytau/grid/python/lib -Lbuild/temp.linux-x86_64-2.7 -lcblas -lpython2.7 -lgfortran -o build/lib.linux-x86_64-2.7/sklearn/cluster/_k_means.so"" failed with exit status 1
```
Same issue discussed here: http://gcc.gnu.org/ml/fortran/2009-08/msg00389.html",closed,,2012-03-24 20:42:48+00:00,2012-04-01 01:18:43+00:00,4,ndawe,https://github.com/scikit-learn/scikit-learn/issues/723,1996,172.5986111111111
3797389,724,scikit-learn/scikit-learn,Speed up K-Means M-Step,"Todays topic: Why is KMeans in sklearn to slow?
Answer: Fancy indexing in `_centers`.
According to my new friend [runsnakerun](http://www.vrplumber.com/programming/runsnakerun/) and my old friend [kernprof](http://packages.python.org/line_profiler/), about 60% of the time of KMeans is spent doing fancy indexing to find out which data point belongs to which cluster.
While the ~60% is derived just from MNIST and `digits` with 10 clusters and probably doesn't hold in general, I think there should be quite some speedup that can be achieved here.",closed,"Enhancement, Moderate",2012-03-25 09:33:44+00:00,2012-10-11 06:36:27+00:00,35,amueller,https://github.com/scikit-learn/scikit-learn/issues/724,572,4797.045277777778
3800303,725,scikit-learn/scikit-learn,"Spectral Clustering docs, Implement Jordan/Ng SC","Currently, the Shi/Malik version is implemented.
This should be made more explicit in the docs, preferably with some formulae.
Also, I think it is worthwhile to implement the Jordan/Ng version.
This shouldn't be to hard, I think.",closed,,2012-03-25 20:21:56+00:00,2012-03-25 22:18:29+00:00,1,amueller,https://github.com/scikit-learn/scikit-learn/issues/725,279,1.9425
3802202,727,scikit-learn/scikit-learn,f_regression fails when input dtype != float,"``````
sk.feature_selection.f_regression(X1[train], y[train])
float64 int64
(masked_array(data = [0.0 0.0 0.0 ..., 0.0 0.0 0.0],
mask = [False False False ..., False False False],
fill_value = 999999)
,
array([ 1., 1., 1., ..., 1., 1., 1.]))
sk.feature_selection.f_regression(X1[train].astype(float), y[train].astype(float))
(masked_array(data = [0.543583367948 2.44987192314 0.562706176138 ..., 0.0205022258265
0.183317246834 0.0639926768111],
mask = [False False False ..., False False False],
fill_value = 999999.0)
,
array([ 0.4657299 , 0.12628355, 0.45804675, ..., 0.88694177,
0.67108857, 0.80173211]))```
``````",closed,,2012-03-26 02:07:49+00:00,2012-03-26 14:00:42+00:00,1,satra,https://github.com/scikit-learn/scikit-learn/issues/727,726,11.881388888888889
3823700,732,scikit-learn/scikit-learn,Cosine distance for sparse matrices,The `metrics.pairwise` module has a euclidean distance that works with sparse matrices. We should have a version of cosine distance that does as well.,closed,New Feature,2012-03-27 09:20:32+00:00,2013-01-19 14:47:32+00:00,19,robertlayton,https://github.com/scikit-learn/scikit-learn/issues/732,186,7157.45
3840240,735,scikit-learn/scikit-learn,Fixup naive_bayes,"The `naive_bayes` needs some love!
1. <del>The current implementation of ``BaseDiscreteNB`` requires that the inputs are positive because otherwise the log computation in line 275 will fail. If ``BaseDiscreteNB`` is only applicable to non-negative inputs we should enforce that.</del>
2. <del>``GaussianNB`` what if the variance of a feature is zero? I did a quick fix and add a small constant epsilon (=1e-9). </del>
3. `GaussianNB` and `BaseDiscreteNB` should provide similar functionality. E.g. `GaussianNB` lacks a fit parameter `class_prior` and `class_weight`.
4. `GaussianNB` has a performance regression on `bench_covtype` - error rate used to be 0.23 now 0.46 - this needs to be investigated.
5. `GaussianNB` has poor test time performance - should be similar to `SGDClassifier` (use fortran-style for model parameters).",open,"Enhancement, module:naive_bayes",2012-03-27 21:11:34+00:00,,45,pprett,https://github.com/scikit-learn/scikit-learn/issues/735,847,
3853981,737,scikit-learn/scikit-learn,grid search with only one grid point,"When `IterGrid` generates only one grid point (each parameter has only one possible value), we could bypass the cross-validation and fit the estimator normally with this one parameter combination. I have code which depending on the case has only one grid point or several grid points and I would like the former to be handled efficiently.
If other people agree, I can fix this.",closed,,2012-03-28 14:41:12+00:00,2012-03-29 06:24:27+00:00,6,mblondel,https://github.com/scikit-learn/scikit-learn/issues/737,415,15.720833333333333
3855287,738,scikit-learn/scikit-learn,More agglomerative / divisive clustering,"At the moment, Ward is the only criterion for agglomerative clustering. I think it should be fairly straight-forward to add other criteria.",closed,New Feature,2012-03-28 15:47:05+00:00,2014-07-17 10:10:12+00:00,4,amueller,https://github.com/scikit-learn/scikit-learn/issues/738,180,20178.38527777778
3889794,740,scikit-learn/scikit-learn,LogisticRegression compatibility issue between 0.10 and 0.11,"When pickle-ing a LogisticRegression model in 0.11, it has a backwards compatibility error when trying to use it in 0.10.
Did the following:
- Created a LogisticRegression model in 0.11 (simple, L2 with C=10), fit() it and pickled.
- Load the model in 0.11 and tried to ""predict()"".
Got an exception saying that the object instance does not have a property:
class_weight_label",closed,,2012-03-29 22:58:54+00:00,2012-04-02 16:52:08+00:00,1,udi,https://github.com/scikit-learn/scikit-learn/issues/740,439,89.88722222222222
3910152,743,scikit-learn/scikit-learn,average utility in pairwise module,"We should add an `average` utility function which would work as below:
`average(X, metric=""euclidean"") => return mean`
`average(X, metric=""mahattan"") => return median`
This will be useful in nearest-centroid or in k-means as the averaging operator used in these algorithms depends on the metric used (K-means with manhattan distance is called ""k-medians"").",closed,New Feature,2012-03-31 13:08:19+00:00,2014-10-21 07:50:15+00:00,8,mblondel,https://github.com/scikit-learn/scikit-learn/issues/743,393,22410.698888888888
3910581,744,scikit-learn/scikit-learn,Merge SVM grid search and parameter explanation examples,"The two examples http://scikit-learn.org/dev/auto_examples/svm/plot_rbf_parameters.html and http://scikit-learn.org/dev/auto_examples/svm/plot_svm_parameters_selection.html should be merged into one.
Also, using generated ""two_moons"" data instead of iris might be good.",closed,,2012-03-31 14:44:05+00:00,2012-05-15 19:57:15+00:00,18,amueller,https://github.com/scikit-learn/scikit-learn/issues/744,326,1085.2194444444444
3910653,745,scikit-learn/scikit-learn,Refactor class_weight logic,It's duplicated in SVM and SGD code and somewhat in the other linear models.,closed,"Enhancement, Moderate",2012-03-31 14:56:11+00:00,2016-10-27 20:13:46+00:00,3,amueller,https://github.com/scikit-learn/scikit-learn/issues/745,104,40109.29305555556
3911025,746,scikit-learn/scikit-learn,ProbabilisticPCA minor things,"I just noticed some things in ProbabilisticPCA:
- it uses a non-stanard 'dim' attribute.
- the score function has an unnecessary loop.
- I think there is a sign error and/or factor .5 error in the score function.",closed,"Easy, Enhancement",2012-03-31 16:02:43+00:00,2012-09-03 09:07:52+00:00,4,amueller,https://github.com/scikit-learn/scikit-learn/issues/746,242,3737.0858333333335
3921079,749,scikit-learn/scikit-learn,"Can't access decomposition on Ubuntu 11.04, scikit-learn 0.10","I've tried installing the latest version of scikit-learn on my Ubuntu system. The default version in the Ubuntu repository is a 4.x version, but I wanted features it did not have. After I installed scikit (I've tried source code and pip) I can see scikit.learn in Eclipse but get unresolved import errors when I try to import decomposition or pca. I ran a test on the install, and the results are as follows:
```
python -c ""import sklearn; sklearn.test()""
Running unit tests and doctests for sklearn
NumPy version 1.5.1
NumPy is installed in /usr/lib/pymodules/python2.7/numpy
Python version 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53) [GCC 4.5.2]
nose version 0.11.4
/usr/local/lib/python2.7/dist-packages/scikit_learn-0.10-py2.7-linux-x86_64.egg/sklearn/cross_val.py:2: UserWarning: sklearn.cross_val namespace is deprecated in version 0.9 and will be removed in version 0.11. Please use sklearn.cross_validation instead.
warnings.warn('sklearn.cross_val namespace is deprecated in version 0.9'
/usr/local/lib/python2.7/dist-packages/scikit_learn-0.10-py2.7-linux-x86_64.egg/sklearn/hmm.py:24: UserWarning: sklearn.hmm is orphaned, undocumented and has known numerical stability issues. If nobody volunteers to write documentation and make it more stable, this module will be removed in version 0.11.
warnings.warn('sklearn.hmm is orphaned, undocumented and has known numerical'
.........../usr/local/lib/python2.7/dist-packages/scikit_learn-0.10-py2.7-linux-x86_64.egg/sklearn/neighbors/base.py:23: UserWarning: kneighbors: neighbor k+1 and neighbor k have the same distance: results will be dependent on data order.
warnings.warn(msg)
................................/usr/local/lib/python2.7/dist-packages/scikit_learn-0.10-py2.7-linux-x86_64.egg/sklearn/cluster/spectral.py:77: UserWarning: pyamg not available, using scipy.sparse
warnings.warn('pyamg not available, using scipy.sparse')
.S...................E..SS...................................../usr/local/lib/python2.7/dist-packages/scikit_learn-0.10-py2.7-linux-x86_64.egg/sklearn/decomposition/dict_learning.py:262: UserWarning: Please note: the interface of sparse_encode has changed: It now follows the dictionary learning API and it also handles parallelization. Please read the docstring for more information.
warnings.warn(""Please note: the interface of sparse_encode has changed: ""
.........S........................./usr/local/lib/python2.7/dist-packages/scikit_learn-0.10-py2.7-linux-x86_64.egg/sklearn/decomposition/nmf.py:237: UserWarning: Iteration limit reached in nls subproblem.
warnings.warn(""Iteration limit reached in nls subproblem."")
.................../usr/local/lib/python2.7/dist-packages/scikit_learn-0.10-py2.7-linux-x86_64.egg/sklearn/decomposition/sparse_pca.py:147: RuntimeWarning: invalid value encountered in divide
U /= np.sqrt((U ** 2).sum(axis=0))
.....S...../usr/local/lib/python2.7/dist-packages/scikit_learn-0.10-py2.7-linux-x86_64.egg/sklearn/ensemble/forest.py:309: RuntimeWarning: divide by zero encountered in log
return np.log(self.predict_proba(X))
....................../usr/local/lib/python2.7/dist-packages/scikit_learn-0.10-py2.7-linux-x86_64.egg/sklearn/externals/joblib/test/test_func_inspect.py:111: UserWarning: Cannot inspect object <functools.partial object at 0x545acb0>, ignore list will not work.
nose.tools.assert_equal(filter_args(ff, ['y'], 1),
........................................................................................________________________________________________________________________________
test_memory setup
________________________________________________________________________________
________________________________________________________________________________
test_memory teardown
________________________________________________________________________________
..________________________________________________________________________________
test_memory setup
________________________________________________________________________________
.........................................................................................................................________________________________________________________________________________
test_memory teardown
________________________________________________________________________________
.________________________________________________________________________________
setup numpy_pickle
________________________________________________________________________________
.....................................Exception AttributeError: AttributeError(""'NoneType' object has no attribute 'tell'"",) in <bound method memmap.__del__ of memmap(4.2224684e-316)> ignored
Exception AttributeError: AttributeError(""'NoneType' object has no attribute 'tell'"",) in <bound method memmap.__del__ of memmap(4.23823345e-316)> ignored
Exception AttributeError: AttributeError(""'NoneType' object has no attribute 'tell'"",) in <bound method memmap.__del__ of memmap(4.23823345e-316)> ignored
/usr/local/lib/python2.7/dist-packages/scikit_learn-0.10-py2.7-linux-x86_64.egg/sklearn/externals/joblib/test/test_numpy_pickle.py:179: Warning: file ""/tmp/tmp6MTPrT/test.pkl995"" appears to be a zip, ignoring mmap_mode ""r"" flag passed
numpy_pickle.load(this_filename, mmap_mode='r')
Exception AttributeError: AttributeError(""'NoneType' object has no attribute 'tell'"",) in <bound method memmap.__del__ of memmap(4.16982077e-316)> ignored
....________________________________________________________________________________
teardown numpy_pickle
________________________________________________________________________________
............An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (38, 0))
.........................................................................................S.........................................................................................................................................................................................................FEFEFE............................................................................EEE...................................................................................................................................................................EE
======================================================================
ERROR: Doctest: sklearn.datasets.base.load_sample_images
----------------------------------------------------------------------
Traceback (most recent call last):
File ""/usr/lib/pymodules/python2.7/nose/plugins/doctests.py"", line 395, in tearDown
delattr(__builtin__, self._result_var)
AttributeError: _
======================================================================
```",closed,,2012-04-02 04:20:17+00:00,2012-04-08 13:05:21+00:00,4,jsdean,https://github.com/scikit-learn/scikit-learn/issues/749,6875,152.7511111111111
3940662,750,scikit-learn/scikit-learn,invalid index 0 error in svmlight loader,"The adult dataset available at http://leon.bottou.org/_media/papers/lasvm-adult.tar.bz2 doesn't work with the svmlight loader.
```
Traceback (most recent call last):
[...]
File ""/home/mblondel/Desktop/projects/scikit-learn/sklearn/datasets/svmlight_format.py"", line 120, in load_svmlight_files
result = list(load_svmlight_file(files.next(), n_features, dtype))
File ""/home/mblondel/Desktop/projects/scikit-learn/sklearn/datasets/svmlight_format.py"", line 74, in load_svmlight_file
return _load_svmlight_file(f, n_features, dtype, multilabel)
File ""_svmlight_format.pyx"", line 69, in sklearn.datasets._svmlight_format._load_svmlight_file (sklearn/datasets/_svmlight_format.c:1714)
ValueError: invalid index 0 in SVMlight/LibSVM data file
```
We could check whether the indices start at 0 or not and if not do `indices -= 1` at the end.",closed,,2012-04-03 07:58:28+00:00,2012-05-08 08:54:16+00:00,2,mblondel,https://github.com/scikit-learn/scikit-learn/issues/750,891,840.93
3956007,752,scikit-learn/scikit-learn,MiniBatchKMeans fails to return `k` cluster centers.,"Code to reproduce the failure:
```
import numpy as np
from sklearn.cluster import MiniBatchKMeans
np.random.seed(42)
X = np.random.randn(1000, 10)
k = len(X)
kmeans = MiniBatchKMeans(k=k, init='random')
kmeans.fit(X)
centers = kmeans.cluster_centers_
assert len(centers) == k
```",closed,,2012-04-03 20:12:29+00:00,2012-04-03 20:58:47+00:00,2,npinto,https://github.com/scikit-learn/scikit-learn/issues/752,335,0.7716666666666666
3965019,753,scikit-learn/scikit-learn,Sparse OneClassSVM missing argument to super(),"The sparse version of `OneClassSVM`'s `__init__()` method isn't providing enough arguments to `super()`. It is missing the `class_weight` argument that should be between `scale_C` and `verbose`:
``` python
>>> from sklearn import svm
>>> svm.sparse.OneClassSVM()
Traceback (most recent call last):
File ""<stdin>"", line 1, in <module>
File "".../scikit-learn/sklearn/svm/sparse/classes.py"", line 171, in __init__
verbose)
TypeError: __init__() takes exactly 16 arguments (15 given)
```
And, there's no test for `svm.sparse.OneClassSVM` to catch this problem.",closed,,2012-04-04 04:10:16+00:00,2012-04-04 09:43:58+00:00,4,njwilson,https://github.com/scikit-learn/scikit-learn/issues/753,613,5.5616666666666665
3971062,755,scikit-learn/scikit-learn,SGD learnrate heuristic explanation,"In the documentation of SGD , the learn rate heuristic is now explained pretty well.
The only part that is missing is how to choose `t_0`. For this, a presentation is referenced. As far as I can tell, the heuristic that is actually used is not in the presentation. It would be good to give a pointer to the place in the code (in linear_mode/base.py), where the actual computation is happening.
I just spend some time trying to find that piece of code, when I tried to explain to a student what the heuristic actually does.
Without knowing what to look for, it is quite hard to find out what is happening.",closed,,2012-04-04 14:04:36+00:00,2012-06-04 20:45:45+00:00,1,amueller,https://github.com/scikit-learn/scikit-learn/issues/755,640,1470.6858333333332
4010952,758,scikit-learn/scikit-learn,PLSSVD needs to specify self.copy (simple fix),"https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/pls.py#L770
**init** should set
self.copy = copy
like the others do.",closed,,2012-04-06 22:50:37+00:00,2012-04-09 19:35:43+00:00,1,bwhite,https://github.com/scikit-learn/scikit-learn/issues/758,181,68.75166666666667
4055068,759,scikit-learn/scikit-learn,scale_C and SVC parametrization,"This is about the ""documentation inaccuracy"" and the discussion on ""scale_C"".
I really want to fix this before the release but I don't have much time atm.
As far as I understood, at the moment we can agree that having ""C"" as parameter with ""scale_C=True""
is not perfect, as this doesn't agree with how ""C"" is used in the literature / other software.
I am not sure if there was a solution that we could agree on.
I would like to have votes pro/con having a ""duplicate"" parameter C (which has scale_C=False semantics) and alpha, which behaves as in the other linear models. Another option would be to have just the ""alpha"" parameter.
Any other suggestions are welcome.
I created this script: https://gist.github.com/2354823 to understand the effect of ""scale_C"".
Not sure if that helps.
Results look like this:
![true](http://i.imgur.com/6mK1q.png)
![false](http://i.imgur.com/GAViN.png)
These are grid searches for C=2**k with ""shuffle & split"" and different fractions of training data.
In principle the results should just be shifted by a factor of ""n_samples"". Guess that is not a power of two so that makes it a bit different. Not sure I like one more than the other.",closed,,2012-04-10 21:57:01+00:00,2012-05-05 20:03:02+00:00,31,amueller,https://github.com/scikit-learn/scikit-learn/issues/759,1203,598.1002777777778
4061876,760,scikit-learn/scikit-learn,"RadiusNeighborsClassifier : If small radius is used and no neighbors found, code crashes without good error message","When too small radius is used so that there are no neighbours for a test sample, code crashes without good explanation. I looked at source code and realized that reason was using too small radius. Here is a simple example:
```
from sklearn import neighbors
X = [[1.0, 1.0], [2.0, 2.0]]
y = [1,2]
r = 0.1 # no neighbours found => crash
#r = 1.0
clf = neighbors.RadiusNeighborsClassifier(radius=r)
clf.fit(X,y)
z = [[1.4, 1.4]]
print clf.predict(z)
```
The error message is not very good.
```
Traceback (most recent call last):
File ""radius_bug.py"", line 18, in <module>
print clf.predict(z)
File ""/usr/local/lib/python2.7/dist-packages/sklearn/neighbors/classification.py"", line 235, in predict
mode = np.asarray([stats.mode(pl)[0] for pl in pred_labels],
File ""/usr/lib/python2.7/dist-packages/scipy/stats/stats.py"", line 614, in mode
return mostfrequent, oldcounts
UnboundLocalError: local variable 'mostfrequent' referenced before assignment
```
For example, it would be better if at the sklearn/neighbours/classification.py --> RadiusNeighborsClassifier.predict() had a check like this:
```
if len(pred_labels) < 1: # This means that no neighbours is found
raise SomeError(""No neighbours found for a test sample, try using larger radius or eliminate outliers"")
```",closed,,2012-04-11 09:50:35+00:00,2012-05-06 14:50:05+00:00,4,joonazzz,https://github.com/scikit-learn/scikit-learn/issues/760,1424,604.9916666666667
4084098,762,scikit-learn/scikit-learn,SGDRegressor crashes,"When I do recursive feature selection using stochastic gradient descent (SGDRegressor), I'm getting various errors. Sometimes I get a segmentation fault with no traceback, sometimes I get thrown out of python with a strange malloc error:
``` bash
*** glibc detected *** /usr/bin/python: malloc(): smallbin double linked list corrupted: 0x0000000003629150 ***
```
and other times I get a python exception raised by linear_model/sgd_fast.so:
```
ValueError: floating-point under-/overflow occured.
```
Here's what you can do to recreate the problem. Download my example data [here](http://dl.dropbox.com/u/1800572/problem_data.tar.gz) and extract it. Now start up python in the same folder and run
``` python
import numpy
from sklearn.linear_model import SGDRegressor
from sklearn.feature_selection import RFECV
X = numpy.load(""problematic_X2.npy"")
y = numpy.load(""problem_y.npy"").astype(""f8"")
selector = RFECV(SGDRegressor(alpha=5, warm_start=True), step=3, cv=4)
selector.fit(X, y)
```
As an aside: will using the warm_start=True option of SGDRegressor in the recursive feature elimination speed things up? Is that a good idea? It seems reasonable to me, but it might be a bad idea if the number of coefficients changes from run to run, and the selector_ array isn't used to update them between runs. (The same errors come up whether or not I use the warm_start option).",closed,,2012-04-12 13:53:41+00:00,2012-04-13 13:26:04+00:00,6,conradlee,https://github.com/scikit-learn/scikit-learn/issues/762,1406,23.539722222222224
4093408,764,scikit-learn/scikit-learn,python3 build fails,"```
Warning: Assuming default configuration (scikits/learn/{setup_scikits.learn,setup}.py was not found)
Traceback (most recent call last):
File ""setup.py"", line 99, in <module>
'Operating System :: MacOS'
File ""/cluster/aksarkar/.local/lib/python3.2/site-packages/numpy/distutils/core.py"", line 152, in setup
config = configuration()
File ""setup.py"", line 34, in configuration
config.add_subpackage('scikits.learn')
File ""/cluster/aksarkar/.local/lib/python3.2/site-packages/numpy/distutils/misc_util.py"", line 1002, in add_subpackage
caller_level = 2)
File ""/cluster/aksarkar/.local/lib/python3.2/site-packages/numpy/distutils/misc_util.py"", line 964, in get_subpackage
caller_level = caller_level+1)
File ""/cluster/aksarkar/.local/lib/python3.2/site-packages/numpy/distutils/misc_util.py"", line 743, in __init__
raise ValueError(""%r is not a directory"" % (package_path,))
ValueError: 'scikits/learn' is not a directory
```
python 3.2.3
numpy 0c5f480f
scipy c1ea274e",closed,,2012-04-12 22:35:24+00:00,2012-06-05 22:08:24+00:00,2,aksarkar,https://github.com/scikit-learn/scikit-learn/issues/764,1025,1295.55
4096307,765,scikit-learn/scikit-learn,test_oneclass_decision_function fails (randomly),"```
======================================================================
FAIL: Test OneClassSVM decision function
----------------------------------------------------------------------
Traceback (most recent call last):
File ""/home/npinto/venv/sklearn-liblinear-verbosity-system/lib/python2.7/site-packages/nose/case.py"", line 197, in runTest
self.test(*self.arg)
File ""test_svm.py"", line 211, in test_oneclass_decision_function
assert_true(np.mean(y_pred_outliers == -1) > .9)
AssertionError: False is not true
```",closed,,2012-04-13 01:10:30+00:00,2012-05-06 09:02:26+00:00,0,npinto,https://github.com/scikit-learn/scikit-learn/issues/765,578,559.8655555555556
4103370,768,scikit-learn/scikit-learn,Arpack wrappers fail with new scipy,"I have scipy 0.11.0.dev-c1ea274. This does not seem to play well with the current arpack wrappers.
I'm a bit out of my depth there, though.",closed,,2012-04-13 13:40:27+00:00,2012-05-04 11:28:06+00:00,3,amueller,https://github.com/scikit-learn/scikit-learn/issues/768,175,501.7941666666667