Search in sources :

Example 1 with AutoBinnerApply

use of org.knime.base.node.preproc.autobinner.apply.AutoBinnerApply in project knime-core by knime.

the class AutoBinnerLearnNodeModel method execute.

/**
 * {@inheritDoc}
 */
@Override
protected PortObject[] execute(final PortObject[] inObjects, final ExecutionContext exec) throws Exception {
    BufferedDataTable data = (BufferedDataTable) inObjects[0];
    AutoBinner binner = new AutoBinner(m_settings);
    BufferedDataTable inData = binner.calcDomainBoundsIfNeccessary(data, exec, Arrays.asList(m_settings.getTargetColumn()));
    PMMLPreprocDiscretize op = binner.execute(inData, exec);
    AutoBinnerApply applier = new AutoBinnerApply();
    BufferedDataTable outData = applier.execute(op, inData, exec);
    return new PortObject[] { outData, new PMMLDiscretizePreprocPortObject(op) };
}
Also used : AutoBinnerApply(org.knime.base.node.preproc.autobinner.apply.AutoBinnerApply) BufferedDataTable(org.knime.core.node.BufferedDataTable) PMMLPreprocDiscretize(org.knime.base.node.preproc.autobinner.pmml.PMMLPreprocDiscretize) PMMLDiscretizePreprocPortObject(org.knime.base.node.preproc.autobinner.pmml.PMMLDiscretizePreprocPortObject) PMMLPreprocPortObject(org.knime.core.node.port.pmml.preproc.PMMLPreprocPortObject) PortObject(org.knime.core.node.port.PortObject) PMMLDiscretizePreprocPortObject(org.knime.base.node.preproc.autobinner.pmml.PMMLDiscretizePreprocPortObject)

Example 2 with AutoBinnerApply

use of org.knime.base.node.preproc.autobinner.apply.AutoBinnerApply in project knime-core by knime.

the class AutoBinnerLearnNodeModel method execute.

/**
 * {@inheritDoc}
 */
@Override
protected PortObject[] execute(final PortObject[] inObjects, final ExecutionContext exec) throws Exception {
    BufferedDataTable data = (BufferedDataTable) inObjects[0];
    AutoBinner binner = new AutoBinner(m_settings);
    BufferedDataTable inData = binner.calcDomainBoundsIfNeccessary(data, exec, Arrays.asList(m_settings.getTargetColumn()));
    PMMLPreprocDiscretize op = binner.execute(inData, exec);
    AutoBinnerApply applier = new AutoBinnerApply();
    BufferedDataTable outData = applier.execute(op, inData, exec);
    return new PortObject[] { outData, new PMMLDiscretizePreprocPortObject(op) };
}
Also used : AutoBinnerApply(org.knime.base.node.preproc.autobinner.apply.AutoBinnerApply) BufferedDataTable(org.knime.core.node.BufferedDataTable) PMMLPreprocDiscretize(org.knime.base.node.preproc.autobinner.pmml.PMMLPreprocDiscretize) PMMLDiscretizePreprocPortObject(org.knime.base.node.preproc.autobinner.pmml.PMMLDiscretizePreprocPortObject) PMMLPreprocPortObject(org.knime.core.node.port.pmml.preproc.PMMLPreprocPortObject) PortObject(org.knime.core.node.port.PortObject) PMMLDiscretizePreprocPortObject(org.knime.base.node.preproc.autobinner.pmml.PMMLDiscretizePreprocPortObject)

Example 3 with AutoBinnerApply

use of org.knime.base.node.preproc.autobinner.apply.AutoBinnerApply in project knime-core by knime.

the class AutoBinner method init.

/**
 * Initialize instance and check if settings are consistent.
 */
private void init(final DataTableSpec inSpec) throws InvalidSettingsException {
    PMMLPreprocDiscretize op = createDisretizeOp(null);
    AutoBinnerApply applier = new AutoBinnerApply();
    m_tableOutSpec = applier.getOutputSpec(op, inSpec);
    m_pmmlOutSpec = new PMMLDiscretizePreprocPortObjectSpec(op);
}
Also used : PMMLDiscretizePreprocPortObjectSpec(org.knime.base.node.preproc.autobinner.pmml.PMMLDiscretizePreprocPortObjectSpec) AutoBinnerApply(org.knime.base.node.preproc.autobinner.apply.AutoBinnerApply) PMMLPreprocDiscretize(org.knime.base.node.preproc.autobinner.pmml.PMMLPreprocDiscretize)

Example 4 with AutoBinnerApply

use of org.knime.base.node.preproc.autobinner.apply.AutoBinnerApply in project knime-core by knime.

the class AutoBinner method init.

/**
 * Initialize instance and check if settings are consistent.
 */
private void init(final DataTableSpec inSpec) throws InvalidSettingsException {
    PMMLPreprocDiscretize op = createDisretizeOp(null);
    AutoBinnerApply applier = new AutoBinnerApply();
    m_tableOutSpec = applier.getOutputSpec(op, inSpec);
    m_pmmlOutSpec = new PMMLDiscretizePreprocPortObjectSpec(op);
}
Also used : PMMLDiscretizePreprocPortObjectSpec(org.knime.base.node.preproc.autobinner.pmml.PMMLDiscretizePreprocPortObjectSpec) AutoBinnerApply(org.knime.base.node.preproc.autobinner.apply.AutoBinnerApply) PMMLPreprocDiscretize(org.knime.base.node.preproc.autobinner.pmml.PMMLPreprocDiscretize)

Example 5 with AutoBinnerApply

use of org.knime.base.node.preproc.autobinner.apply.AutoBinnerApply in project knime-core by knime.

the class AutoBinner method init.

/**
 * Initialize instance and check if settings are consistent.
 */
private void init(final DataTableSpec inSpec) throws InvalidSettingsException {
    PMMLPreprocDiscretize op = createDisretizeOp(null);
    AutoBinnerApply applier = new AutoBinnerApply();
    m_tableOutSpec = applier.getOutputSpec(op, inSpec);
    m_pmmlOutSpec = new PMMLDiscretizePreprocPortObjectSpec(op);
}
Also used : PMMLDiscretizePreprocPortObjectSpec(org.knime.base.node.preproc.autobinner.pmml.PMMLDiscretizePreprocPortObjectSpec) AutoBinnerApply(org.knime.base.node.preproc.autobinner.apply.AutoBinnerApply) PMMLPreprocDiscretize(org.knime.base.node.preproc.autobinner.pmml.PMMLPreprocDiscretize)

Aggregations

AutoBinnerApply (org.knime.base.node.preproc.autobinner.apply.AutoBinnerApply)6 PMMLPreprocDiscretize (org.knime.base.node.preproc.autobinner.pmml.PMMLPreprocDiscretize)6 PMMLDiscretizePreprocPortObject (org.knime.base.node.preproc.autobinner.pmml.PMMLDiscretizePreprocPortObject)3 PMMLDiscretizePreprocPortObjectSpec (org.knime.base.node.preproc.autobinner.pmml.PMMLDiscretizePreprocPortObjectSpec)3 BufferedDataTable (org.knime.core.node.BufferedDataTable)3 PortObject (org.knime.core.node.port.PortObject)3 PMMLPreprocPortObject (org.knime.core.node.port.pmml.preproc.PMMLPreprocPortObject)3