#Why doesn't the reshape function , reshape the array globally
11 messages · Page 1 of 1 (latest)
Numpy's reshape returns a new ndarray
It doesn't change it in place if I recall correctly
@tawny quiver
so its just temporary then , just for the use of the function in context ?
Uhhhh yeah if you do it like that
oh ok then , thank you so muchhh
also would you mind if i asked you another question
Just ask lol
So , its basically about Feature Scaling using StandardScaler , on the x_train and x_test
why do we use the same StandardScaler object on both the test and train data(x_train and x_test) , wouldn't this lead to data leakage between the x_train and x_test data set ?
Using .fit_transform() method on x_train calculates the mean of x_train ,and by using the same object for x_test , the standardisation is done using the mean calculated for x_train