org.knime.base.node.mine.subgroupminer
Class PMMLAssociationRulePortObject

java.lang.Object
  extended by org.knime.core.node.port.pmml.PMMLPortObject
      extended by org.knime.base.node.mine.subgroupminer.PMMLAssociationRulePortObject
All Implemented Interfaces:
PortObject

public class PMMLAssociationRulePortObject
extends PMMLPortObject

Author:
Fabian Dill, University of Konstanz

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.knime.core.node.port.PortObject
PortObject.PortObjectSerializer<T extends PortObject>
 
Field Summary
static PortType TYPE
          PortType for association rules.
 
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
PMMLAssociationRulePortObject()
          Creates a new PMML association rule port object.
PMMLAssociationRulePortObject(PMMLPortObjectSpec spec, Collection<AssociationRule> rules, double minSupport, double minConfidence, int nrOfTransactions, int nrOfItems)
          Creates a new PMML association rule port object.
PMMLAssociationRulePortObject(PMMLPortObjectSpec spec, double minSupport, double minConfidence, int nrOfTransactions, int nrOfItems, Collection<FrequentItemSet> itemsets)
          Creates a new PMML association rule port object.
 
Method Summary
 String getSummary()
          Get a short summary of this PortObject.
 void loadFrom(PMMLPortObjectSpec spec, InputStream in, String version)
           
 void setNameMapping(List<String> nameMapping)
          Sets a new name mapping.
protected  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

TYPE

public static final PortType TYPE
PortType for association rules.

Constructor Detail

PMMLAssociationRulePortObject

public PMMLAssociationRulePortObject()
Creates a new PMML association rule port object.


PMMLAssociationRulePortObject

public PMMLAssociationRulePortObject(PMMLPortObjectSpec spec,
                                     double minSupport,
                                     double minConfidence,
                                     int nrOfTransactions,
                                     int nrOfItems,
                                     Collection<FrequentItemSet> itemsets)
Creates a new PMML association rule port object.

Parameters:
spec - PMML spec
minSupport - minimum support
minConfidence - minimum confidence
nrOfTransactions - number of transactions
nrOfItems - number of items
itemsets - collection of frequent item sets

PMMLAssociationRulePortObject

public PMMLAssociationRulePortObject(PMMLPortObjectSpec spec,
                                     Collection<AssociationRule> rules,
                                     double minSupport,
                                     double minConfidence,
                                     int nrOfTransactions,
                                     int nrOfItems)
Creates a new PMML association rule port object.

Parameters:
spec - PMML spec
rules - collection of association rules
minSupport - minimum support
minConfidence - minimum confidence
nrOfTransactions - number of transactions
nrOfItems - number of items
Method Detail

setNameMapping

public void setNameMapping(List<String> nameMapping)
Sets a new name mapping.

Parameters:
nameMapping - list of names

getSummary

public String getSummary()
Get a short summary of this PortObject. The return value will be shown in a node port's tooltip, for instance.

Specified by:
getSummary in interface PortObject
Specified by:
getSummary in class PMMLPortObject
Returns:
Summary of the object's content, suitable for a tooltip. Empty strings and null result values are ok (though not encouraged).

writePMMLModel

protected void writePMMLModel(TransformerHandler handler)
                       throws SAXException

Specified by:
writePMMLModel in class PMMLPortObject
Parameters:
handler - the handler responsible for writing the PMML
Throws:
SAXException - if something goes wrong during writing the PMML

loadFrom

public void loadFrom(PMMLPortObjectSpec spec,
                     InputStream in,
                     String version)
              throws SAXException,
                     ParserConfigurationException,
                     IOException
Overrides:
loadFrom in class PMMLPortObject
Parameters:
spec - the referring spec of this object
in - the input stream to write to
version - the version (3.0 - 3.1)
Throws:
SAXException - if something goes wrong during writing
ParserConfigurationException - if the parser cannot be instantiated
IOException - if the file cannot be found


Copyright, 2003 - 2010. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.