title: How can I fit the test data using min max scaler when I am loading the model?
body: <p>I am doing auto encoder model.I have saved the model before which I scaled the data using min max scaler.</p>
  
  <pre><code>X_train = df.values
  scaler = MinMaxScaler()
  X_train_scaled = scaler.fit_transform(X_train)
  </code></pre>
  
  <p>After doing this I fitted the model and saved it as 'h5' file.Now when I give test data, after loading the saved model naturally it should be scaled as well.</p>
  
  <p>So when I load the model and scale it by using </p>
  
  <pre><code>X_test_scaled  = scaler.transform(X_test)
  </code></pre>
  
  <p>It gives the error </p>
  
  <pre><code>NotFittedError: This MinMaxScaler instance is not fitted yet. Call 'fit' with appropriate arguments before using this method.
  </code></pre>
  
  <p>So I gave <code>X_test_scaled  = scaler.fit_transform(X_test)</code>
  (Which I had a hunch that it is foolish)did gave a result(after loading saved model and test) which was different when I trained it and test it together. I have saved around 4000 models now for my purpose(So I cant train and save it all again as it costs a lot time,So I want a way out).</p>
  
  <p>Is there a way I can scale the test data by transforming it the way I trained it(may be saving the scaled values, I do not know).Or may be descale the model so that I can test the model on non-scaled data.</p>
  
  <p>If I under-emphasized or over-emphasized any point ,please let me know in the comments!</p>