title: MemoryError: Unable to allocate MiB for an array with shape and data type, when using anymodel.fit() in sklearn
body: <p>Getting this memory error. But the book/link I am following doesn't get this error.</p>
  <p>A part of Code:</p>
  <pre><code>from sklearn.linear_model import SGDClassifier
  sgd_clf = SGDClassifier()
  sgd_clf.fit(x_train, y_train)
  </code></pre>
  <p>Error:
  <code>MemoryError: Unable to allocate 359. MiB for an array with shape (60000, 784) and data type float64</code></p>
  <p>I also get this error when I try to scale the data using StandardScaler's fit_transfrom</p>
  <p>But works fine in both if I decrease the size of training set (something like : <code>x_train[:1000]</code> ,<code>y_train[:1000]</code>)</p>
  <p>Link for the code in the book <a href="https://github.com/ageron/handson-ml2/blob/master/03_classification.ipynb" rel="noreferrer">here</a>. The error I get is in Line 60 and 63 (<code>In [60]</code> and <code>In [63]</code>)</p>
  <p>The book : Aurélien Géron - Hands-On Machine Learning with Scikit-Learn  Keras  and Tensorflow 2nd Ed (Page : 149 / 1130)</p>
  <h3>So here's my question :</h3>
  <p>Does this has anything to do with my ram? and what does &quot;Unable to allocate 359&quot; mean? is it the memory size ?</p>
  <p>Just in case my specs :
  CPU - ryzen 2400g , ram - 8gb (3.1gb is free when using jupyter notebook)</p>