Solution Code: # Normalize all columnns to range from 0 to 1 except the target column. price_col = numeric_cars['price'] numeric_cars = (numeric_cars - numeric_cars.min())/(numeric_cars.max() - numeric_cars.min()) numeric_cars['price'] = price_col
I assumed that the solution first normalized all data columns but also saved a copy of the original target column, which in this case is price_col. Therefore the target variable is not being normalized. I check some other ML channels, some people would normalize the target column and some don’t. Even in this link, people debate about whether it is necessary to scale output y. What is your opinion?
Does the following looks ok with you when you do scaling in ML?
X = preprocessing.scale(X) y = preprocessing.scale(y) -->