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 classPMMLClusteringModel.BuilderBuilder forPMMLClusteringModelinstances.-
Nested classes/interfaces inherited from class com.pervasive.datarush.analytics.pmml.PMMLModel
PMMLModel.MiningFunction
-
-
Constructor Summary
Constructors Constructor Description PMMLClusteringModel(Document document)Create aPMMLClusteringModelout of an PMML document
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PMMLClusteringModel.Builderbuilder(PMMLModelSpec spec, ModelClass modelClass, ComparisonMeasure comparisonMeasure, Cluster[] clusters)Creates a builder that buildsPMMLClusteringModelinstances with the provided model specification, model class, comparison measure and clusters.protected voidbuildModelElement(Element element)Subclasses must implement this method to fill-in the contents of the model element.StringgetAlgorithmName()Gets the name of the algorithm used to create this modelClusteringField[]getClusteringFields()Gets theClusteringFields of this model.Cluster[]getClusters()Gets theClusters of this model.ComparisonMeasuregetComparisonMeasure()Gets theComparisonMeasureof this model.MissingValueWeightsgetMissingValueWeights()Gets theMissingValueWeightsof this model.ModelClassgetModelClass()Get theModelClassof this model.protected StringgetModelElementName()Return the element name of the primary model element associated with this PMMLStringgetModelName()Gets the name of this model.booleanisScorable()Gets whether this model is scorable.protected voidparseModelElement(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 aPMMLClusteringModelout 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 theModelClassof this model.- Returns:
- the
ModelClassof 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 theClusteringFields of this model.- Returns:
- the
ClusteringFields of this model
-
getMissingValueWeights
public MissingValueWeights getMissingValueWeights()
Gets theMissingValueWeightsof this model.- Returns:
- the
MissingValueWeightsof this model
-
getClusters
public Cluster[] getClusters()
Gets theClusters of this model.- Returns:
- the
Clusters of this model
-
getComparisonMeasure
public ComparisonMeasure getComparisonMeasure()
Gets theComparisonMeasureof this model.- Returns:
- the
ComparisonMeasureof this model
-
buildModelElement
protected void buildModelElement(Element element)
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:
element- the model element
-
getModelElementName
protected String 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
-
parseModelElement
protected void parseModelElement(Element element)
Description copied from class:PMMLModelParse the given model element into the respective model object.- Specified by:
parseModelElementin 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 buildsPMMLClusteringModelinstances 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- thePMMLModelSpecmodelClass- theModelClasscomparisonMeasure- theComparisonMeasureclusters- theClusters- Returns:
PMMLClusteringModel.Builder
-
-