Deteksi Anomali dengan Python
Bekhruz (Bex) Tuychiev
Kaggle Master, Data Science Content Creator
Hyperparameter yang paling memengaruhi IForest:
contaminationn_estimatorsmax_samplesmax_featuresCara IForest mengklasifikasikan titik data:
contaminationcontamination dipilih sebagai outlierfrom pyod.models.iforest import IForest# Menerima nilai antara 0 dan 0.5 iforest = IForest(contamination=0.05)
# Lebih banyak pohon untuk dataset lebih besar
iforest = IForest(n_estimators=1000)
iforest.fit(airbnb_df)
iforest = IForest(n_estimators=200, max_samples=0.6, max_features=0.9)iforest.fit(airbnb_df)
Deteksi Anomali dengan Python