concept fit in category machine learning

appears as: fit
Machine Learning Bookcamp

This is an excerpt from Manning's book Machine Learning Bookcamp.

In this code we create a DictVectorizer instance, which we call dv, and “train” it by invoking the fit method. The fit method looks at the content of these dictionaries and figures out the possible values for each variable and how to map them to the columns in the output matrix. If a feature is categorical, it applies the one-hot encoding scheme, but if a feature is numerical, it's left intact.