Title: Getting a memory error when using birch algorithm in python
Tags: python;machine-learning;scikit-learn;sklearn-pandas
Question: The shape of given input numpy array is (463277, 38). and I am doing something like
brc = Birch(threshold=0.5,n_clusters=None)
brc.fit_transform(X)
but getting a memory error
MemoryError                               Traceback (most recent call last)
<ipython-input-27-d906f45761a4&gt; in <module&gt;
1 brc = Birch(threshold=0.5)
----&gt; 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)
--&gt; 553             return self.fit(X, **fit_params).transform(X)
554         else:
555             # fit method of arity 2 (supervised transformation)
MemoryError:
Comment: It's like what it says. A memory error. You need to run the program in a system with better specs.


Here is another answer: I suppose that you are using scikit-learn. This is an issue that has been resolved
Try updating your scikit-learn module using
$ python3 -m pip install --upgrade scikit-learn

{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 1, 'ContentLicense': 'CC BY-SA 4.0', 'CreationDate': '2019:00:12/24/19', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<python><machine-learning><scikit-learn><sklearn-pandas>', 'Title': 'Getting a memory error when using birch algorithm in python', 'ViewCount': 272, 'id': 59469897, 'user_AboutMe': None, 'user_AccountId': 15953023.0, 'user_DisplayName': 'Muhammad', 'user_Reputation': 89.0, 'user_Views': 44.0, 'user_id': 11511865.0}}