Class PMMLTreeModel


  • public final class PMMLTreeModel
    extends PMMLModel
    PMML TreeModel. Object representation of the standard PMML TreeModel defined here.
    • Constructor Detail

      • PMMLTreeModel

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

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

      • getModelName

        public final String getModelName()
        Returns the "modelName" attribute for the model.
        Returns:
        the "modelName" attribute for the model.
      • setModelName

        public final void setModelName​(String modelName)
        Sets the "modelName" attribute for the model.
        Parameters:
        modelName - the "modelName" attribute for the model.
      • getMissingValueStrategy

        public final PMMLTreeModel.MissingValueStrategy getMissingValueStrategy()
        Returns the "missingValueStrategy" attribute for the model.
        Returns:
        the "missingValueStrategy" attribute for the model.
      • setMissingValueStrategy

        public final void setMissingValueStrategy​(PMMLTreeModel.MissingValueStrategy missingValueStrategy)
        Sets the "missingValueStrategy" attribute for the model.
        Parameters:
        missingValueStrategy - the "missingValueStrategy" attribute for the model.
      • getMissingValuePenalty

        public final double getMissingValuePenalty()
        Returns the "missingValuePenalty" attribute for the model.
        Returns:
        the "missingValuePenalty" attribute for the model.
      • setMissingValuePenalty

        public final void setMissingValuePenalty​(double missingValuePenalty)
        Sets the "missingValuePenalty" attribute for the model.
        Parameters:
        missingValuePenalty - the "missingValuePenalty" attribute for the model.
      • getNoTrueChildStrategy

        public final PMMLTreeModel.NoTrueChildStrategy getNoTrueChildStrategy()
        Returns the "noTrueChildStrategy" attribute for the model.
        Returns:
        the "noTrueChildStrategy" attribute for the model.
      • setNoTrueChildStrategy

        public final void setNoTrueChildStrategy​(PMMLTreeModel.NoTrueChildStrategy noTrueChildStrategy)
        Sets the "noTrueChildStrategy" attribute for the model.
        Parameters:
        noTrueChildStrategy - the "noTrueChildStrategy" attribute for the model.
      • getSplitCharacteristic

        public final PMMLTreeModel.SplitCharacteristic getSplitCharacteristic()
        Returns the "splitCharacteristic" attribute for the model.
        Returns:
        the "splitCharacteristic" attribute for the model.
      • setSplitCharacteristic

        public final void setSplitCharacteristic​(PMMLTreeModel.SplitCharacteristic splitCharacteristic)
        Sets the "splitCharacteristic" attribute for the model.
        Parameters:
        splitCharacteristic - the "splitCharacteristic" attribute for the model.
      • getRootNode

        public TreeNode getRootNode()
        Returns the root node element of the model
        Returns:
        the root node element of the model
      • setRootNode

        public void setRootNode​(TreeNode rootNode)
        Sets the root node element of the model
        Parameters:
        rootNode - the root node element of the model
      • buildModelElement

        protected void buildModelElement​(Element element)
        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:
        element - the model element
      • 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
      • parseModelElement

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