| Modifier and Type | Class and Description |
|---|---|
static class |
DeepLearningModel.DeepLearningModelInfo |
static class |
DeepLearningModel.Errors |
| Modifier and Type | Field and Description |
|---|---|
static DocGen.FieldDoc[] |
DOC_FIELDS |
double |
epoch_counter |
Key |
jobKey |
long |
training_rows |
_dataKey, _domains, _modelClassDist, _names, _priorClassDist| Constructor and Description |
|---|
DeepLearningModel(DeepLearningModel cp,
Key selfKey,
Key jobKey) |
DeepLearningModel(Key selfKey,
Key jobKey,
Key dataKey,
FrameTask.DataInfo dinfo,
DeepLearning params,
float[] priorDist) |
| Modifier and Type | Method and Description |
|---|---|
double |
calcError(Frame ftest,
Frame fpreds,
java.lang.String label,
boolean printCM,
ConfusionMatrix cm,
AUC auc)
Compute the model error for a given test data set
For multi-class classification, this is the classification error based on assigning labels for the highest predicted per-class probability.
|
ConfusionMatrix |
cm()
for grid search error reporting
|
void |
delete() |
boolean |
generateHTML(java.lang.String title,
java.lang.StringBuilder sb) |
DeepLearningModel.Errors |
last_scored() |
DeepLearningModel.DeepLearningModelInfo |
model_info() |
double |
mse()
Returns mse for validation set.
|
float[] |
score0(double[] data,
float[] preds)
Predict from raw double values representing
|
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() |
adapt, classNames, delete_impl, errStr, getDomainMapping, getDomainMapping, isClassifier, nclasses, responseName, score, score, score, score, score, score, score0, setModelClassDistribution, testJavaScoring, toJava, toJavaDefaultMaxIters, toJavaInit, toJavaInit, toJavaPredictBody, toJavaSuper, varimpdelete_and_lock, delete, delete, delete, read_lock, read_lock, unlock, update, write_lockclone, frozenType, init, newInstance, read, toDocField, write, writeJSON, writeJSONFieldspublic static DocGen.FieldDoc[] DOC_FIELDS
public Key jobKey
public double epoch_counter
public long training_rows
public DeepLearningModel(DeepLearningModel cp, Key selfKey, Key jobKey)
public DeepLearningModel(Key selfKey, Key jobKey, Key dataKey, FrameTask.DataInfo dinfo, DeepLearning params, float[] priorDist)
public final DeepLearningModel.DeepLearningModelInfo model_info()
public DeepLearningModel.Errors last_scored()
public ConfusionMatrix cm()
public double mse()
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 double calcError(Frame ftest, Frame fpreds, java.lang.String label, boolean printCM, ConfusionMatrix cm, AUC auc)
ftest - Frame containing test datafpreds - Frame containing predicted data (classification: label + per-class probabilities, regression: target)label - Name for the scored data setprintCM - Whether to print the confusion matrix to stdoutcm - Confusion Matrix object to populate for multi-class classification (also used for regression)auc - AUC object to populate for binary classificationpublic 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 row, double data[] );
// Does the mapping lookup for every row, no allocation
float[] predict( HashMap row, double data[], float preds[] );
// Allocates a double[] for every row
float[] predict( HashMap row, float preds[] );
// Allocates a double[] and a float[] for every row
float[] predict( HashMap row );
}