In the below snippet
item_train and user_train are scaled using StandardScaler,
while y_train is scaled using MinMaxScaler.
- Why is this difference?
- How to decide on which Scaler to use?
In the below snippet
item_train and user_train are scaled using StandardScaler,
while y_train is scaled using MinMaxScaler.
" Differences between MinMaxScaler and StandardScaler
MinMaxScaler scales the data to a fixed range, typically between 0 and 1. On the other hand, StandardScaler rescales the data to have a mean of 0 and a standard deviation of 1. This results in a distribution with zero mean and unit variance." -from web.
It might be for this problem you have input features x that are continuous and output target y that are binary or a few classes of categorical outputs.
Also their formulas are as follows:
minmaxscaler=(data-min)/(max-min)
standardscaler=(data-mean)/standarddeviation