public abstract class MojoModel extends GenModel
Modifier and Type | Field and Description |
---|---|
boolean |
_balanceClasses |
ModelCategory |
_category |
double |
_defaultThreshold |
double[] |
_modelClassDistrib |
int |
_nclasses |
int |
_nfeatures |
double[] |
_priorClassDistrib |
boolean |
_supervised |
java.lang.String |
_uuid |
_domains, _names, _offsetColumn
Modifier | Constructor and Description |
---|---|
protected |
MojoModel(java.lang.String[] columns,
java.lang.String[][] domains) |
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.
|
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, correctProbabilities, createAuxKey, GBM_rescale, getColIdx, getDomainValues, getDomainValues, getDomainValues, getHeader, getModelCategories, getNames, getNumClasses, getNumCols, getNumResponseClasses, getPrediction, getPredsSize, getPredsSize, getResponseIdx, getResponseName, GLM_identityInv, GLM_inverseInv, GLM_logInv, GLM_logitInv, GLM_tweedieInv, img2pixels, isAutoEncoder, isClassifier, KMeans_closest, KMeans_distance, KMeans_distance, Kmeans_preprocessData, Kmeans_preprocessData, KMeans_simplex, log_rescale, mapEnum, score0, score0, setInput
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
protected MojoModel(java.lang.String[] columns, java.lang.String[][] domains)
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(MojoReaderBackend mojoReader) throws java.io.IOException
mojoReader
- a class that implements the MojoReaderBackend
interface.java.io.IOException
- if the mojoReader doespublic boolean isSupervised()
GenModel
isSupervised
in interface IGenModel
isSupervised
in class GenModel
public int nfeatures()
GenModel
public int nclasses()
GenModel
public ModelCategory getModelCategory()
GenModel
getModelCategory
in interface IGenModel
getModelCategory
in class GenModel
ModelCategory
public java.lang.String getUUID()
IGeneratedModel
getUUID
in interface IGeneratedModel
getUUID
in class GenModel