title: How do I correctly use the inverse_transform method when using PowerTransformer?
body: <p>I am having some difficulty using the inverse_transform method to inversely transform an array after performing successive transforms on various arrays. I am able to access the lambda value used for the original transformation using <code>.lambdas_</code> attribute. Furthermore, I understand that the code for performing the inverse_transform is listed <a href="https://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.PowerTransformer.html#sklearn.preprocessing.PowerTransformer" rel="nofollow noreferrer">here</a>. However, I would like to know how to use the inverse_transform method properly.</p>
  
  <p>This code does perform the inverse transform as expected:</p>
  
  <pre><code>from sklearn.preprocessing import PowerTransformer
  
  a = np.array([1,3,3,6,3]).reshape(-1, 1)
  
  bc = PowerTransformer(method='box-cox', standardize=False)
  bc.fit(a)
  a_transformed = bc.transform(a)
  
  a_inverse_transformed = bc.inverse_transform(a_transformed)
  a_inverse_transformed
  </code></pre>
  
  <p>The output of this code shows that a is the same as a_inverse_transformed. However, I am not able to store lambdas for later inverse_transform in other scripts or after other transforms. Here is the code I have tried:</p>
  
  <pre><code>a = np.array([1,3,3,6,3]).reshape(-1, 1)
  bc = PowerTransformer(method='box-cox', standardize=False)
  bc.fit(a)
  a_transformed = bc.transform(a)
  a_lambda = bc.lambdas_[0]
  
  b = np.array([11,33,35,60,38]).reshape(-1, 1)
  bc = PowerTransformer(method='box-cox', standardize=False)
  bc.fit(b)
  b_transformed = bc.transform(b)
  
  
  bc.set_params(**{'lambdas_':a_lambda})
  a_inverse_transformed = bc.inverse_transform(a_transformed)
  a_inverse_transformed
  </code></pre>
  
  <p>I get the following error on the above code:</p>
  
  <pre><code>ValueError: Invalid parameter lambdas_ for estimator PowerTransformer(copy=True, method='box-cox', standardize=False). Check the list of available parameters with `estimator.get_params().keys()`.
  </code></pre>
  
  <p>Also, I have tried finding the correct param by using bc.get_params().keys(). The only keys that I see are </p>
  
  <pre><code>dict_keys(['copy', 'method', 'standardize'])
  </code></pre>