Class PMMLSummaryStatisticsModel

java.lang.Object
com.pervasive.datarush.analytics.pmml.PMMLModel
com.pervasive.datarush.analytics.stats.PMMLSummaryStatisticsModel

public final class PMMLSummaryStatisticsModel extends PMMLModel
PMML ModelStats. Object representation of the standard PMML ModelStats defined here.
  • Constructor Details

    • PMMLSummaryStatisticsModel

      public PMMLSummaryStatisticsModel(PMMLModelSpec modelSpec)
      Create a PMMLSummaryStatisticsModel for the given spec.
      Parameters:
      modelSpec - The PMMLModelSpec
    • PMMLSummaryStatisticsModel

      public PMMLSummaryStatisticsModel(Document document)
      Create a PMMLSummaryStatisticsModel, initialized to the contents of the given PMML document.
      Parameters:
      document - The PMML document.
  • Method Details

    • getFieldStats

      public UnivariateStats getFieldStats(String fieldName)
      Returns the UnivariateStats element for the given field
      Parameters:
      fieldName - the name of the field
      Returns:
      the UnivariateStats element for the given field
    • getFieldStatsMap

      public Map<String,UnivariateStats> 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

      public Map<String,Long> 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

      public BivariateStats getBivariateStats()
      Returns the bivariate statistics for this model
      Returns:
      the bivariate statistics
    • setBivariateStats

      public void setBivariateStats(BivariateStats bivariateStats)
      Set the bivariate statistics for this model
      Parameters:
      bivariateStats - the bivariate statistics
    • getModelElementName

      protected String getModelElementName()
      Description copied from class: PMMLModel
      Return the element name of the primary model element associated with this PMML
      Specified by:
      getModelElementName in class PMMLModel
      Returns:
      the element name of the primary model element
    • buildModelElement

      protected void buildModelElement(Element modelElement)
      Description copied from class: PMMLModel
      Subclasses 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:
      buildModelElement in class PMMLModel
      Parameters:
      modelElement - the model element
    • parseModelElement

      protected void parseModelElement(Element modelElement)
      Description copied from class: PMMLModel
      Parse the given model element into the respective model object.
      Specified by:
      parseModelElement in class PMMLModel
      Parameters:
      modelElement - root element of model object
    • findModelElement

      protected Element findModelElement(Document document)
      Description copied from class: PMMLModel
      Subclasses that require custom selection of their model element should override this method. By default, we find the first element that matches the model element name. In general the default implementation is sufficient; this is primarily intended for PMMLModels whose model element is a PMML extension.
      Overrides:
      findModelElement in class PMMLModel
      Parameters:
      document - The PMML document.
      Returns:
      The model element.
    • addFieldStats

      public void addFieldStats(UnivariateStats fieldStats)
    • addTotalStat

      public void addTotalStat(String name, Long count)