Module datarush.analytics
Class PredictiveModelQuality
java.lang.Object
com.pervasive.datarush.analytics.pmml.ModelQuality
com.pervasive.datarush.analytics.pmml.PredictiveModelQuality
A PMML object model for some of the metadata about a predictive (usually regression) model's quality.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumIndicator for the phases of model-building during which a dataset may be used. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringConstant for the name of thePredictiveModelQualityelement.Fields inherited from class com.pervasive.datarush.analytics.pmml.ModelQuality
ATT_DATA_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAIC()Get the Akaike Information Criterion, a measure of the relative goodness of fit of a statistical model.getBIC()Get the Bayesian Information Criterion, a measure of the relative goodness of fit of a statistical model which penalizes the number of parameters more strongly than AIC.Get the dataUsage, the relationship between the model and the dataset used to measure its quality.Get the Degrees of Freedom of the error of the modeldoublegetExtensionStatistic(String name) Retrieve a statistic about the model that is not directly supported by PMMLGet the meanAbsoluteError, the mean of the absolute values of the predictive errors on that dataset.Get the Mean Squared Error, the mean of the squares of the predictive errors on that dataset.Get the r-squared attribute, a measure of the amount of variance in the target variable explained by a model.Get the rootMeanSquaredError, the square root of the mean of the squares of the predictive errors on the dataset.Get the Sum Of Squares (Error) statistic.Get the Sum Of Squares (Regression) statistic.Get the predicted field on which the quality information was measured.booleanhasExtensionStatistic(String name) Check whether a certain statistic is available as an extensionprotected voidInitialize this object's state from a PMML element with the appropriate typevoidvoidvoidsetDataUsage(PredictiveModelQuality.Usage dataUsage) Sets the "dataUsage" attribute for the model.voidsetDegreesOfFreedom(Integer degreesOfFreedom) voidsetExtensionStatistic(String name, double value) Sets the value of an attribute not directly supported by PMML.voidsetMeanAbsoluteError(Double meanAbsoluteError) Sets the "meanAbsoluteError" attribute for the model.voidsetMeanSquaredError(Double meanSquaredError) Sets the "meanSquaredError" attribute for the model.voidsetR_squared(Double r_squared) Sets the "r-squared" attribute for the model.voidsetRootMeanSquaredError(Double rootMeanSquaredError) voidsetSumSquaredError(Double sumSquaredError) voidsetSumSquaredRegression(Double sumSquaredRegression) voidsetTargetField(String targetField) Sets the "targetField" attribute for the model.voidBuild this ModelQuality as a PMML element with a given parentMethods inherited from class com.pervasive.datarush.analytics.pmml.ModelQuality
getDataName, setDataName, smartParse
-
Field Details
-
ELEM_THIS
Constant for the name of thePredictiveModelQualityelement.- See Also:
-
-
Constructor Details
-
PredictiveModelQuality
public PredictiveModelQuality()Default constructor for bean-like behavior
-
-
Method Details
-
toPMML
Description copied from class:ModelQualityBuild this ModelQuality as a PMML element with a given parent- Specified by:
toPMMLin classModelQuality- Parameters:
parent- the future parent of the element
-
parse
Description copied from class:ModelQualityInitialize this object's state from a PMML element with the appropriate type- Specified by:
parsein classModelQuality- Parameters:
toParse- The element with the state
-
getR_squared
Get the r-squared attribute, a measure of the amount of variance in the target variable explained by a model. It ranges from 0.0 (the model explains nothing) to 1.0 (the model is a perfect predictor).- Returns:
- the "r-squared" attribute for the model, or null if it is not included.
-
getMeanAbsoluteError
Get the meanAbsoluteError, the mean of the absolute values of the predictive errors on that dataset.- Returns:
- the "meanAbsoluteError" attribute for the model, or null if it is not included.
-
getRootMeanSquaredError
Get the rootMeanSquaredError, the square root of the mean of the squares of the predictive errors on the dataset.- Returns:
- the "rootMeanSquaredError" attribute for the model, or null if it is not included.
-
getAIC
Get the Akaike Information Criterion, a measure of the relative goodness of fit of a statistical model.- Returns:
- the "AIC" attribute for the model, or null if it is not included.
-
getBIC
Get the Bayesian Information Criterion, a measure of the relative goodness of fit of a statistical model which penalizes the number of parameters more strongly than AIC.- Returns:
- the "BIC" attribute for the model, or null if it is not included.
-
getDegreesOfFreedom
Get the Degrees of Freedom of the error of the model- Returns:
- the "degreesOfFreedom" attribute for the model, or null if it is not included.
-
getMeanSquaredError
Get the Mean Squared Error, the mean of the squares of the predictive errors on that dataset.- Returns:
- the "meanSquaredeError" attribute for the model-quality element, or null if it is not included.
-
getSumSquaredError
Get the Sum Of Squares (Error) statistic.- Returns:
- the "sumSquaredError" attribute for the model-quality element, or null if it is not included.
-
getSumSquaredRegression
Get the Sum Of Squares (Regression) statistic.- Returns:
- the "sumSquaredRegression" attribute for the model-quality element, or null if it is not included.
-
getDataUsage
Get the dataUsage, the relationship between the model and the dataset used to measure its quality. It indicates the phase of model-building during which the model was first exposed to data from that set.- Returns:
- the "dataUsage" attribute for the model-quality element.
-
getTargetField
Get the predicted field on which the quality information was measured.- Returns:
- the "dataUsage" attribute for the model-quality element.
-
hasExtensionStatistic
Check whether a certain statistic is available as an extension- Parameters:
name- The name of the statistic to check- Returns:
- true iff the statistic is present and available.
-
getExtensionStatistic
Retrieve a statistic about the model that is not directly supported by PMML- Parameters:
name- the extension statistic to check- Returns:
- the value of the named extension statistic, or Double.NaN if the extension is not present.
-
getExtensionStatisticNames
- Returns:
- a collection of Strings which, when passed to hasExtensionStatistic, return true
-
setTargetField
Sets the "targetField" attribute for the model.- Parameters:
targetField- the "targetField" attribute for the model.
-
setR_squared
Sets the "r-squared" attribute for the model. If null, the attribute will be absent.- Parameters:
r_squared- the "r-squared" attribute for the model.
-
setMeanAbsoluteError
Sets the "meanAbsoluteError" attribute for the model. If null, the attribute will be absent.- Parameters:
meanAbsoluteError- the "meanAbsoluteError" attribute for the model.
-
setMeanSquaredError
Sets the "meanSquaredError" attribute for the model. If null, the attribute will be absent.- Parameters:
meanSquaredError- the "meanSquaredError" attribute for the model.
-
setRootMeanSquaredError
-
setAIC
-
setBIC
-
setDegreesOfFreedom
-
setSumSquaredError
-
setSumSquaredRegression
-
setDataUsage
Sets the "dataUsage" attribute for the model. If null, the attribute will be set to "training", the default.- Parameters:
dataUsage- the "dataUsage" attribute for the model.
-
setExtensionStatistic
Sets the value of an attribute not directly supported by PMML. It will appear as an Extension element instead of as an attribute.- Parameters:
name- the "name" attribute of the extensionvalue- the "value" attribute of the extension
-