Module datarush.analytics
Class PMMLSummaryStatisticsModel
java.lang.Object
com.pervasive.datarush.analytics.pmml.PMMLModel
com.pervasive.datarush.analytics.stats.PMMLSummaryStatisticsModel
PMML ModelStats. Object representation of the standard PMML ModelStats defined here.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.pervasive.datarush.analytics.pmml.PMMLModel
PMMLModel.MiningFunction -
Constructor Summary
ConstructorsConstructorDescriptionPMMLSummaryStatisticsModel(PMMLModelSpec modelSpec) Create a PMMLSummaryStatisticsModel for the given spec.PMMLSummaryStatisticsModel(Document document) Create a PMMLSummaryStatisticsModel, initialized to the contents of the given PMML document. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFieldStats(UnivariateStats fieldStats) voidaddTotalStat(String name, Long count) protected voidbuildModelElement(Element modelElement) Subclasses must implement this method to fill-in the contents of the model element.protected ElementfindModelElement(Document document) Subclasses that require custom selection of their model element should override this method.Returns the bivariate statistics for this modelgetFieldStats(String fieldName) Returns the UnivariateStats element for the given fieldReturns the mapping of UnivariateStats elements.protected StringReturn the element name of the primary model element associated with this PMMLReturns a mapping of the total counts for the fields.protected voidparseModelElement(Element modelElement) Parse the given model element into the respective model object.voidsetBivariateStats(BivariateStats bivariateStats) Set the bivariate statistics for this modelMethods inherited from class com.pervasive.datarush.analytics.pmml.PMMLModel
getAnnotationText, getModelExplanation, getModelSpec, getVersion, parse, setAnnotationText, setModelExplanation, setVersion, toPMML
-
Constructor Details
-
PMMLSummaryStatisticsModel
Create a PMMLSummaryStatisticsModel for the given spec.- Parameters:
modelSpec- The PMMLModelSpec
-
PMMLSummaryStatisticsModel
Create a PMMLSummaryStatisticsModel, initialized to the contents of the given PMML document.- Parameters:
document- The PMML document.
-
-
Method Details
-
getFieldStats
Returns the UnivariateStats element for the given field- Parameters:
fieldName- the name of the field- Returns:
- the UnivariateStats element for the given field
-
getFieldStatsMap
Returns the mapping of UnivariateStats elements. The keys in the map are field names. The values in the map are UnivariateStats for the given field.- Returns:
- the mapping of UnivariateStats elements
-
getTotalStatsMap
Returns a mapping of the total counts for the fields. The keys in the map are the field names. The values in the map are the total counts for the given field.- Returns:
- the mapping of total statistics
-
getBivariateStats
Returns the bivariate statistics for this model- Returns:
- the bivariate statistics
-
setBivariateStats
Set the bivariate statistics for this model- Parameters:
bivariateStats- the bivariate statistics
-
getModelElementName
Description copied from class:PMMLModelReturn the element name of the primary model element associated with this PMML- Specified by:
getModelElementNamein classPMMLModel- Returns:
- the element name of the primary model element
-
buildModelElement
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 classPMMLModel- Parameters:
modelElement- the model element
-
parseModelElement
Description copied from class:PMMLModelParse the given model element into the respective model object.- Specified by:
parseModelElementin classPMMLModel- Parameters:
modelElement- root element of model object
-
findModelElement
Description copied from class:PMMLModelSubclasses that require custom selection of their model element should override this method. By default, we find the first element that matchesthe model element name. In general the default implementation is sufficient; this is primarily intended for PMMLModels whose model element is a PMML extension.- Overrides:
findModelElementin classPMMLModel- Parameters:
document- The PMML document.- Returns:
- The model element.
-
addFieldStats
-
addTotalStat
-