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
3
votes
1 answer

Problems serializing my scikit-learn (sklearn) grid-search classifier in iPython

I ran the grid-search classifier from below in iPython: http://scikit-learn.org/dev/auto_examples/grid_search_digits.html and then tried to serialize it by pickling, but received the following traceback: In [6]: with open('clf.pkl', 'wb') as f: …
vgoklani
  • 10,685
  • 16
  • 63
  • 101
3
votes
1 answer

scikit learn: Problems creating customized CountVectorizer and ChiSquare

I have the following code (based on the samples here), but it is not working: [...] def my_analyzer(s): return s.split() my_vectorizer = CountVectorizer(analyzer=my_analyzer) X_train = my_vectorizer.fit_transform(traindata) ch2 =…
D T
  • 677
  • 12
  • 23
3
votes
3 answers

Find out error rate using sklearn

I want to find out the error rate using svm classifier in python, the approach that I am taking to accomplish the same is: 1-svm.predict(test_samples).mean() However, this approach does not work. Also the score function of sklearn gives mean…
Jannat Arora
  • 2,759
  • 8
  • 44
  • 70
3
votes
1 answer

Is there a way to choose the k nearest neighbors in scikits learn with a user defined distance metric?

I have to use K nearest neighbors for a set of vectors using the cosine similarity metric and some other user defined metrics. How can I achieve that using scikits learn? I found sklearn.neighbors.KNeighborsClassifier but I was not able to figure…
lipid
  • 231
  • 1
  • 2
  • 6
2
votes
1 answer

Forecasting using Pandas OLS

I have been using the scikits.statsmodels OLS predict function to forecast fitted data but would now like to shift to using Pandas. The documentation refers to OLS as well as to a function called y_predict but I can't find any documentation on how…
Turukawa
  • 155
  • 2
  • 11
2
votes
1 answer

python scikits learn - SVM options

Just curious about two options in scikits learn SVM class. What does Scale_C and shrinking do? There wasn't much in the documentation. Scale C seems to be able to scale the C paramter appropriately for the training data. Thanks
tomas
  • 665
  • 1
  • 10
  • 14
2
votes
1 answer

Random forests with scikit learn .9 or below

I am having some weird problems installing Scikit learn on my mac and my linux box. Only scikit learn .9 installs. is there any way to learn random forests using this version?
Rishi
  • 3,538
  • 5
  • 29
  • 40
2
votes
0 answers

Scikits.learn 0.8 predict_proba() only ever outputs uniform probabilities

I am working with the nice Python scikits.learn package to train some classifiers for part-based face recognition with the Histogram of Oriented Gradient feature. I've successfully trained a linear SVM to recognize a particular face part, but I am…
ely
  • 74,674
  • 34
  • 147
  • 228
2
votes
0 answers

Cannot add variogram plot exported from scikit-gstat into poltly as subplot using add_trace function

I run into trouble trying to add variogram graph from SciKit GStat as a subplot in plotly. The error is describe as The 'data' property is a tuple of trace instances. I'm not sure if it's some error in make_subplots specs, but I have no idea how to…
Jerry
  • 21
  • 3
2
votes
1 answer

How to install the package scikit-geometry?

I am trying to compute a class of Minkowski sums for some mathematical work, but there are too many to do by hand in a reasonable amount of time. I found this documentation for a package called scikit-geometry, but when I write import skgeom as sg…
William
  • 135
  • 4
2
votes
0 answers

How to detect stop points from GPS dataset in R/Python

I noticed that in Python we have detection.stops function in scikit-mobility to detect stop points in GPS dataset. scikit-mobility Does R have a similar package/function to do the task?
Yunzhe Liu
  • 93
  • 5
2
votes
1 answer

How can I thin or skeletonize an object without the objects corners being divergent?

I have the following image, which represents a path. I want to apply an algorithm called HoughLines(P) on it. This algorithm should detect lines and coordinates. But first I need to make the path thinner for it to be valid input for…
Dirk
  • 95
  • 1
  • 8
2
votes
1 answer

Get frame rate of a video using skvideo package python

I'm reading a video using skvideo package video = skvideo.io.vread(video_path) This returns the frames only. But I want to read the frame rate as well, so that while saving the processed video, I can save it with the same frame rate. I found many…
Nagabhushan S N
  • 6,407
  • 8
  • 44
  • 87
2
votes
0 answers

PyAutoTune silent output

I've been playing around with the PyAutoTune module for a while now, and I can't seem to make it work. Unfortunately, documentation is non-existent, and the only thing I have to work with is is the example in the Examples folder. What I would like…
Aschie4589
  • 21
  • 4
2
votes
1 answer

Is it possible to define a semi-annual frequency for a python scikits.timeseries time_series object?

According to the scikits.timeseries module the following frequencies are available when defining a time_series object: Annual Frequencies, Quarterly frequencies, Monthly, Weekly, Daily etc. A full list is shown on the documentation link:…
AtlasStrategic
  • 317
  • 2
  • 10