public class DeepLearningModel extends Model implements java.lang.Comparable<DeepLearningModel>
| Modifier and Type | Class and Description |
|---|---|
static class |
DeepLearningModel.DeepLearningModelInfo |
static class |
DeepLearningModel.Errors |
Model.ModelAutobufferSerializer, Model.ModelCategory| Modifier and Type | Field and Description |
|---|---|
long |
_timeLastScoreEnter |
Key |
actual_best_model_key |
long |
actual_train_samples_per_iteration |
static DocGen.FieldDoc[] |
DOC_FIELDS |
double |
epoch_counter |
double |
time_for_communication_us |
long |
training_rows |
long |
validation_rows |
_dataKey, _domains, _have_cv_results, _modelClassDist, _names, _priorClassDist, GEN_BENCHMARK_CODE, training_duration_in_ms, training_start_time, warnings| Constructor and Description |
|---|
DeepLearningModel(DeepLearningModel cp,
Key destKey,
Key jobKey,
FrameTask.DataInfo dataInfo)
Constructor to restart from a checkpointed model
|
DeepLearningModel(Key destKey,
Key jobKey,
Key dataKey,
FrameTask.DataInfo dinfo,
DeepLearning params,
float[] priorDist) |
| Modifier and Type | Method and Description |
|---|---|
double |
calcOutlierThreshold(Vec mse,
double quantile)
Compute quantile-based threshold (in reconstruction error) to find outliers
|
ConfusionMatrix |
cm()
for grid search error reporting
|
int |
compareTo(DeepLearningModel o) |
void |
delete_best_model() |
void |
delete_xval_models() |
float |
error() |
boolean |
generateHTML(java.lang.String title,
java.lang.StringBuilder sb) |
DeepLearning |
get_params() |
boolean |
isClassifier() |
Request2 |
job() |
protected double |
missingColumnsType()
Type of missing columns during adaptation between train/test datasets
Overload this method for models that have sparse data handling.
|
DeepLearningModel.DeepLearningModelInfo |
model_info() |
double |
mse()
Returns mse for validation set.
|
int |
nfeatures()
Returns number of input features
|
Frame |
score(Frame frame)
This is an overridden version of Model.score().
|
float[] |
score0(double[] data,
float[] preds)
Predict from raw double values representing the data
|
Frame |
scoreAutoEncoder(Frame frame)
Score auto-encoded reconstruction (on-the-fly, without allocating the reconstruction as done in Frame score(Frame fr))
|
Frame |
scoreDeepFeatures(Frame frame,
int layer)
Score auto-encoded reconstruction (on-the-fly, without allocating the reconstruction as done in Frame score(Frame fr))
|
DeepLearningModel.Errors[] |
scoring_history() |
protected void |
setCrossValidationError(Job.ValidatedJob job,
double cv_error,
ConfusionMatrix cm,
AUCData auc,
HitRatio hr) |
void |
toJavaHtml(java.lang.StringBuilder sb) |
protected SB |
toJavaInit(SB sb,
SB fileContextSB) |
protected void |
toJavaPredictBody(SB bodySb,
SB classCtxSb,
SB fileCtxSb) |
java.lang.String |
toString() |
java.lang.String |
toStringAll() |
VarImp |
varimp()
Variable importance of individual input features measured by this model.
|
adapt, adapt, addWarning, calcError, classNames, delete_impl, errStr, getDomainMapping, getDomainMapping, getModelCategory, getModelSerializer, getUniqueId, isSupervised, nclasses, printCrossValidationModelsHTML, responseName, score, score, score, score, score, score0, scoreCrossValidation, scoreImpl, setModelClassDistribution, start_training, start_training, stop_training, testJavaScoring, toJava, toJava, toJavaDefaultMaxIters, toJavaFillPreds0, toJavaInit, toJavaSuper, toJavaUnifyPredsdelete_and_lock, delete, delete, delete, delete, is_unlocked, is_wlocked, read_lock, read_lock, unlock_all, unlock_lockable, unlock, update, write_lockclone, frozenType, init, newInstance, read, toDocField, write, writeJSON, writeJSONFieldspublic static DocGen.FieldDoc[] DOC_FIELDS
public long actual_train_samples_per_iteration
public double time_for_communication_us
@Request.API(help="Number of training epochs", json=true) public double epoch_counter
@Request.API(help="Number of rows in training data", json=true) public long training_rows
@Request.API(help="Number of rows in validation data", json=true) public long validation_rows
@Request.API(help="Key to the best model so far (based on overall error on scoring data set)") public Key actual_best_model_key
public long _timeLastScoreEnter
public DeepLearningModel(DeepLearningModel cp, Key destKey, Key jobKey, FrameTask.DataInfo dataInfo)
cp - Checkpoint to restart fromdestKey - New destination key for the modeljobKey - New job key (job which updates the model)public DeepLearningModel(Key destKey, Key jobKey, Key dataKey, FrameTask.DataInfo dinfo, DeepLearning params, float[] priorDist)
public final DeepLearningModel.DeepLearningModelInfo model_info()
public DeepLearningModel.Errors[] scoring_history()
public final DeepLearning get_params()
get_params in class Modelprotected double missingColumnsType()
ModelmissingColumnsType in class Modelpublic float error()
public boolean isClassifier()
isClassifier in class Modelpublic int nfeatures()
Modelpublic int compareTo(DeepLearningModel o)
compareTo in interface java.lang.Comparable<DeepLearningModel>public ConfusionMatrix cm()
public double mse()
Modelpublic VarImp varimp()
Modelprotected void setCrossValidationError(Job.ValidatedJob job, double cv_error, ConfusionMatrix cm, AUCData auc, HitRatio hr)
setCrossValidationError in class Modelpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toStringAll()
public Frame score(Frame frame)
score in class Modelframe - Test datasetModel.score(Frame, boolean)public float[] score0(double[] data,
float[] preds)
score0 in class Modeldata - raw array containing categorical values (horizontalized to 1,0,0,1,0,0 etc.) and numerical values (0.35,1.24,5.3234,etc), both can contain NaNspreds - predicted label and per-class probabilities (for classification), predicted target (regression), can contain NaNspublic Frame scoreAutoEncoder(Frame frame)
frame - Original data (can contain response, will be ignored)public Frame scoreDeepFeatures(Frame frame, int layer)
frame - Original data (can contain response, will be ignored)public double calcOutlierThreshold(Vec mse, double quantile)
mse - Vector containing reconstruction errorsquantile - Quantile for cut-offpublic boolean generateHTML(java.lang.String title,
java.lang.StringBuilder sb)
public void toJavaHtml(java.lang.StringBuilder sb)
protected SB toJavaInit(SB sb, SB fileContextSB)
toJavaInit in class Modelprotected void toJavaPredictBody(SB bodySb, SB classCtxSb, SB fileCtxSb)
toJavaPredictBody in class Modelpublic void delete_best_model()
public void delete_xval_models()