performance of ridge adding interactions and polynomials actually decreases performance slightly univariate nonlinear transformations we just saw that adding squared or cubed features can help linear models for regression there are other transformations that often prove useful for transforming certain featuresin particularapplying mathematical functions like logexpor sin while tree-based models only care about the ordering of the featureslinear models and neural networks are very tied to the scale and distribution of each featureand if there is nonlinear relation between the feature and the targetthat becomes hard to model --particularly in regression the functions log and exp can help by adjusting the relative scales in the data so that they can be captured better by linear model or neural network we saw an application of that in with the memory price data the sin and cos functions can come in handy when dealing with data that encodes periodic patterns most models work best when each feature (and in regression also the targetis loosely gaussian distributed--that isa histogram of each feature should have something resembling the familiar "bell curveshape using transformations like log and exp is hacky but simple and efficient way to achieve this particularly common case when such transformation can be helpful is when dealing with integer count data by count datawe mean features like "how often did user log in?counts are never negativeand often follow particular statistical patterns we are using synthetic dataset of counts here that has properties similar to those you can find in the wild the features are all integer-valuedwhile the response is continuousin[ ]rnd np random randomstate( x_org rnd normal(size=( ) rnd normal(size= rnd poisson( np exp(x_org) np dot(x_orgwlet' look at the first entries of the first feature all are integer values and positivebut apart from that it' hard to make out particular pattern if we count the appearance of each valuethe distribution of values becomes clearer representing data and engineering features