public class AnomalyDetectionModel extends Object implements Serializable
Constructor and Description |
---|
AnomalyDetectionModel() |
Modifier and Type | Method and Description |
---|---|
String |
getAnomalyLabel() |
Map<Integer,List<Double>> |
getClusterIndexToDistancesListMap() |
org.apache.spark.mllib.clustering.KMeansModel |
getkMeansModel() |
String |
getNormalLabel() |
List<String> |
predict(org.apache.spark.api.java.JavaRDD<org.apache.spark.mllib.linalg.Vector> data,
double percentile)
This method applies a anomaly detection model to a given dataset
|
Map<Integer,List<String>> |
predict(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 |
predict(org.apache.spark.mllib.linalg.Vector data,
double percentile)
This method applies a anomaly detection model to a given dataset
|
Map<Integer,String> |
predict(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
|
void |
setAnomalyLabel(String anomalyLabel) |
void |
setClusterIndexToDistancesListMap(Map<Integer,List<Double>> clusterIndexTodistancesListMap) |
void |
setkMeansModel(org.apache.spark.mllib.clustering.KMeansModel kMeansModel) |
void |
setNormalLabel(String normalLabel) |
public org.apache.spark.mllib.clustering.KMeansModel getkMeansModel()
public void setkMeansModel(org.apache.spark.mllib.clustering.KMeansModel kMeansModel)
public Map<Integer,List<Double>> getClusterIndexToDistancesListMap()
public void setClusterIndexToDistancesListMap(Map<Integer,List<Double>> clusterIndexTodistancesListMap)
public String getNormalLabel()
public void setNormalLabel(String normalLabel)
public String getAnomalyLabel()
public void setAnomalyLabel(String anomalyLabel)
public String predict(org.apache.spark.mllib.linalg.Vector data, double percentile)
data
- a single data point as a Vectorpercentile
- percentile value to identify the cluster boundariespublic List<String> predict(org.apache.spark.api.java.JavaRDD<org.apache.spark.mllib.linalg.Vector> data, double percentile)
data
- JavaRDD containing feature vectorspercentile
- percentile value to identify the cluster boundariespublic Map<Integer,String> predict(org.apache.spark.mllib.linalg.Vector data, int minPercentile, int maxPercentile)
data
- a single data point as a VectorminPercentile
- min percentile value of the rangemaxPercentile
- max percentile value of the rangepublic Map<Integer,List<String>> predict(org.apache.spark.api.java.JavaRDD<org.apache.spark.mllib.linalg.Vector> data, int minPercentile, int maxPercentile)
data
- JavaRDD containing feature vectorsminPercentile
- min percentile value of the rangemaxPercentile
- max percentile value of the rangeCopyright © 2016 WSO2, Inc.. All Rights Reserved.