【发布时间】:2020-04-15 14:28:03
【问题描述】:
给定输入 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:
【问题讨论】:
-
就像它说的那样。内存错误。您需要在具有更好规格的系统中运行程序。
标签: python machine-learning scikit-learn sklearn-pandas