I know ValueError
question has been asked many times. I am still struggling to find an answer because I am using inverse_transform
in my code.
Say I have an array a
a.shape
> (100,20)
and another array b
b.shape
> (100,3)
When I did a np.concatenate
,
hat = np.concatenate((a, b), axis=1)
Now shape of hat
is
hat.shape
(100,23)
After this, I tried to do this,
inversed_hat = scaler.inverse_transform(hat)
When I do this, I am getting an error:
ValueError: operands could not be broadcast together with shapes (100,23) (25,) (100,23)
Is this broadcast error in inverse_transform
? Any suggestion will be helpful. Thanks in advance!
MinMaxScaler
. For example:scaler = MinMaxScaler(feature_range=(0, 1))
. – Pirandello