Module datarush.analytics
Class AbstractPMMLRegressionModel.CategoricalPredictor
java.lang.Object
com.pervasive.datarush.analytics.regression.AbstractPMMLRegressionModel.CategoricalPredictor
- Enclosing class:
- AbstractPMMLRegressionModel
-
Constructor Summary
ConstructorsConstructorDescriptionCategoricalPredictor(String fieldName, String value, double coefficient) Create a CategoricalPredictor for a given possible value of a given discrete independent variable.CategoricalPredictor(String fieldName, String value, double coefficient, int degreesOfFreedom, double standardError, double tTest, double pValue) -
Method Summary
Modifier and TypeMethodDescriptiondoubleGiven a value of the independent variable, calculate it's value to add to the resultant dependent value.doubleGet the coefficient value.Get the degrees of freedom value.Get the independent variable name.Get the p value.Get the standard error value.getTTest()Get the t-test value.getValue()voidsetExtensionStatistic(String name, double value)
-
Constructor Details
-
CategoricalPredictor
Create a CategoricalPredictor for a given possible value of a given discrete independent variable.- Parameters:
fieldName- the name of the independent variablevalue- the possible value of the independent variablecoefficient- the weight of the predictor when the independent variable has that value
-
CategoricalPredictor
-
-
Method Details
-
getFieldName
Get the independent variable name.- Returns:
- independent variable name
-
getValue
- Returns:
- the possible value of the independent variable
-
getCoefficient
public double getCoefficient()Get the coefficient value.- Returns:
- coefficient value
-
getDegreesOfFreedom
Get the degrees of freedom value.- Returns:
- degrees of freedom value
-
getStandardError
Get the standard error value.- Returns:
- standard error value
-
getTTest
Get the t-test value.- Returns:
- t-test value
-
getPValue
Get the p value.- Returns:
- p value
-
calculate
Given a value of the independent variable, calculate it's value to add to the resultant dependent value. This contribution is equal to the coefficient if the provided and stored values are equal, and 0 otherwise.- Parameters:
fieldValue- independent variable value- Returns:
- contribution to dependent variable
-
setExtensionStatistic
-