ageron / ageron/handson-mlp

[bug] ordinal encoder example code incorrect?

Open
#32 2 comments 0 reactions 1 assignee Claimed by @ageron View on GitHub
bug help wanted
Dominant language
Jupyter Notebook
Stars
2k
Forks
624
Avg merge
7h 55m
Merged PRs (30d)
1

Description

### Enter the chapter number

2

### Enter the page number

encoding example within sklearn section

### What is the cell's number in the notebook

na

### Enter the environment you are using to run the notebook

Jupyter on Windows

### Describe your issue

the following code:
from sklearn.preprocessing import OrdinalEncoder

ordinal_encoder = OrdinalEncoder()
housing_cat_encoded = ordinal_encoder.fit_transform(housing_cat)

seems like, instead of using housing_cat, the var used should be housing_full[["ocean_proximity"]]

### Enter what you expected to happen

_No response_

### If you found a workaround, describe it here

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.