public class DeepLearningModel extends hex.Model<DeepLearningModel,DeepLearningParameters,DeepLearningModel.DeepLearningModelOutput> implements hex.Model.DeepFeatures
| Modifier and Type | Class and Description |
|---|---|
static class |
DeepLearningModel.DeepLearningModelOutput
The Deep Learning model output contains a few extra fields in addition to the metrics in Model.Output
1) Scoring history (raw data)
2) weights/biases (raw data)
3) variable importances (TwoDimTable)
|
static class |
DeepLearningModel.DeepLearningScoring |
| Modifier and Type | Field and Description |
|---|---|
long |
_timeLastScoreEnter |
water.Key |
actual_best_model_key |
long |
actual_train_samples_per_iteration |
double |
epoch_counter |
water.Key |
model_info_key |
long |
run_time |
boolean |
stopped_early |
double |
time_for_communication_us |
long |
training_rows |
long |
tspiGuess |
long |
validation_rows |
| Constructor and Description |
|---|
DeepLearningModel(water.Key destKey,
DeepLearningParameters parms,
DeepLearningModel.DeepLearningModelOutput output,
water.fvec.Frame train,
water.fvec.Frame valid,
int nClasses)
Regular constructor (from scratch)
|
DeepLearningModel(water.Key destKey,
DeepLearningParameters parms,
DeepLearningModel cp,
boolean store_best_model,
DataInfo dataInfo)
Constructor to restart from a checkpointed model
|
| Modifier and Type | Method and Description |
|---|---|
double |
calcOutlierThreshold(water.fvec.Vec mse,
double quantile)
Compute quantile-based threshold (in reconstruction error) to find outliers
|
protected long |
checksum_impl() |
double |
classification_error() |
int |
compareTo(DeepLearningModel o) |
void |
delete() |
double |
deviance() |
double |
deviance(double w,
double y,
double f) |
float |
error() |
DeepLearningParameters |
get_params()
Get the parameters actually used for model building, not the user-given ones (_parms)
They might differ since some defaults are filled in, and some invalid combinations are auto-disabled in modifyParams
|
double |
logloss() |
double |
loss(DataInfo.Row[] myRows)
Compute the loss function
|
hex.ModelMetrics.MetricBuilder |
makeMetricBuilder(java.lang.String[] domain) |
DeepLearningModelInfo |
model_info() |
double |
mse() |
protected water.fvec.Frame |
predictScoreImpl(water.fvec.Frame orig,
water.fvec.Frame adaptedFr,
java.lang.String destination_key)
Make either a prediction or a reconstruction.
|
water.api.ModelSchema |
schema() |
protected double[] |
score0(double[] data,
double[] preds) |
double[] |
score0(double[] data,
double[] preds,
double weight,
double offset)
Predict from raw double values representing the data
|
water.fvec.Frame |
scoreAutoEncoder(water.fvec.Frame frame,
water.Key destination_key)
Score auto-encoded reconstruction (on-the-fly, without allocating the reconstruction as done in Frame score(Frame fr))
|
water.fvec.Frame |
scoreDeepFeatures(water.fvec.Frame frame,
int layer)
Score auto-encoded reconstruction (on-the-fly, and materialize the deep features of given layer
|
DeepLearningModel.DeepLearningScoring[] |
scoring_history() |
protected boolean |
toJavaCheckTooBig() |
protected water.util.SB |
toJavaInit(water.util.SB sb,
water.util.SB fileContextSB) |
protected void |
toJavaPredictBody(water.util.SB bodySb,
water.util.SB classCtxSb,
water.util.SB fileCtxSb) |
hex.VarImp |
varImp() |
adaptTestForTrain, adaptTestForTrain, addMetrics, addWarning, cleanup_adapt, defaultThreshold, getPublishedKeys, isSupervised, remove_impl, score, score, score, score0, score0, scoreMetrics, testJavaScoring, toJava, toJava, toJavaNCLASSES, toJavaPROB, toJavaSuper, toStringdelete_and_lock, delete, delete, read_lock, read_lock, unlock_all, unlock, update, write_lockchecksum, getBinarySerializer, remove, remove, remove, removepublic long run_time
public long actual_train_samples_per_iteration
public long tspiGuess
public double time_for_communication_us
public double epoch_counter
public boolean stopped_early
public long training_rows
public long validation_rows
public water.Key actual_best_model_key
public water.Key model_info_key
public long _timeLastScoreEnter
public DeepLearningModel(water.Key destKey,
DeepLearningParameters parms,
DeepLearningModel cp,
boolean store_best_model,
DataInfo dataInfo)
destKey - New destination key for the modelparms - User-given parameters for checkpoint restartcp - Checkpoint to restart fromstore_best_model - Store only the best model instead of the latest onepublic DeepLearningModel(water.Key destKey,
DeepLearningParameters parms,
DeepLearningModel.DeepLearningModelOutput output,
water.fvec.Frame train,
water.fvec.Frame valid,
int nClasses)
destKey - parms - output - train - valid - nClasses - public double deviance(double w,
double y,
double f)
deviance in class hex.Model<DeepLearningModel,DeepLearningParameters,DeepLearningModel.DeepLearningModelOutput>public water.api.ModelSchema schema()
public final DeepLearningModelInfo model_info()
public final hex.VarImp varImp()
public DeepLearningModel.DeepLearningScoring[] scoring_history()
public final DeepLearningParameters get_params()
public float error()
public hex.ModelMetrics.MetricBuilder makeMetricBuilder(java.lang.String[] domain)
makeMetricBuilder in class hex.Model<DeepLearningModel,DeepLearningParameters,DeepLearningModel.DeepLearningModelOutput>public int compareTo(DeepLearningModel o)
public double classification_error()
public double mse()
public double deviance()
public double logloss()
protected water.fvec.Frame predictScoreImpl(water.fvec.Frame orig,
water.fvec.Frame adaptedFr,
java.lang.String destination_key)
predictScoreImpl in class hex.Model<DeepLearningModel,DeepLearningParameters,DeepLearningModel.DeepLearningModelOutput>orig - Test datasetadaptedFr - Test dataset, adapted to the modelprotected double[] score0(double[] data,
double[] preds)
score0 in class hex.Model<DeepLearningModel,DeepLearningParameters,DeepLearningModel.DeepLearningModelOutput>public double loss(DataInfo.Row[] myRows)
myRows - Mini-Batch Array of denseRow's containing numerical/categorical predictor and response data (standardized)public double[] score0(double[] data,
double[] preds,
double weight,
double offset)
score0 in class hex.Model<DeepLearningModel,DeepLearningParameters,DeepLearningModel.DeepLearningModelOutput>data - 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 water.fvec.Frame scoreAutoEncoder(water.fvec.Frame frame,
water.Key destination_key)
scoreAutoEncoder in interface hex.Model.DeepFeaturesframe - Original data (can contain response, will be ignored)public water.fvec.Frame scoreDeepFeatures(water.fvec.Frame frame,
int layer)
scoreDeepFeatures in interface hex.Model.DeepFeaturesframe - Original data (can contain response, will be ignored)layer - index of the hidden layer for which to extract the featurespublic double calcOutlierThreshold(water.fvec.Vec mse,
double quantile)
mse - Vector containing reconstruction errorsquantile - Quantile for cut-offpublic void delete()
delete in class hex.Model<DeepLearningModel,DeepLearningParameters,DeepLearningModel.DeepLearningModelOutput>protected water.util.SB toJavaInit(water.util.SB sb,
water.util.SB fileContextSB)
toJavaInit in class hex.Model<DeepLearningModel,DeepLearningParameters,DeepLearningModel.DeepLearningModelOutput>protected boolean toJavaCheckTooBig()
toJavaCheckTooBig in class hex.Model<DeepLearningModel,DeepLearningParameters,DeepLearningModel.DeepLearningModelOutput>protected void toJavaPredictBody(water.util.SB bodySb,
water.util.SB classCtxSb,
water.util.SB fileCtxSb)
toJavaPredictBody in class hex.Model<DeepLearningModel,DeepLearningParameters,DeepLearningModel.DeepLearningModelOutput>protected long checksum_impl()
checksum_impl in class hex.Model<DeepLearningModel,DeepLearningParameters,DeepLearningModel.DeepLearningModelOutput>