Sampling selects a subset of records for analysis or model training. It reduces training time, but sample size trades speed against accuracy and must reflect feature complexity and interactions. section 10.2.1
Use sampling differently during training and prediction:
- Train periodically on samples when the full dataset is unnecessarily expensive; test sample sizes with synthetic outliers to measure reliability and training time. section 10.2.1
- Use smaller reference samples to accelerate distance-based prediction, accepting that larger reference sets are slower but often more accurate. section 10.2.1
- Usually predict on every record, except when spot-checking is sufficient or investigation capacity limits the useful number of flagged anomalies. section 10.2.1
- Preserve the full range of normal data when training one-class models; excluding rare but legitimate records can create false positives. section 5.4
Sampling within Isolation Forest
Isolation Forest uses small samples for each tree; a default size of 256 enables fast training and can reduce swamping and masking, although tight clusters of outliers may remain difficult to isolate. section 5.2
Figure 5.1 The training data for an Isolation Forest is divided randomly in each Isolation Tree. This shows the first three steps, resulting in eight nodes, each covering some subregion of the full dataspace. At this point (in the bottom right pane), one point (in the top right region) has already been isolated.
Shows how sampled training points are divided randomly through Isolation Trees until individual points or small groups become isolated. section 5.2






















