anomaly.anomaly_base.AnomalyDetectionBaseClass
Usage
anomaly.anomaly_base.AnomalyDetectionBaseClass(
features, stacks=None, transforms=None
)Methods
| Name | Description |
|---|---|
| compute_anomaly_index() | A scalar value between 0 and 1 indicating |
| fit() | Train the model. |
| infer() | Use the model to infer. |
| normalize_score() | Percentile rank (ECDF) of raw_scores against a reference distribution. |
| read_model_parameters() | Read principal components or |
| write_hyperparameters() | Store things like random seed, |
| write_model_parameters() | Write principal components or |
compute_anomaly_index()
A scalar value between 0 and 1 indicating
Usage
compute_anomaly_index()the degree of anomaly (1=most anomaluous).
fit()
Train the model.
Usage
fit(starttime, endtime)infer()
Use the model to infer.
Usage
infer(starttime, endtime)normalize_score()
Percentile rank (ECDF) of raw_scores against a reference distribution.
Usage
normalize_score(raw_scores, reference_scores)Parameters
raw_scores: array - like-
Scores to normalize (e.g. from the evaluation period).
reference_scores: array - like- Reference distribution from a quiet period.
Returns
np.ndarray- Values in [0, 1]; 1.0 means the score exceeds all reference scores.
read_model_parameters()
Read principal components or
Usage
read_model_parameters()model weights from file
write_hyperparameters()
Store things like random seed,
Usage
write_hyperparameters()learning rate, number of principal components etc.
write_model_parameters()
Write principal components or
Usage
write_model_parameters()model weights to file