[IDEA] Chpater 2, Demonstrate outliers dropping
eranr opened this issue · 0 comments
eranr commented
02_end_to_end_machine_learning_project, Section 3.1 "Data Cleaning". Towards the end of the section, there is a cell defining an outlier predicate:
from sklearn.ensemble import IsolationForest
isolation_forest = IsolationForest(random_state=42)
outlier_pred = isolation_forest.fit_predict(X)
It would be helpful to show the effect of this predicate. This can be as simple as adding a followup cell with:
len(housing.iloc[outlier_pred == 1])