Module datarush.analytics
Class AbstractPMMLRegressionModel.CategoricalPredictor
- java.lang.Object
-
- com.pervasive.datarush.analytics.regression.AbstractPMMLRegressionModel.CategoricalPredictor
-
- Enclosing class:
- AbstractPMMLRegressionModel
public static final class AbstractPMMLRegressionModel.CategoricalPredictor extends Object
-
-
Constructor Summary
Constructors Constructor Description CategoricalPredictor(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublecalculate(String fieldValue)Given a value of the independent variable, calculate it's value to add to the resultant dependent value.doublegetCoefficient()Get the coefficient value.IntegergetDegreesOfFreedom()Get the degrees of freedom value.StringgetFieldName()Get the independent variable name.DoublegetPValue()Get the p value.DoublegetStandardError()Get the standard error value.DoublegetTTest()Get the t-test value.StringgetValue()voidsetExtensionStatistic(String name, double value)
-
-
-
Constructor Detail
-
CategoricalPredictor
public CategoricalPredictor(String fieldName, String value, double coefficient)
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
-
-
Method Detail
-
getFieldName
public String getFieldName()
Get the independent variable name.- Returns:
- independent variable name
-
getValue
public String getValue()
- Returns:
- the possible value of the independent variable
-
getCoefficient
public double getCoefficient()
Get the coefficient value.- Returns:
- coefficient value
-
getDegreesOfFreedom
public Integer getDegreesOfFreedom()
Get the degrees of freedom value.- Returns:
- degrees of freedom value
-
getStandardError
public Double getStandardError()
Get the standard error value.- Returns:
- standard error value
-
getTTest
public Double getTTest()
Get the t-test value.- Returns:
- t-test value
-
getPValue
public Double getPValue()
Get the p value.- Returns:
- p value
-
calculate
public double calculate(String fieldValue)
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
public void setExtensionStatistic(String name, double value)
-
-