Class PMMLClusteringModel

java.lang.Object
com.pervasive.datarush.analytics.pmml.PMMLModel
com.pervasive.datarush.analytics.cluster.PMMLClusteringModel

public final class PMMLClusteringModel extends PMMLModel
PMML clustering model. This model uses the standard PMML Clustering model.
  • Constructor Details

    • PMMLClusteringModel

      public PMMLClusteringModel(Document document)
      Create a PMMLClusteringModel out of an PMML document
      Parameters:
      document - the document containing the PMML model
  • Method Details

    • getModelName

      public String getModelName()
      Gets the name of this model.
      Returns:
      the name of this model
    • getAlgorithmName

      public String getAlgorithmName()
      Gets the name of the algorithm used to create this model
      Returns:
      the name of the algorithm used to create this model
    • getModelClass

      public ModelClass getModelClass()
      Get the ModelClass of this model.
      Returns:
      the ModelClass of this model
    • isScorable

      public boolean isScorable()
      Gets whether this model is scorable.
      Returns:
      true, if the model is scorable, false otherwise
    • getClusteringFields

      public ClusteringField[] getClusteringFields()
      Gets the ClusteringFields of this model.
      Returns:
      the ClusteringFields of this model
    • getMissingValueWeights

      public MissingValueWeights getMissingValueWeights()
      Gets the MissingValueWeights of this model.
      Returns:
      the MissingValueWeights of this model
    • getClusters

      public Cluster[] getClusters()
      Gets the Clusters of this model.
      Returns:
      the Clusters of this model
    • getComparisonMeasure

      public ComparisonMeasure getComparisonMeasure()
      Gets the ComparisonMeasure of this model.
      Returns:
      the ComparisonMeasure of this 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
    • builder

      public static PMMLClusteringModel.Builder builder(PMMLModelSpec spec, ModelClass modelClass, ComparisonMeasure comparisonMeasure, Cluster[] clusters)
      Creates a builder that builds PMMLClusteringModel instances with the provided model specification, model class, comparison measure and clusters. For other parameters defaults, will be used: the model will be scorable, have no name or algorithm name, no clustering fields, and its missing value weights element will have an empty weights array.
      Parameters:
      spec - the PMMLModelSpec
      modelClass - the ModelClass
      comparisonMeasure - the ComparisonMeasure
      clusters - the Clusters
      Returns:
      PMMLClusteringModel.Builder