Module datarush.analytics
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PMMLClusteringModel.Builder
Builder forPMMLClusteringModel
instances.-
Nested classes/interfaces inherited from class com.pervasive.datarush.analytics.pmml.PMMLModel
PMMLModel.MiningFunction
-
-
Constructor Summary
Constructors Constructor Description PMMLClusteringModel(Document document)
Create aPMMLClusteringModel
out of an PMML document
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PMMLClusteringModel.Builder
builder(PMMLModelSpec spec, ModelClass modelClass, ComparisonMeasure comparisonMeasure, Cluster[] clusters)
Creates a builder that buildsPMMLClusteringModel
instances with the provided model specification, model class, comparison measure and clusters.protected void
buildModelElement(Element element)
Subclasses must implement this method to fill-in the contents of the model element.String
getAlgorithmName()
Gets the name of the algorithm used to create this modelClusteringField[]
getClusteringFields()
Gets theClusteringField
s of this model.Cluster[]
getClusters()
Gets theCluster
s of this model.ComparisonMeasure
getComparisonMeasure()
Gets theComparisonMeasure
of this model.MissingValueWeights
getMissingValueWeights()
Gets theMissingValueWeights
of this model.ModelClass
getModelClass()
Get theModelClass
of this model.protected String
getModelElementName()
Return the element name of the primary model element associated with this PMMLString
getModelName()
Gets the name of this model.boolean
isScorable()
Gets whether this model is scorable.protected void
parseModelElement(Element element)
Parse the given model element into the respective model object.-
Methods inherited from class com.pervasive.datarush.analytics.pmml.PMMLModel
findModelElement, getAnnotationText, getModelExplanation, getModelSpec, getVersion, parse, setAnnotationText, setModelExplanation, setVersion, toPMML
-
-
-
-
Constructor Detail
-
PMMLClusteringModel
public PMMLClusteringModel(Document document)
Create aPMMLClusteringModel
out of an PMML document- Parameters:
document
- the document containing the PMML model
-
-
Method Detail
-
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 theModelClass
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 theClusteringField
s of this model.- Returns:
- the
ClusteringField
s of this model
-
getMissingValueWeights
public MissingValueWeights getMissingValueWeights()
Gets theMissingValueWeights
of this model.- Returns:
- the
MissingValueWeights
of this model
-
getClusters
public Cluster[] getClusters()
Gets theCluster
s of this model.- Returns:
- the
Cluster
s of this model
-
getComparisonMeasure
public ComparisonMeasure getComparisonMeasure()
Gets theComparisonMeasure
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 classPMMLModel
- 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 classPMMLModel
- 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 classPMMLModel
- 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 buildsPMMLClusteringModel
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
- thePMMLModelSpec
modelClass
- theModelClass
comparisonMeasure
- theComparisonMeasure
clusters
- theCluster
s- Returns:
PMMLClusteringModel.Builder
-
-