public abstract class MojoModel extends GenModel
| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
_algoName |
boolean |
_balanceClasses |
ModelCategory |
_category |
double |
_defaultThreshold |
java.lang.String |
_h2oVersion |
ModelAttributes |
_modelAttributes |
double[] |
_modelClassDistrib |
ModelDescriptor |
_modelDescriptor |
double |
_mojo_version |
int |
_nclasses |
int |
_nfeatures |
double[] |
_priorClassDistrib |
Table[] |
_reproducibilityInformation |
boolean |
_supervised |
java.lang.String |
_uuid |
_domains, _names, _offsetColumn, _responseColumn, _treatmentColumn| Modifier | Constructor and Description |
|---|---|
protected |
MojoModel(java.lang.String[] columns,
java.lang.String[][] domains,
java.lang.String responseColumn) |
protected |
MojoModel(java.lang.String[] columns,
java.lang.String[][] domains,
java.lang.String responseColumn,
java.lang.String treatmentColumn) |
| Modifier and Type | Method and Description |
|---|---|
ModelCategory |
getModelCategory()
Returns this model category.
|
java.lang.String |
getUUID()
Returns model's unique identifier.
|
boolean |
isSupervised()
Returns true for supervised models.
|
static MojoModel |
load(MojoReaderBackend mojoReader)
Advanced way of constructing Mojo models by supplying a custom mojoReader.
|
static MojoModel |
load(java.lang.String file)
Primary factory method for constructing MojoModel instances.
|
static MojoModel |
load(java.lang.String file,
boolean readMetadata)
Primary factory method for constructing MojoModel instances.
|
int |
nclasses()
Returns number of output classes for classifiers, 1 for regression models, and 0 for unsupervised models.
|
int |
nfeatures()
Returns number of input features.
|
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, 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, score0, setCats, setCats, setInput, setInputpublic java.lang.String _algoName
public java.lang.String _h2oVersion
public ModelCategory _category
public java.lang.String _uuid
public boolean _supervised
public int _nfeatures
public int _nclasses
public boolean _balanceClasses
public double _defaultThreshold
public double[] _priorClassDistrib
public double[] _modelClassDistrib
public double _mojo_version
public ModelDescriptor _modelDescriptor
public ModelAttributes _modelAttributes
public Table[] _reproducibilityInformation
protected MojoModel(java.lang.String[] columns,
java.lang.String[][] domains,
java.lang.String responseColumn)
protected MojoModel(java.lang.String[] columns,
java.lang.String[][] domains,
java.lang.String responseColumn,
java.lang.String treatmentColumn)
public static MojoModel load(java.lang.String file) throws java.io.IOException
file - Name of the zip file (or folder) with the model's data. This should be the data retrieved via
the `GET /3/Models/{model_id}/mojo` endpoint.java.io.IOException - if `file` does not exist, or cannot be read, or does not represent a valid model.public static MojoModel load(java.lang.String file, boolean readMetadata) throws java.io.IOException
file - Name of the zip file (or folder) with the model's data. This should be the data retrieved via
the `GET /3/Models/{model_id}/mojo` endpoint.readMetadata - read additional model metadata (metrics...) if enabled, otherwise skip metadata parsingjava.io.IOException - if `file` does not exist, or cannot be read, or does not represent a valid model.public static MojoModel load(MojoReaderBackend mojoReader) throws java.io.IOException
mojoReader - a class that implements the MojoReaderBackend interface.java.io.IOException - if the mojoReader doespublic boolean isSupervised()
GenModelisSupervised in interface IGenModelisSupervised in class GenModelpublic int nfeatures()
GenModelpublic int nclasses()
GenModelpublic ModelCategory getModelCategory()
GenModelgetModelCategory in interface IGenModelgetModelCategory in class GenModelModelCategorypublic java.lang.String getUUID()
IGeneratedModelgetUUID in interface IGeneratedModelgetUUID in class GenModel