use of org.knime.base.node.mine.treeensemble2.data.TreeAttributeColumnMetaData in project knime-core by knime.
the class AbstractGradientBoostingLearner method createPredictorRecord.
/**
* Creates a PredictorRecord from the inMemory TreeData object
*
* @param data
* @param indexManager
* @param rowIdx
* @return a PredictorRecord for the row at <b>rowIdx</b> in <b>data</b>
*/
public static PredictorRecord createPredictorRecord(final TreeData data, final IDataIndexManager indexManager, final int rowIdx) {
Map<String, Object> valMap = new HashMap<String, Object>();
for (TreeAttributeColumnData column : data.getColumns()) {
TreeAttributeColumnMetaData meta = column.getMetaData();
valMap.put(meta.getAttributeName(), handleMissingValues(column.getValueAt(indexManager.getPositionsInColumn(meta.getAttributeIndex())[rowIdx]), column));
}
return new PredictorRecord(valMap);
}
Aggregations