ValueError Traceback (most recent call last)
/media/5804B87404B856AA/TFM_UC3M/test2_v.py in <module>()
----> 1
2
3
4
5
/usr/local/lib/python2.6/dist-packages/sklearn/base.pyc in fit_transform(self, X, y, **fit_params)
427 else:
428 # fit method of arity 2 (supervised transformation)
--> 429 return self.fit(X, y, **fit_params).transform(X)
430
431
/usr/local/lib/python2.6/dist-packages/sklearn/feature_selection/univariate_selection.pyc in fit(self, X, y)
300 self._check_params(X, y)
301
--> 302 self.scores_, self.pvalues_ = self.score_func(X, y)
303 self.scores_ = np.asarray(self.scores_)
304 self.pvalues_ = np.asarray(self.pvalues_)
/usr/local/lib/python2.6/dist- packages/sklearn/feature_selection/univariate_selection.pyc in chi2(X, y)
190 X = atleast2d_or_csr(X)
191 if np.any((X.data if issparse(X) else X) < 0):
--> 192 raise ValueError("Input X must be non-negative.")
193
194 Y = LabelBinarizer().fit_transform(y)
ValueError: Input X must be non-negative.