building ridge model on the new data provides much better fitin[ ]score ridge(fit(x_train_logy_trainscore(x_test_logy_testprint("test score{ }format(score)out[ ]test score finding the transformation that works best for each combination of dataset and model is somewhat of an art in this exampleall the features had the same properties this is rarely the case in practiceand usually only subset of the features should be transformedor sometimes each feature needs to be transformed in different way as we mentioned earlierthese kinds of transformations are irrelevant for tree-based models but might be essential for linear models sometimes it is also good idea to transform the target variable in regression trying to predict counts (saynumber of ordersis fairly common taskand using the log( transformation often helps this is very crude approximation of using poisson regressionwhich would be the proper solution from probabilistic standpoint univariate nonlinear transformations