Loading topic
pd.get_dummies to encode a column, and you will see where it stops being safe to use.3 min readOneHotEncoder and learn its API.2 min readOneHotEncoder or get_dummies once. It covers how an encoder should learn its categories, and why that matters.2 min readOneHotEncoder and that you split data into training and test sets. It covers what happens when the data you predict on contains a category the encoder never saw.2 min readOneHotEncoder, and that you know pandas DataFrames and NumPy arrays. It covers two practical details of the encoder's output: how to label the new columns, and why the result is often not a normal array.2 min readOneHotEncoder and get_dummies, and that you know what a linear model's intercept is. It explains why a full set of one-hot columns carries one column too many, and when removing one matters.3 min readfit and transform do in scikit-learn, and have seen get_dummies and OneHotEncoder from earlier chapters.2 min readOneHotEncoder and StandardScaler on their own, what a train/test split is, and that you can read a pandas DataFrame. It shows how to combine them into one object that you can fit, evaluate and reuse.2 min readOneHotEncoder inside a ColumnTransformer, and that you know why the encoder is fitted on training data only. Here we look at what happens when a column has many distinct values, and how to keep the number of columns under control.2 min readPipeline with a ColumnTransformer, and that you know how OneHotEncoder handles unseen categories. One-hot encoding is a good default for nominal features with few values, but it has costs. This chapter covers when to choose something else.2 min read