|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
org.knime.core.node.port.pmml.PMMLContentHandler
org.knime.base.node.mine.regression.PMMLRegressionContentHandler
public class PMMLRegressionContentHandler
Constructor Summary | |
---|---|
PMMLRegressionContentHandler(PMMLPortObjectSpec spec)
Creates a new PMML content handler for regression models. |
|
PMMLRegressionContentHandler(PMMLRegressionPortObject po)
Creates a new PMML content handler for regression models based on an existing port object. |
Method Summary | |
---|---|
void |
characters(char[] ch,
int start,
int length)
|
void |
checkTargetField(String targetFieldName)
Checks if the given target field name exists in this model. |
void |
checkValidity()
Checks if the internal regression has been set and if all predictors are assigned. |
void |
endDocument()
|
void |
endElement(String uri,
String localName,
String name)
|
String |
getAlgorithmName()
|
String |
getModelName()
Returns the model's name. |
PMMLRegressionPortObject.RegressionTable |
getRegressionTable()
|
String |
getTargetField()
Get the response column name as said in the spec or "Response" if none is set. |
void |
setAlgorithmName(String algorithmName)
|
void |
setModelName(String modelName)
|
void |
setRegressionTable(PMMLRegressionPortObject.RegressionTable regressionTable)
|
void |
startElement(String uri,
String localName,
String name,
Attributes atts)
|
void |
writePMMLRegressionModel(TransformerHandler h)
Writes the PMML regression model to the given handler. |
Methods inherited from class org.knime.core.node.port.pmml.PMMLContentHandler |
---|
endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
---|
error, fatalError, notationDecl, resolveEntity, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PMMLRegressionContentHandler(PMMLPortObjectSpec spec)
spec
- the spec for the regression modelpublic PMMLRegressionContentHandler(PMMLRegressionPortObject po)
po
- a PMML regression port objectMethod Detail |
---|
public void checkValidity()
IllegalStateException
is thrown.
IllegalStateException
- if required information is missingpublic final String getModelName()
public final void setModelName(String modelName)
modelName
- the modelName to setpublic final PMMLRegressionPortObject.RegressionTable getRegressionTable()
public String getTargetField()
public void checkTargetField(String targetFieldName)
targetFieldName
- a target field namepublic final void setRegressionTable(PMMLRegressionPortObject.RegressionTable regressionTable)
regressionTable
- the regressionTable to setpublic final String getAlgorithmName()
public final void setAlgorithmName(String algorithmName)
algorithmName
- the algorithmName to setpublic void writePMMLRegressionModel(TransformerHandler h) throws SAXException
h
- a transform handler
SAXException
- if anything goes wrong while serializing the modelpublic void characters(char[] ch, int start, int length) throws SAXException
characters
in interface ContentHandler
characters
in class PMMLContentHandler
SAXException
public void endDocument() throws SAXException
endDocument
in interface ContentHandler
endDocument
in class PMMLContentHandler
SAXException
public void endElement(String uri, String localName, String name) throws SAXException
endElement
in interface ContentHandler
endElement
in class PMMLContentHandler
SAXException
public void startElement(String uri, String localName, String name, Attributes atts) throws SAXException
startElement
in interface ContentHandler
startElement
in class PMMLContentHandler
SAXException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |