All Downloads are FREE. Search and download functionalities are using the official Maven repository.

hex.genmodel.algos.gam.GamRowToRawDataConverter Maven / Gradle / Ivy

There is a newer version: 3.46.0.5
Show newest version
package hex.genmodel.algos.gam;

import hex.genmodel.GenModel;
import hex.genmodel.easy.CategoricalEncoder;
import hex.genmodel.easy.EasyPredictModelWrapper;
import hex.genmodel.easy.RowData;
import hex.genmodel.easy.RowToRawDataConverter;
import hex.genmodel.easy.exception.PredictException;

import java.util.Map;

public class GamRowToRawDataConverter extends RowToRawDataConverter {
  GamMojoModelBase _m;
  public GamRowToRawDataConverter(GenModel m, Map modelColumnNameToIndexMap, Map domainMap, EasyPredictModelWrapper.ErrorConsumer errorConsumer, EasyPredictModelWrapper.Config config) {
    super(m, modelColumnNameToIndexMap, domainMap, errorConsumer, config);
    _m = (GamMojoModelBase) m;
  }

  @Override
  public double[] convert(RowData data, double[] rawData) throws PredictException {
    rawData = super.convert(data, rawData);
    return _m.addExpandGamCols(rawData, data);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy