public class AnomalyDetectionModelBuilder extends MLModelBuilder
Constructor and Description |
---|
AnomalyDetectionModelBuilder(MLModelConfigurationContext context) |
Modifier and Type | Method and Description |
---|---|
org.wso2.carbon.ml.commons.domain.MLModel |
build()
Build an KMeans Anomaly Detection model.
|
Map<Integer,MulticlassMetrics> |
getEvaluationResults(AnomalyDetectionModel anomalyDetectionModel,
org.apache.spark.api.java.JavaRDD<org.apache.spark.mllib.linalg.Vector> normalTestData,
org.apache.spark.api.java.JavaRDD<org.apache.spark.mllib.linalg.Vector> anomalyTestData,
int minPercentile,
int maxPercentile,
String newNormalLabel,
String newAnomalyLabel)
This method is to evaluate the anomaly detection model
|
getContext, handleIgnoreException, setContext
public AnomalyDetectionModelBuilder(MLModelConfigurationContext context)
public org.wso2.carbon.ml.commons.domain.MLModel build() throws MLModelBuilderException
build
in class MLModelBuilder
MLModel
MLModelBuilderException
- if failed to build the model.public Map<Integer,MulticlassMetrics> getEvaluationResults(AnomalyDetectionModel anomalyDetectionModel, org.apache.spark.api.java.JavaRDD<org.apache.spark.mllib.linalg.Vector> normalTestData, org.apache.spark.api.java.JavaRDD<org.apache.spark.mllib.linalg.Vector> anomalyTestData, int minPercentile, int maxPercentile, String newNormalLabel, String newAnomalyLabel)
anomalyDetectionModel
- anomaly detection modelnormalTestData
- JavaRDD of normal test dataanomalyTestData
- JavaRDD of anomalous test dataminPercentile
- min percentile of the rangemaxPercentile
- max percentile of the rangenewNormalLabel
- normal labelnewAnomalyLabel
- anomaly labelCopyright © 2016 WSO2, Inc.. All Rights Reserved.