Session Ready
Exercise

The odd one out

You saw previously that the IsolationForest() algorithm is a great first choice when in need of anomaly or outlier detection.

In this exercise you want to examine how the ratio of inliers to outliers (a.k.a. signal to noise ratio) affects its ability to detect anomalies.

The IsolationForest() algorithm has been loaded for you in the variable called isolation_forest, and a helper function make_fake_data() was loaded as well. Your task is to gradually increase the number of outliers and observe the difference in results in each iteration.

Instructions 1/3
undefined XP
  • 1
    • Set the number of outliers to 50 (5% of inliers).
    • 2
      • Set the number of outliers to 200 (20% of inliers).
    • 3
      • Set the number of outliers to 500 (50% of inliers).