The fit method is used to learn the parameters of a model using the training data. For example, if we were using a StandardScaler, the fit method would calculate the mean and standard deviation of each feature in the training set. These parameters are then stored as attributes on the StandardScaler instance.
Keep reading with a 7-day free trial
Subscribe to The Data Interview to keep reading this post and get 7 days of free access to the full post archives.