Questions tagged [scikits]

Scientific Python toolkits

Scikits is the collective name of a number of Python libraries for various scientific tasks, such as statistics, machine learning and image and audio processing. These scikits build on Numpy and Scipy.

An overview of available scikits is given at http://scikits.appspot.com/scikits

218 questions
8
votes
1 answer

How to extract info from scikits.learn classifier to then use in C code

I have trained a bunch of RBF SVMs using scikits.learn in Python and then Pickled the results. These are for image processing tasks and one thing I want to do for testing is run each classifier on every pixel of some test images. That is, extract…
ely
  • 74,674
  • 34
  • 147
  • 228
8
votes
1 answer

scikit-learn roc_auc_score() returns accuracy values

I am trying to compute area under the ROC curve using sklearn.metrics.roc_auc_score using the following method: roc_auc = sklearn.metrics.roc_auc_score(actual, predicted) where actual is a binary vector with ground truth classification labels and…
Muhammad Waqar
  • 849
  • 2
  • 13
  • 29
8
votes
3 answers

How to use custom classifiers in ensemble classifiers in sklearn?

I read that the builtin ensemble methods in sklearn use decision trees as the base classifiers. Is it possible to use custom classifiers instead?
Karthick
  • 4,456
  • 7
  • 28
  • 34
7
votes
1 answer

10*10 fold cross validation in scikit-learn?

Is class sklearn.cross_validation.ShuffleSplit( n, n_iterations=10, test_fraction=0.10000000000000001, indices=True, random_state=None ) the right way for 10*10fold CV in scikit-learn? (By changing the random_state to 10…
Flake
  • 4,377
  • 6
  • 30
  • 29
7
votes
2 answers

Confusion matrix for Clustering in scikit-learn

I have a set of data with known labels. I want to try clustering and see if I can get the same clusters given by known labels. To measure the accuracy, I need to get something like a confusion matrix. I know I can get a confusion matrix easily for…
Bee
  • 12,251
  • 11
  • 46
  • 73
7
votes
1 answer

how to assess the confidence score of a prediction with scikit-learn

I have write down a simple code that takes One arguments "query_seq", further methods calculates descriptor and in the end predictions can be made using "LogisticRegression" (or any other algorithm provided with the function) algorithms as "0…
jax
  • 3,927
  • 7
  • 41
  • 70
7
votes
1 answer

(Python) Estimating regression parameter confidence intervals with scikits bootstrap

I've just started to try out a nice bootstrapping package available through scikits: https://github.com/cgevans/scikits-bootstrap but I've encountered a problem when trying to estimate confidence intervals for the correlation coefficient from linear…
ToddP
  • 652
  • 13
  • 18
6
votes
1 answer

scikits confusion matrix with cross validation

I am training a svm classifier with cross validation (stratifiedKfold) using the scikits interfaces. For each test set (of k), I get a classification result. I want to have a confusion matrix with all the results. Scikits has a confusion matrix…
andreSmol
  • 1,028
  • 2
  • 18
  • 30
6
votes
3 answers

How to evaluate cost function for scikit learn LogisticRegression?

After using sklearn.linear_model.LogisticRegression to fit a training data set, I would like to obtain the value of the cost function for the training data set and a cross validation data set. Is it possible to have sklearn simply give me the value…
Corey
  • 1,845
  • 1
  • 12
  • 23
6
votes
1 answer

ssim image compare error ''window_shape incompatible with arr_in.shape"

I want to use ssim to compare similarity in 2 images. I'm getting this error window_shape is incompatible with arr_in.shape . Why? (What does it mean?) from skimage.measure import structural_similarity as ssim from skimage import io img1 =…
Alex
  • 5,759
  • 1
  • 32
  • 47
6
votes
1 answer

Scikit multi-class classification metrics, classification report

I am using scikit learn 0.15.2 for a multi-class classification problem. I was getting a lot of DeprecationWarnings as follows when following examples like: scikit 0.14 multi label metrics until I started to use the…
tkja
  • 1,950
  • 5
  • 22
  • 40
6
votes
2 answers

Trouble installing scikit-bio on Windows

When attempting to install the scikit-bio toolkit via pip on Windows XP using Python 2.78 and Visual C++ 2008 Express Edition, the process is interrupted with the following message issued by VC: cl : Command line error D8021 : invalid numeric…
maurobio
  • 1,480
  • 4
  • 27
  • 38
6
votes
1 answer

How to use a precomputed distance matrix in Scikit KMeans?

I'm new to scikit. I can't find an example using a precomputed distance matrix in Scikit KMeans. Could anybody shed a light now this, better with an example?
LeonL.
  • 105
  • 5
6
votes
1 answer

how to Load CSV Data in scikit and using it for Naive Bayes Classification

Trying to load custom data to perform NB Classification in Scikit. Need help in loading the sample data into Scikit and then perform NB. How to load categorical values for target. Use the same data for Train and Test or use a complete set just for…
satish john
  • 226
  • 1
  • 6
  • 14
5
votes
1 answer

Capping linear regression prediction values using scikit

I am training linear regression model using a data-set which has real valued labels in the interval [0,10]. My predicted values on the test set have some predictions exceeding 10. Is there a way to cap the predictions to 10. I am thinking of doing…
atlantis
  • 3,056
  • 9
  • 30
  • 41
1
2
3
14 15