scikit-learn/scikit-learn — Issue #604: linear_model.SGDRegressor : Buffer has wrong number of dimensions (expected 1, got 2)
Author: vicpara
Created: 2012-02-01 16:37:56+00:00
State: open

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
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)