public class RowToRawDataConverter
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
RowToRawDataConverter(GenModel m,
java.util.Map<java.lang.String,java.lang.Integer> modelColumnNameToIndexMap,
java.util.Map<java.lang.Integer,CategoricalEncoder> domainMap,
EasyPredictModelWrapper.ErrorConsumer errorConsumer,
EasyPredictModelWrapper.Config config) |
Modifier and Type | Method and Description |
---|---|
double[] |
convert(RowData data,
double[] rawData) |
protected boolean |
convertValue(java.lang.String columnName,
java.lang.Object o,
CategoricalEncoder catEncoder,
int targetIndex,
double[] rawData) |
public RowToRawDataConverter(GenModel m, java.util.Map<java.lang.String,java.lang.Integer> modelColumnNameToIndexMap, java.util.Map<java.lang.Integer,CategoricalEncoder> domainMap, EasyPredictModelWrapper.ErrorConsumer errorConsumer, EasyPredictModelWrapper.Config config)
public double[] convert(RowData data, double[] rawData) throws PredictException
data
- instance of RowData we want to get prediction forrawData
- array that will be filled up from RowData instance and returnedPredictException
- Note: name of the exception feels like out of scope of the class with name `RowToRawDataConverter`
but this conversion is only needed to make it possible to produce predictions so it makes senseprotected boolean convertValue(java.lang.String columnName, java.lang.Object o, CategoricalEncoder catEncoder, int targetIndex, double[] rawData) throws PredictException
PredictException