See: Description
Interface | Description |
---|---|
CategoricalEncoder |
Class | Description |
---|---|
BinaryColumnMapper | |
BinaryDomainMapConstructor | |
BinaryEncoder | |
EasyPredictModelWrapper |
An easy-to-use prediction wrapper for generated models.
|
EasyPredictModelWrapper.Config |
Configuration builder for instantiating a Wrapper.
|
EasyPredictModelWrapper.ErrorConsumer |
Observer interface with methods corresponding to errors during the prediction.
|
EigenEncoder | |
EigenEncoderColumnMapper | |
EigenEncoderDomainMapConstructor | |
EnumEncoder | |
EnumEncoderColumnMapper | |
EnumEncoderDomainMapConstructor | |
EnumLimitedEncoder | |
EnumLimitedEncoderColumnMapper | |
EnumLimitedEncoderDomainMapConstructor | |
LabelEncoder | |
LabelEncoderDomainMapConstructor | |
OneHotEncoder | |
OneHotEncoderColumnMapper | |
OneHotEncoderDomainMapConstructor | |
RowData |
Column name to column value mapping for a new row (aka data point, observation, sample) to predict.
|
RowToRawDataConverter |
This class is intended to transform a RowData instance - for which we want to get prediction to - into a raw array
|
// Step 1.
modelClassName = "your_pojo_model_downloaded_from_h2o";
GenModel rawModel;
rawModel = (GenModel) Class.forName(modelClassName).newInstance();
EasyPredictModelWrapper model = new EasyPredictModelWrapper(rawModel);
//
// By default, unknown categorical levels throw PredictUnknownCategoricalLevelException.
// Optionally configure the wrapper to treat unknown categorical levels as N/A instead:
//
// EasyPredictModelWrapper model = new EasyPredictModelWrapper(
// new EasyPredictModelWrapper.Config()
// .setModel(rawModel)
// .setConvertUnknownCategoricalLevelsToNa(true));
// Step 2.
RowData row = new RowData();
row.put(new String("CategoricalColumnName"), new String("LevelName"));
row.put(new String("NumericColumnName1"), new String("42.0"));
row.put(new String("NumericColumnName2"), Double.valueOf(42.0));
// Step 3.
BinomialModelPrediction p = model.predictBinomial(row);