public class TargetEncoderMojoModel extends MojoModel
Modifier and Type | Field and Description |
---|---|
java.util.Map<java.lang.String,java.lang.Integer> |
_columnNameToIdx |
java.util.List<hex.genmodel.algos.targetencoder.ColumnsToSingleMapping> |
_inencMapping |
double |
_inflectionPoint |
java.util.List<ColumnsMapping> |
_inoutMapping |
double |
_smoothing |
java.util.Map<java.lang.String,java.lang.Boolean> |
_teColumn2HasNAs |
boolean |
_withBlending |
_algoName, _balanceClasses, _category, _defaultThreshold, _h2oVersion, _modelAttributes, _modelClassDistrib, _modelDescriptor, _mojo_version, _nclasses, _nfeatures, _priorClassDistrib, _reproducibilityInformation, _supervised, _uuid
_domains, _foldColumn, _names, _offsetColumn, _responseColumn, _treatmentColumn
Constructor and Description |
---|
TargetEncoderMojoModel(java.lang.String[] columns,
java.lang.String[][] domains,
java.lang.String responseName) |
Modifier and Type | Method and Description |
---|---|
static double |
computeBlendedEncoding(double lambda,
double posteriorMean,
double priorMean) |
static double |
computeLambda(long nrows,
double inflectionPoint,
double smoothing) |
EncodingMap |
getEncodings(java.lang.String column) |
int |
getPredsSize()
Returns the expected size of preds array which is passed to `predict(double[], double[])` function.
|
protected void |
init() |
double[] |
score0(double[] row,
double[] preds)
Subclasses implement the scoring logic.
|
protected void |
setEncodings(EncodingMaps encodingMaps) |
getModelCategory, getUUID, isSupervised, load, load, load, nclasses, nfeatures
bitSetContains, bitSetIsInRange, calibrateClassProbabilities, convertDouble2Float, correctProbabilities, createAuxKey, features, GBM_rescale, getCategoricalEncoding, getColIdx, getDomainValues, getDomainValues, getDomainValues, getHeader, getModelCategories, getNames, getNumClasses, getNumCols, getNumResponseClasses, getOffsetName, getOrigDomainValues, getOrigNames, getOrigNumCols, getOrigProjectionArray, getOutputDomains, getOutputNames, getPrediction, getPredictionBinomial, getPredictionMultinomial, getPredsSize, getResponseIdx, getResponseName, GLM_identityInv, GLM_inverseInv, GLM_logInv, GLM_logitInv, GLM_ologitInv, GLM_tweedieInv, img2pixels, internal_threadSafeInstance, isAutoEncoder, isClassifier, KMeans_closest, KMeans_distance, KMeans_distance, KMeans_distances, Kmeans_preprocessData, Kmeans_preprocessData, KMeans_simplex, log_rescale, mapEnum, nCatFeatures, requiresOffset, score0, setCats, setCats, setInput, setInput
public final java.util.Map<java.lang.String,java.lang.Integer> _columnNameToIdx
public java.util.Map<java.lang.String,java.lang.Boolean> _teColumn2HasNAs
public boolean _withBlending
public double _inflectionPoint
public double _smoothing
public java.util.List<hex.genmodel.algos.targetencoder.ColumnsToSingleMapping> _inencMapping
public java.util.List<ColumnsMapping> _inoutMapping
public TargetEncoderMojoModel(java.lang.String[] columns, java.lang.String[][] domains, java.lang.String responseName)
public static double computeLambda(long nrows, double inflectionPoint, double smoothing)
public static double computeBlendedEncoding(double lambda, double posteriorMean, double priorMean)
protected void init()
protected void setEncodings(EncodingMaps encodingMaps)
public int getPredsSize()
GenModel
getPredsSize
in interface IGeneratedModel
getPredsSize
in class GenModel
public double[] score0(double[] row, double[] preds)
GenModel
public EncodingMap getEncodings(java.lang.String column)