给定的输入numpy数组的形状为(463277,38)。我正在做类似的事情
brc = Birch(threshold=0.5,n_clusters=None)
brc.fit_transform(X)
但是出现内存错误
MemoryError Traceback (most recent call last)
<ipython-input-27-d906f45761a4> in <module>
1 brc = Birch(threshold=0.5)
----> 2 brc.fit_transform(X)
~/anaconda3/envs/tensorflow/lib/python3.7/site-packages/sklearn/base.py in fit_transform(self, X, y, **fit_params)
551 if y is None:
552 # fit method of arity 1 (unsupervised transformation)
--> 553 return self.fit(X, **fit_params).transform(X)
554 else:
555 # fit method of arity 2 (supervised transformation)
MemoryError:
答案 0 :(得分:0)
我想您正在使用scikit-learn。这是已解决的问题 here。
尝试使用来更新scikit-learn模块
$ python3 -m pip install --upgrade scikit-learn