scikit-learn-contrib / lightning

Large-scale linear classification, regression and ranking in Python
https://contrib.scikit-learn.org/lightning/
1.73k stars 214 forks source link

Issues with examples #3

Closed Raz0r closed 11 years ago

Raz0r commented 12 years ago
  1. Examples do not run until you copy "datasets" to your dist-packages folder containing lightning.
  2. bench_linear.py, plot_iterations.py, plot_hyperparameter_dependency.py :

Choose best parameter combination Traceback (most recent call last): File "bench_linear.py", line 76, in X_test, y_test) File "/usr/local/lib/python2.6/dist-packages/sklearn/externals/joblib/memory.py", line 171, in call return self.call(_args, _kwargs) File "/usr/local/lib/python2.6/dist-packages/sklearn/externals/joblib/memory.py", line 323, in call output = self.func(_args, _kwargs) File "bench_linear.py", line 30, in fit gs.fit(X_tr, y_tr) File "/usr/local/lib/python2.6/dist-packages/sklearn/grid_search.py", line 354, in fit return self._fit(X, y) File "/usr/local/lib/python2.6/dist-packages/sklearn/grid_search.py", line 392, in _fit for clf_params in grid for train, test in cv) File "/usr/local/lib/python2.6/dist-packages/sklearn/externals/joblib/parallel.py", line 473, in call self.dispatch(function, args, kwargs) File "/usr/local/lib/python2.6/dist-packages/sklearn/externals/joblib/parallel.py", line 296, in dispatch job = ImmediateApply(func, args, kwargs) File "/usr/local/lib/python2.6/dist-packages/sklearn/externals/joblib/parallel.py", line 124, in init self.results = func(_args, *_kwargs) File "/usr/local/lib/python2.6/dist-packages/sklearn/grid_search.py", line 110, in fit_grid_point clf.fit(X_train, y_train, **fit_params) File "/usr/local/lib/python2.6/dist-packages/lightning-0.1_git-py2.6-linux-i686.egg/lightning/primal_cd.py", line 93, in fit self.callback, verbose=self.verbose) File "primal_cd_fast.pyx", line 780, in lightning.primal_cd_fast._primal_cd_l2r (lightning/primal_cd_fast.cpp:6018) ValueError: Buffer dtype mismatch, expected 'double' but got 'long'

  1. svm_gui.py:

None fit the model Exception in Tkinter callback Traceback (most recent call last): File "/usr/lib/python2.6/lib-tk/Tkinter.py", line 1413, in call return self.func(*args) File "svm_gui.py", line 71, in fit X = train[:, 0:2] IndexError: too many indices

Python 2.6.5, Cython 0.15.1, numpy 1.3.0, scipy 0.7.0, scikit 0.13-git

Raz0r commented 12 years ago

Ok, works now, except for svm_gui.py

mblondel commented 11 years ago

The examples are deprecated because I removed support for kernels. Closing.