title: MICE_Memory error_IterativeImputer_for missing values Pandas python
body: <p>While implementing iterative imputer in python, I am getting memory error.
  Iterative imputer in python (similar to implementation of MICE technique in R) considers each missing value in a row as a dependent variable and all the other features in that row as independent variables. Then it applies regression on the independent variables and computes the missing value of the dependent variable in every row. So rather than replacing missing values with mean, median etc., missing values are filled with synthetic values using regression technique</p>
  
  <p><strong>X_train</strong></p>
  
  <pre><code>Col1  Col2  Col3  Col4 ...........Col100
  </code></pre>
  
  <p>X_train has 100 columns, with 250k rows.</p>
  
  <p><strong>Code</strong></p>
  
  <pre><code>from sklearn.experimental import enable_iterative_imputer
  # now you can import normally from sklearn.impute
  from sklearn.impute import IterativeImputer
  from sklearn.ensemble import ExtraTreesRegressor
  from sklearn.linear_model import BayesianRidge
  import random
  
  imputer = IterativeImputer(BayesianRidge())
  impute_data = pd.DataFrame(imputer.fit_transform(X_train))
  </code></pre>
  
  <p><strong>Error</strong></p>
  
  <pre><code>MemoryError                               Traceback (most recent call last)
  &lt;ipython-input-71-4b5dc3d8a845&gt; in &lt;module&gt;
        1 imputer = IterativeImputer(BayesianRidge())
  ----&gt; 2 impute_data = pd.DataFrame(imputer.fit_transform(X_train))
  </code></pre>
  
  <p>I am getting memory error while implementing IterativeImputer </p>
  
  <p><strong>Environment</strong> </p>
  
  <ul>
  <li>Python 3.7</li>
  <li>Jupyter notebooks</li>
  <li>Anaconda Navigator</li>
  <li>Lenovo 8GB RAM Laptop</li>
  <li>intel CORE i5 8th gen processor.</li>
  <li>GPU not being used (scikit does not support GPU)</li>
  </ul>