1. Learn
  2. /
  3. Courses
  4. /
  5. Anomaly Detection in Python

Connected

Exercise

Using outlier probabilities

An alternative to isolating outliers with contamination is using outlier probabilities. The best thing about this method is that you can choose an arbitrary probability threshold, which means you can be as confident as you want in the predictions.

IForest and big_mart are already loaded.

Instructions

100 XP
  • Calculate probabilities for both inliers and outliers.
  • Extract the probabilities for outliers into outlier_probs.
  • Filter the outliers into outliers by using a 70% threshold on outlier_probs.