Class AbstractPMMLRegressionModel.CategoricalPredictor

    • 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 variable
        value - the possible value of the independent variable
        coefficient - the weight of the predictor when the independent variable has that value
      • CategoricalPredictor

        public CategoricalPredictor​(String fieldName,
                                    String value,
                                    double coefficient,
                                    int degreesOfFreedom,
                                    double standardError,
                                    double tTest,
                                    double pValue)
    • 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)