SrCnnAnomalyEstimator Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Detect anomalies in time series using Spectral Residual(SR) algorithm
public sealed class SrCnnAnomalyEstimator : Microsoft.ML.Data.TrivialEstimator<Microsoft.ML.Transforms.TimeSeries.SrCnnAnomalyDetector>
type SrCnnAnomalyEstimator = class
inherit TrivialEstimator<SrCnnAnomalyDetector>
Public NotInheritable Class SrCnnAnomalyEstimator
Inherits TrivialEstimator(Of SrCnnAnomalyDetector)
- Inheritance
To create this estimator, use DetectAnomalyBySrCnn
Does this estimator need to look at the data to train its parameters? | No |
Input column data type | Single |
Output column data type | 3-element vector ofDouble |
Exportable to ONNX | No |
At Microsoft, we have developed a time-series anomaly detection service which helps customers to monitor the time-series continuously and alert for potential incidents on time. To tackle the problem of time-series anomaly detection, we propose a novel algorithm based on Spectral Residual (SR) and Convolutional Neural Network (CNN). The SR model is borrowed from visual saliency detection domain to time-series anomaly detection. And here we onboarded this SR algorithm firstly.
The Spectral Residual (SR) algorithm is unsupervised, which means training step is not needed while using SR. It consists of three major steps:
(1) Fourier Transform to get the log amplitude spectrum;
(2) calculation of spectral residual;
(3) Inverse Fourier Transform that transforms the sequence back to spatial domain.
Mathematically, given a sequence
There are several parameters for SR algorithm. To obtain a model with good performance, we suggest to tune windowSize and threshold at first, these are the most important parameters to SR. Then you could search for an appropriate judgementWindowSize which is no larger than windowSize. And for the remaining parameters, you could use the default value directly.
For more details please refer to the Time-Series Anomaly Detection Service at Microsoft paper.
Fit(IData |
(Inherited from TrivialEstimator<TTransformer>) |
Get |
Append |
Append a 'caching checkpoint' to the estimator chain. This will ensure that the downstream estimators will be trained against cached data. It is helpful to have a caching checkpoint before trainers that take multiple data passes. |
With |
Given an estimator, return a wrapping object that will call a delegate once Fit(IDataView) is called. It is often important for an estimator to return information about what was fit, which is why the Fit(IDataView) method returns a specifically typed object, rather than just a general ITransformer. However, at the same time, IEstimator<TTransformer> are often formed into pipelines with many objects, so we may need to build a chain of estimators via EstimatorChain<TLastTransformer> where the estimator for which we want to get the transformer is buried somewhere in this chain. For that scenario, we can through this method attach a delegate that will be called once fit is called. |
Product | Versions |
---|---|
ML.NET | 1.2.0, 1.3.1, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 2.0.0, 3.0.0, 4.0.0, Preview |