liveBook · Manning

Training time

As explained in Outlier Detection in Python

Training time is the duration required to fit a model or detector to data.

Training time is the duration required to fit a model or detector to data. For outlier detection, it should be considered separately from inference time: fitting may happen infrequently outside production, while repeated retraining can matter when new data continually arrives. section 3.3.5

Use training time as a practical scalability and deployment consideration:

  • Benchmark both fitting and prediction as row counts and feature counts grow; a detector that works on small data may become impractical at production scale. section 3.3.5
  • Compare algorithms rather than assuming faster fitting means faster inference: KNN fits quickly but performs many distance calculations during prediction, whereas Isolation Forest and CBLOF do more work during fitting. section 8.7
  • Prefer simple univariate aggregation or scalable multivariate detectors when workload size makes slower methods impractical. section 3.3.5

Timing detectors across growing workloads

A timing experiment duplicates an existing dataset to create six workload sizes, then measures fit and prediction durations for 12 detectors. On the abalone data, OCSVM and KDE become especially slow as rows increase, while many other detectors remain short; KNN and ABOD reach about 12 seconds for the largest prediction workload shown. section 8.7

How Outlier Detection in Python covers it

How deep it goes
Explains separate fit and prediction measurements, workload scaling, and algorithm-specific trade-offs without deriving complexity formulas.
Examples
Uses abalone workloads, six dataset sizes, 12 detectors, timing code, and fit-time and prediction-time tables.
What you can do after
Evaluate detector scalability by timing fitting and prediction across progressively larger workloads.
How it connects
Connects training time with inference time, outlier detection, Isolation Forest, KNN, CBLOF, OCSVM, and KDE.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Outlier Detection in Python. The section links point to the parts of the book it draws on.