---------------------------------------------------------------------------
MemoryError Traceback (most recent call last)
<ipython-input-4-960dcd2505b6> in <module>()
----> 1 features_train, features_test, labels_train, labels_test = preprocess()
<ipython-input-4-b9e2aa63b0f4> in preprocess(words_file, authors_file)
171 selector = SelectPercentile(f_classif, percentile=10)
172 selector.fit(features_train_transformed, labels_train)
--> 173 features_train_transformed = selector.transform(features_train_transformed).toarray()
174 features_test_transformed = selector.transform(features_test_transformed).toarray()
175
/opt/ds/local/lib/python2.7/site-packages/scipy/sparse/compressed.pyc in toarray(self, order, out)
947 def toarray(self, order=None, out=None):
948 """See the docstring for `spmatrix.toarray`."""
--> 949 return self.tocoo(copy=False).toarray(order=order, out=out)
950
951 ##############################################################
/opt/ds/local/lib/python2.7/site-packages/scipy/sparse/coo.pyc in toarray(self, order, out)
272 def toarray(self, order=None, out=None):
273 """See the docstring for `spmatrix.toarray`."""
--> 274 B = self._process_toarray_args(order, out)
275 fortran = int(B.flags.f_contiguous)
276 if not fortran and not B.flags.c_contiguous:
/opt/ds/local/lib/python2.7/site-packages/scipy/sparse/base.pyc in _process_toarray_args(self, order, out)
798 return out
799 else:
--> 800 return np.zeros(self.shape, dtype=self.dtype, order=order)
801
802 def __numpy_ufunc__(self, func, method, pos, inputs, **kwargs):
MemoryError: