PDF (A4) - 41.3Mb
Man Pages (TGZ) - 262.8Kb
Man Pages (Zip) - 368.8Kb
Info (Gzip) - 4.1Mb
Info (Zip) - 4.1Mb
This class encapsulates the anomaly detection task as described inDetect Anomalies.AnomalyDetector supports methods for loading, training, and unloading models, predicting labels, calculating probabilities, and related tasks.
AnomalyDetector provides the following accessible properties:
metadata(Object): Model metadata in the model catalog. SeeModel Metadata.trainOptions(Object): The training options specified in the constructor when creating an instance ofAnomalyDetector.
TheAnomalyDetector class constructor is shown here:
AnomalyDetector class constructor
new ml.AnomalyDetector( Stringname[, ObjecttrainOptions])
Arguments
name(String): Unique identifier for thisAnomalyDetector.trainOptions(Object) (optional): Training options; the same as the training options which can be used withsys.ML_TRAIN.
Return type
An instance of
AnomalyDetector.
Trains and loads a new anomaly detector. This method acts as a wrapper for bothsys.ML_TRAIN andsys.ML_MODEL_LOAD, but is specific to MySQL HeatWave AutoML anomaly detection.
Signature
AnomalyDetector.train( TabletrainData, StringtargetColumnName)
Arguments
Return type
None.
An alias fortrain(), and identical to it in all respects other than name. SeeAnomalyDetector.train(), for more information.
This method predicts labels, acting as a wrapper forsys.ML_PREDICT_ROW.
Predicts a label for a single sample of data, and returns the label. SeeML_PREDICT_ROW, for more information.
Signature
String AnomalyDetector.predict( Objectsample[, Objectoptions])
Arguments
sample(Object): Sample data. This argument must contain members that were used for training; extra members may be included, but these are ignored during prediction.options(Object) (optional): Set of one of more options.
Return type
String.
This method serves as a JavaScript wrapper forsys.ML_SCORE, returning the score for the test data in the specified table and column. For possible metrics, seeOptimization and Scoring Metrics.
Signature
score( TabletestData, StringtargetColumnName, Stringmetric[, Objectoptions])
Arguments
testData(Table): Table containing test data to be scored; must contain the same columns as the training dataset.targetColumnName(String): Name of the target column containing ground truth values.metric(String): Name of the scoring metric to use. SeeOptimization and Scoring Metrics, for information about metrics which can be used for AutoML anomaly detection.options(Object) (optional): A set of options in JSON object format. See the description ofML_SCOREfor more information.
Return type
Number.
This method is a wrapper forsys.ML_MODEL_UNLOAD, and Unloads the model.
Signature
AnomalyDetector.unload()
Arguments
None.
Return type
None.
PDF (A4) - 41.3Mb
Man Pages (TGZ) - 262.8Kb
Man Pages (Zip) - 368.8Kb
Info (Gzip) - 4.1Mb
Info (Zip) - 4.1Mb