hex.genmodel.algos.deepwater.DWTextConverter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of h2o-genmodel-ext-deepwater Show documentation
Show all versions of h2o-genmodel-ext-deepwater Show documentation
H2O GenModel Deepwater Extension
package hex.genmodel.algos.deepwater;
import hex.genmodel.GenModel;
import hex.genmodel.easy.CategoricalEncoder;
import hex.genmodel.easy.EasyPredictModelWrapper;
import hex.genmodel.easy.RowToRawDataConverter;
import hex.genmodel.easy.exception.PredictException;
import java.util.Map;
public class DWTextConverter extends RowToRawDataConverter {
DWTextConverter(GenModel m, Map modelColumnNameToIndexMap, Map domainMap,
EasyPredictModelWrapper.ErrorConsumer errorConsumer, EasyPredictModelWrapper.Config config) {
super(m, modelColumnNameToIndexMap, domainMap, errorConsumer, config);
}
@Override
protected boolean convertValue(String columnName, Object o, CategoricalEncoder catEncoder, int targetIndex, double[] rawData) throws PredictException {
if (o instanceof String) {
throw new PredictException("MOJO scoring for text classification is not yet implemented.");
}
return super.convertValue(columnName, o, catEncoder, targetIndex, rawData);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy