|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.core.node.port.pmml.PMMLPortObject
org.knime.base.node.mine.cluster.PMMLClusterPortObject
public class PMMLClusterPortObject
Nested Class Summary | |
---|---|
static class |
PMMLClusterPortObject.ComparisonMeasure
Constants indicating whether the squared euclidean or the euclidean comparison measure should be used. |
Nested classes/interfaces inherited from interface org.knime.core.node.port.PortObject |
---|
PortObject.PortObjectSerializer<T extends PortObject> |
Field Summary | |
---|---|
static PortType |
TYPE
PMML Cluster port type. |
Fields inherited from class org.knime.core.node.port.pmml.PMMLPortObject |
---|
CDATA, DATA_DICT, DATA_FIELD, PMML_V3_0, PMML_V3_1, PMML_V3_2, VALUE |
Constructor Summary | |
---|---|
PMMLClusterPortObject()
Default constructor necessary for loading. |
|
PMMLClusterPortObject(double[][] prototypes,
int nrOfClusters,
PMMLPortObjectSpec portSpec)
|
Method Summary | |
---|---|
protected void |
addClusteringFields(TransformerHandler handler,
List<DataColumnSpec> colSpecs)
Writes the clustering fields (name). |
protected void |
addClusters(TransformerHandler handler,
double[][] prototypes)
Writes the actual cluster prototypes. |
protected void |
addUsedDistanceMeasure(TransformerHandler handler)
Writes the used distance measure - so far it is euclidean. |
int[] |
getClusterCoverage()
|
PMMLClusterPortObject.ComparisonMeasure |
getComparisonMeasure()
|
String[] |
getLabels()
|
int |
getNrOfClusters()
|
double[][] |
getPrototypes()
|
String |
getSummary()
Get a short summary of this PortObject . |
List<DataColumnSpec> |
getUsedColumns()
|
void |
loadFrom(PMMLPortObjectSpec spec,
InputStream in,
String version)
|
void |
setClusterCoverage(int[] clusterCoverage)
|
void |
setClusterLabels(String[] labels)
|
void |
setComparisonMeasure(PMMLClusterPortObject.ComparisonMeasure measure)
|
void |
writePMMLModel(TransformerHandler handler)
|
Methods inherited from class org.knime.core.node.port.pmml.PMMLPortObject |
---|
addPMMLContentHandler, getLocalSchemaLocation, getModelType, getPMMLContentHandler, getPortObjectSerializer, getSpec, getViews, save |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final PortType TYPE
Constructor Detail |
---|
public PMMLClusterPortObject()
public PMMLClusterPortObject(double[][] prototypes, int nrOfClusters, PMMLPortObjectSpec portSpec)
prototypes
- the unnormalized prototypes of clustersnrOfClusters
- number of clustersportSpec
- the PMMLPortObjectSpec
holding information of the
PMML DataDictionary and the PMML MiningSchemaMethod Detail |
---|
public void setClusterLabels(String[] labels)
labels
- cluster labelspublic void setClusterCoverage(int[] clusterCoverage)
clusterCoverage
- how many data points are in each clusterpublic void setComparisonMeasure(PMMLClusterPortObject.ComparisonMeasure measure)
measure
- the used comparison measurepublic PMMLClusterPortObject.ComparisonMeasure getComparisonMeasure()
public List<DataColumnSpec> getUsedColumns()
public double[][] getPrototypes()
public int getNrOfClusters()
public int[] getClusterCoverage()
public String[] getLabels()
public void writePMMLModel(TransformerHandler handler) throws SAXException
writePMMLModel
in class PMMLPortObject
handler
- the handler responsible for writing the PMML
SAXException
- if something goes wrong during writing the PMMLprotected void addUsedDistanceMeasure(TransformerHandler handler) throws SAXException
handler
- to write to
SAXException
- if something goes wrongprotected void addClusteringFields(TransformerHandler handler, List<DataColumnSpec> colSpecs) throws SAXException
handler
- to write tocolSpecs
- column specs of used columns
SAXException
- if something goes wrongprotected void addClusters(TransformerHandler handler, double[][] prototypes) throws SAXException
handler
- to write toprototypes
- the normalized prototypes
SAXException
- if something goes wrongpublic void loadFrom(PMMLPortObjectSpec spec, InputStream in, String version) throws ParserConfigurationException, SAXException, IOException
loadFrom
in class PMMLPortObject
spec
- the referring spec of this objectin
- the input stream to write toversion
- the version (3.0 - 3.1)
ParserConfigurationException
- if the parser cannot be instantiated
SAXException
- if something goes wrong during writing
IOException
- if the file cannot be foundpublic String getSummary()
PortObject
.
The return value will be shown in a node port's tooltip, for instance.
getSummary
in interface PortObject
getSummary
in class PMMLPortObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |