use of org.knime.base.algorithms.outlier.NumericOutliersReviser.SummaryInternals in project knime-core by knime.
the class NumericOutliersApplyNodeModel method createStreamableOperator.
/**
* {@inheritDoc}
*/
@Override
public StreamableOperator createStreamableOperator(final PartitionInfo partitionInfo, final PortObjectSpec[] inSpecs) throws InvalidSettingsException {
return new StreamableOperator() {
SummaryInternals m_summaryInternals;
@Override
public void runFinal(final PortInput[] inputs, final PortOutput[] outputs, final ExecutionContext exec) throws Exception {
final NumericOutlierPortObject outlierPort = (NumericOutlierPortObject) ((PortObjectInput) inputs[0]).getPortObject();
NumericOutliersReviser outlierReviser = outlierPort.getOutRevBuilder().build();
outlierReviser.treatOutliers(exec, (RowInput) inputs[1], (RowOutput) outputs[0], outlierPort.getOutlierModel(((RowInput) inputs[1]).getDataTableSpec()));
m_summaryInternals = outlierReviser.getSummaryInternals();
}
/**
* {@inheritDoc}
*/
@Override
public StreamableOperatorInternals saveInternals() {
return m_summaryInternals;
}
};
}
use of org.knime.base.algorithms.outlier.NumericOutliersReviser.SummaryInternals in project knime-core by knime.
the class NumericOutliersApplyNodeModel method finishStreamableExecution.
/**
* {@inheritDoc}
*/
@Override
public void finishStreamableExecution(final StreamableOperatorInternals internals, final ExecutionContext exec, final PortOutput[] output) throws Exception {
SummaryInternals sumInt = ((NumericOutliersReviser.SummaryInternals) internals);
sumInt.writeTable(exec, (RowOutput) output[1]);
for (final String warning : sumInt.getWarnings()) {
setWarningMessage(warning);
}
}
Aggregations