public class CoreUtils extends Object
Constructor and Description |
---|
CoreUtils() |
Modifier and Type | Method and Description |
---|---|
static double |
argMax(double[] doubleArray)
Get maximum value from the double array
|
static int |
argMaxIndex(double[] doubleArray)
Get index of the Maximum from double array
|
static org.wso2.siddhi.core.executor.VariableExpressionExecutor |
extractAndValidateClassLabel(org.wso2.siddhi.query.api.definition.AbstractDefinition inputDefinition,
org.wso2.siddhi.core.executor.ExpressionExecutor[] attributeExpressionExecutors,
int classIndex)
Validate and extract class label attribute executor
|
static List<org.wso2.siddhi.core.executor.VariableExpressionExecutor> |
extractAndValidateFeatures(org.wso2.siddhi.query.api.definition.AbstractDefinition inputDefinition,
org.wso2.siddhi.core.executor.ExpressionExecutor[] attributeExpressionExecutors,
int startIndex,
int noOfFeatures)
Validate and extract feature attribute executors
|
static boolean |
isInitialized(AdaptiveHoeffdingTreeModel model,
int noOfFeatures)
Check whether the model is initialized
|
static boolean |
isLabelType(org.wso2.siddhi.query.api.definition.Attribute.Type attributeType) |
static boolean |
isNumeric(org.wso2.siddhi.query.api.definition.Attribute.Type attributeType) |
public static int argMaxIndex(double[] doubleArray)
doubleArray
- - array of doublespublic static double argMax(double[] doubleArray)
doubleArray
- - array of doublespublic static List<org.wso2.siddhi.core.executor.VariableExpressionExecutor> extractAndValidateFeatures(org.wso2.siddhi.query.api.definition.AbstractDefinition inputDefinition, org.wso2.siddhi.core.executor.ExpressionExecutor[] attributeExpressionExecutors, int startIndex, int noOfFeatures)
inputDefinition
- the incoming stream definitionattributeExpressionExecutors
- the executors of each function parametersstartIndex
- starting index of the feature attributesnoOfFeatures
- number of feature attributespublic static boolean isNumeric(org.wso2.siddhi.query.api.definition.Attribute.Type attributeType)
public static boolean isLabelType(org.wso2.siddhi.query.api.definition.Attribute.Type attributeType)
public static org.wso2.siddhi.core.executor.VariableExpressionExecutor extractAndValidateClassLabel(org.wso2.siddhi.query.api.definition.AbstractDefinition inputDefinition, org.wso2.siddhi.core.executor.ExpressionExecutor[] attributeExpressionExecutors, int classIndex)
inputDefinition
- the incoming stream definitionattributeExpressionExecutors
- the executors of each function parametersclassIndex
- index of the class labelpublic static boolean isInitialized(AdaptiveHoeffdingTreeModel model, int noOfFeatures)
model
- Instance of AdaptiveHoeffdingTree modelnoOfFeatures
- Number of feature attributes used to train the modelCopyright © 2018 WSO2. All rights reserved.