Module datarush.analytics
Class PMMLRegressionModel
- java.lang.Object
 - 
- com.pervasive.datarush.analytics.pmml.PMMLModel
 - 
- com.pervasive.datarush.analytics.regression.AbstractPMMLRegressionModel
 - 
- com.pervasive.datarush.analytics.regression.PMMLRegressionModel
 
 
 
 
- 
public class PMMLRegressionModel extends AbstractPMMLRegressionModel
PMML object model for Regression models. 
- 
- 
Nested Class Summary
- 
Nested classes/interfaces inherited from class com.pervasive.datarush.analytics.regression.AbstractPMMLRegressionModel
AbstractPMMLRegressionModel.CategoricalPredictor, AbstractPMMLRegressionModel.ModelType, AbstractPMMLRegressionModel.NormalizationMethod, AbstractPMMLRegressionModel.NumericPredictor, AbstractPMMLRegressionModel.RegressionTable 
- 
Nested classes/interfaces inherited from class com.pervasive.datarush.analytics.pmml.PMMLModel
PMMLModel.MiningFunction 
 - 
 
- 
Constructor Summary
Constructors Constructor Description PMMLRegressionModel(PMMLModelSpec objectSpec)Construct the PMML model from a model specification.PMMLRegressionModel(Document document)Construct the PMML model directly from an XML document. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCategoricalPredictor(AbstractPMMLRegressionModel.CategoricalPredictor categoricalPredictor)Adds a categorical predictor to the PMML model.voidaddNumericPredictor(AbstractPMMLRegressionModel.NumericPredictor numericPredictor)Add a numeric predictor to the PMML model.protected voidbuildModelElement(Element element)Subclasses must implement this method to fill-in the contents of the model element.List<AbstractPMMLRegressionModel.CategoricalPredictor>getCategoricalPredictor(String indepVarName)Get the categorical predictor for the given independent variable.List<AbstractPMMLRegressionModel.CategoricalPredictor>getCategoricalPredictors()doublegetIntercept()Get the intercept value.AbstractPMMLRegressionModel.NumericPredictorgetNumericPredictor(String indepVarName)Get the numeric predictor for the given independent variable.List<AbstractPMMLRegressionModel.NumericPredictor>getNumericPredictors()Return the list of numeric predictors for this model.com.pervasive.datarush.analytics.regression.AbstractPMMLRegressionModel.ValuePredictorgetValuePredictor(RecordValued input, DoubleSettable target)Get a value predictor for this model.protected voidparseModelElement(Element element)Parse the given model element into the respective model object.voidsetIntercept(double value)Set the intercept value.voidsetInterceptDegreesOfFreedom(int value)Set the intercept's degrees of freedom.voidsetInterceptPValue(double value)Set the intercept's p value.voidsetInterceptStandardError(double value)Set the intercept's standard error.voidsetInterceptTTest(double value)Set the intercept's t test.- 
Methods inherited from class com.pervasive.datarush.analytics.regression.AbstractPMMLRegressionModel
getModelElementName, getModelName, getNormalizationMethod, isScorable, logistic, setModelName, setNormalizationMethod, setScorable 
- 
Methods inherited from class com.pervasive.datarush.analytics.pmml.PMMLModel
findModelElement, getAnnotationText, getModelExplanation, getModelSpec, getVersion, parse, setAnnotationText, setModelExplanation, setVersion, toPMML 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
PMMLRegressionModel
public PMMLRegressionModel(PMMLModelSpec objectSpec)
Construct the PMML model from a model specification.- Parameters:
 objectSpec- model specification
 
- 
PMMLRegressionModel
public PMMLRegressionModel(Document document)
Construct the PMML model directly from an XML document.- Parameters:
 document- XML document containing PMML
 
 - 
 
- 
Method Detail
- 
setIntercept
public void setIntercept(double value)
Set the intercept value.- Parameters:
 value- intercept value
 
- 
setInterceptDegreesOfFreedom
public void setInterceptDegreesOfFreedom(int value)
Set the intercept's degrees of freedom.- Parameters:
 value- interceptDegreesOfFreedom value
 
- 
setInterceptStandardError
public void setInterceptStandardError(double value)
Set the intercept's standard error.- Parameters:
 value- interceptStandardError value
 
- 
setInterceptTTest
public void setInterceptTTest(double value)
Set the intercept's t test.- Parameters:
 value- interceptTTest value
 
- 
setInterceptPValue
public void setInterceptPValue(double value)
Set the intercept's p value.- Parameters:
 value- interceptPValue value
 
- 
getIntercept
public double getIntercept()
Get the intercept value.- Returns:
 - intercept value
 
 
- 
addNumericPredictor
public void addNumericPredictor(AbstractPMMLRegressionModel.NumericPredictor numericPredictor)
Add a numeric predictor to the PMML model. A numeric predictor contains the model values for an independent variable and can be used to predict an outcome given an instance value of the independent variable.- Parameters:
 numericPredictor- numeric predictor
 
- 
getNumericPredictors
public List<AbstractPMMLRegressionModel.NumericPredictor> getNumericPredictors()
Return the list of numeric predictors for this model.- Returns:
 - numeric predictors
 
 
- 
getNumericPredictor
public AbstractPMMLRegressionModel.NumericPredictor getNumericPredictor(String indepVarName)
Get the numeric predictor for the given independent variable. The given name must match the name of an independent variable in the model.- Parameters:
 indepVarName- name of the independent variable- Returns:
 - numeric predictor
 
 
- 
addCategoricalPredictor
public void addCategoricalPredictor(AbstractPMMLRegressionModel.CategoricalPredictor categoricalPredictor)
Adds a categorical predictor to the PMML model. A categorical predictor describes the behavior of the model with regards to a single possible value of a discrete independent variable- Parameters:
 categoricalPredictor- the Categorical Predictor element
 
- 
getCategoricalPredictors
public List<AbstractPMMLRegressionModel.CategoricalPredictor> getCategoricalPredictors()
- Returns:
 - all the Categorical Predictor elements
 
 
- 
getCategoricalPredictor
public List<AbstractPMMLRegressionModel.CategoricalPredictor> getCategoricalPredictor(String indepVarName)
Get the categorical predictor for the given independent variable. The given name must match the name of an independent variable in the model.- Parameters:
 indepVarName- name of the independent variable- Returns:
 - categorical predictor
 
 
- 
getValuePredictor
public com.pervasive.datarush.analytics.regression.AbstractPMMLRegressionModel.ValuePredictor getValuePredictor(RecordValued input, DoubleSettable target)
Get a value predictor for this model. The input record is provided as input along with a settable target for the predicted value. The value predictor can be used to produce an output prediction for each input record of a dataflow.- Parameters:
 input- input data source containing independent data valuestarget- output field containing result of prediction- Returns:
 - value predictor
 
 
- 
buildModelElement
protected void buildModelElement(Element element)
Description copied from class:PMMLModelSubclasses must implement this method to fill-in the contents of the model element. At the time this method is invoked, the element will have its name and MiningSchema sub-element populated.- Specified by:
 buildModelElementin classAbstractPMMLRegressionModel- Parameters:
 element- the model element
 
- 
parseModelElement
protected void parseModelElement(Element element)
Description copied from class:AbstractPMMLRegressionModelParse the given model element into the respective model object. This implementation only reads the normalizationMethod and scorable attributes. Subclasses SHOULD override this and are responsible for Regression Tables and the function name and target field attributes.- Overrides:
 parseModelElementin classAbstractPMMLRegressionModel- Parameters:
 element- root element of model object
 
 - 
 
 -