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 |
|---|---|
static DocGen.FieldDoc[] |
DOC_FIELDS |
double |
epoch_counter |
long |
training_rows |
_dataKey, _domains, _have_cv_results, _modelClassDist, _names, _priorClassDist, training_duration_in_ms, training_start_time| 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 |
|---|---|
ConfusionMatrix |
cm()
for grid search error reporting
|
int |
compareTo(DeepLearningModel o) |
float |
error() |
boolean |
generateHTML(java.lang.String title,
java.lang.StringBuilder sb) |
DeepLearning |
get_params() |
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.
|
float[] |
score0(double[] data,
float[] preds)
Predict from raw double values representing
|
DeepLearningModel.Errors[] |
scoring_history() |
protected void |
setCrossValidationError(Job.ValidatedJob job,
double cv_error,
ConfusionMatrix cm,
AUC auc,
HitRatio hr) |
java.lang.String |
toJava()
Return a String which is a valid Java program representing a class that
implements the Model.
|
boolean |
toJavaHtml(java.lang.StringBuilder sb) |
java.lang.String |
toString() |
java.lang.String |
toStringAll() |
VarImp |
varimp()
Variable importance of individual input features measured by this model.
|
adapt, calcError, classNames, delete_impl, errStr, getDomainMapping, getDomainMapping, getModelCategory, getModelSerializer, getUniqueId, isClassifier, nclasses, nfeatures, printCrossValidationModelsHTML, responseName, score, score, score, score, score, score, score0, scoreCrossValidation, setModelClassDistribution, start_training, start_training, stop_training, testJavaScoring, toJava, toJavaDefaultMaxIters, toJavaInit, toJavaInit, toJavaPredictBody, toJavaSuperdelete_and_lock, delete, delete, delete, delete, is_unlocked, is_wlocked, read_lock, read_lock, unlock_all, unlock, update, write_lockclone, frozenType, init, newInstance, read, toDocField, write, writeJSON, writeJSONFieldspublic static DocGen.FieldDoc[] DOC_FIELDS
@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
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 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, AUC auc, HitRatio hr)
setCrossValidationError in class Modelpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toStringAll()
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 boolean generateHTML(java.lang.String title,
java.lang.StringBuilder sb)
public boolean toJavaHtml(java.lang.StringBuilder sb)
public java.lang.String toJava()
Model
class UUIDxxxxModel {
public static final String NAMES[] = { ....column names... }
public static final String DOMAINS[][] = { ....domain names... }
// Pass in data in a double[], pre-aligned to the Model's requirements.
// Jam predictions into the preds[] array; preds[0] is reserved for the
// main prediction (class for classifiers or value for regression),
// and remaining columns hold a probability distribution for classifiers.
float[] predict( double data[], float preds[] );
double[] map( HashMap < String,Double > row, double data[] );
// Does the mapping lookup for every row, no allocation
float[] predict( HashMap < String,Double > row, double data[], float preds[] );
// Allocates a double[] for every row
float[] predict( HashMap < String,Double > row, float preds[] );
// Allocates a double[] and a float[] for every row
float[] predict( HashMap < String,Double > row );
}