|
||||||||||
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.svm.PMMLSVMPortObject
public class PMMLSVMPortObject
A PMMLPortObject
responsible for transforming a SupportVectorMachine
Svm
into a PMML file.
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
PMML SVM 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 | |
---|---|
PMMLSVMPortObject()
Empty constructor. |
|
PMMLSVMPortObject(PMMLPortObjectSpec spec,
Kernel kernel,
Svm... svms)
Constructor. |
Method Summary | |
---|---|
protected void |
addHypertangentKernel(TransformerHandler handler,
Kernel kernel)
Writes the PMML sigmoid kernel attributes. |
protected void |
addKernel(TransformerHandler handler,
Kernel kernel)
Writes the PMML kernel attributes. |
protected void |
addPolynomialKernel(TransformerHandler handler,
Kernel kernel)
Writes the PMML polynomial kernel attributes. |
protected void |
addRBFKernel(TransformerHandler handler,
Kernel kernel)
Writes the PMML RBF kernel attributes. |
protected void |
addSVMs(TransformerHandler handler,
Svm[] svms)
Writes the PMML support vector machines. |
protected void |
addTargets(TransformerHandler handler,
String classcolName,
String[] targetVals)
Writes the PMML target attributes. |
protected void |
addVectorDictionary(TransformerHandler handler,
Svm[] svms,
List<String> colNames)
Writes the PMML VectorDictionary containing all support vectors for all support vector machines. |
Kernel |
getKernel()
|
String |
getSummary()
Get a short summary of this PortObject . |
Svm[] |
getSvms()
|
void |
loadFrom(PMMLPortObjectSpec spec,
InputStream in,
String version)
|
void |
setKernel(Kernel kernel)
|
void |
setSvms(Svm[] svms)
|
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 |
---|
public static final PortType TYPE
Constructor Detail |
---|
public PMMLSVMPortObject()
public PMMLSVMPortObject(PMMLPortObjectSpec spec, Kernel kernel, Svm... svms)
spec
- the PMMLPortObjectSpec
of the training table.kernel
- the Kernel
of the Svm
.svms
- the trained Svm
s.Method Detail |
---|
public Kernel getKernel()
public void setKernel(Kernel kernel)
kernel
- the kernel to setpublic Svm[] getSvms()
public void setSvms(Svm[] svms)
svms
- the svms to setprotected 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 addTargets(TransformerHandler handler, String classcolName, String[] targetVals) throws SAXException
handler
- to write toclasscolName
- name of the class column.targetVals
- the target values of the SVMs
SAXException
- if something goes wrong.protected void addKernel(TransformerHandler handler, Kernel kernel) throws SAXException
handler
- to write to.kernel
- the used Kernel of the SVM.
SAXException
- if something goes wrong.protected void addPolynomialKernel(TransformerHandler handler, Kernel kernel) throws SAXException
handler
- to write to.kernel
- the used Kernel of the SVM.
SAXException
- if something goes wrong.protected void addHypertangentKernel(TransformerHandler handler, Kernel kernel) throws SAXException
handler
- to write to.kernel
- the used Kernel of the SVM.
SAXException
- if something goes wrong.protected void addRBFKernel(TransformerHandler handler, Kernel kernel) throws SAXException
handler
- to write to.kernel
- the used Kernel of the SVM.
SAXException
- if something goes wrong.protected void addVectorDictionary(TransformerHandler handler, Svm[] svms, List<String> colNames) throws SAXException
handler
- to write to.svms
- the trained Support Vector Machines.colNames
- the column names in the training data.
SAXException
- if something goes wrong.protected void addSVMs(TransformerHandler handler, Svm[] svms) throws SAXException
handler
- to write to.svms
- the trained support vector machines.
SAXException
- if something goes wrong.public 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 |