public class AnomalyDetection extends Object implements Serializable
Constructor and Description |
---|
AnomalyDetection() |
Modifier and Type | Method and Description |
---|---|
List<String> |
test(AnomalyDetectionModel anomalyDetectionModel,
org.apache.spark.api.java.JavaRDD<org.apache.spark.mllib.linalg.Vector> data,
int percentile)
This method applies a anomaly detection model to a given dataset
|
Map<Integer,List<String>> |
test(AnomalyDetectionModel anomalyDetectionModel,
org.apache.spark.api.java.JavaRDD<org.apache.spark.mllib.linalg.Vector> data,
int minPercentile,
int maxPercentile)
This method applies a anomaly detection model to a given dataset for a range of percentile values
|
String |
test(AnomalyDetectionModel anomalyDetectionModel,
org.apache.spark.mllib.linalg.Vector data,
int percentile)
This method applies a anomaly detection model to a given dataset
|
Map<Integer,String> |
test(AnomalyDetectionModel anomalyDetectionModel,
org.apache.spark.mllib.linalg.Vector data,
int minPercentile,
int maxPercentile)
This method applies a anomaly detection model to a given dataset for a range of percentile values
|
AnomalyDetectionModel |
train(org.apache.spark.api.java.JavaRDD<org.apache.spark.mllib.linalg.Vector> trainData,
int noOfClusters,
int noOfIterations,
String newNormalLabel,
String newAnomalyLabel)
This methods trains Anomaly detection model
|
public AnomalyDetectionModel train(org.apache.spark.api.java.JavaRDD<org.apache.spark.mllib.linalg.Vector> trainData, int noOfClusters, int noOfIterations, String newNormalLabel, String newAnomalyLabel)
trainData
- Training data as a JavaRDD of VectorsnoOfClusters
- Number of clustersnoOfIterations
- Number of iterations to runpublic String test(AnomalyDetectionModel anomalyDetectionModel, org.apache.spark.mllib.linalg.Vector data, int percentile)
anomalyDetectionModel
- anomaly detection modeldata
- a single data point as a Vectorpercentile
- percentile value to identify the cluster boundariespublic List<String> test(AnomalyDetectionModel anomalyDetectionModel, org.apache.spark.api.java.JavaRDD<org.apache.spark.mllib.linalg.Vector> data, int percentile)
anomalyDetectionModel
- anomaly detection modeldata
- JavaRDD containing feature vectorspercentile
- percentile value to identify the cluster boundariespublic Map<Integer,String> test(AnomalyDetectionModel anomalyDetectionModel, org.apache.spark.mllib.linalg.Vector data, int minPercentile, int maxPercentile)
anomalyDetectionModel
- anomaly detection modeldata
- a single data point as a VectorminPercentile
- min percentile value of the rangemaxPercentile
- max percentile value of the rangepublic Map<Integer,List<String>> test(AnomalyDetectionModel anomalyDetectionModel, org.apache.spark.api.java.JavaRDD<org.apache.spark.mllib.linalg.Vector> data, int minPercentile, int maxPercentile)
anomalyDetectionModel
- anomaly detection modeldata
- JavaRDD containing feature vectorsminPercentile
- min percentile value of the rangemaxPercentile
- max percentile value of the rangeCopyright © 2015 WSO2, Inc.. All Rights Reserved.