public abstract class SupervisedModel<M extends Model<M,P,O>,P extends SupervisedModel.SupervisedParameters,O extends SupervisedModel.SupervisedOutput> extends Model<M,P,O>
| Modifier and Type | Class and Description |
|---|---|
static class |
SupervisedModel.SupervisedOutput
Output from all Supervised Models, includes class distribtion
|
static class |
SupervisedModel.SupervisedParameters
Supervised Model Parameters includes a response column, and whether or
not rebalancing classes is desirable.
|
Model.ModelCategory, Model.Output, Model.Parameters_output, _parms, _warnings, training_duration_in_ms, training_start_time| Constructor and Description |
|---|
SupervisedModel(Key selfKey,
P parms,
O output) |
| Modifier and Type | Method and Description |
|---|---|
double |
calcError(Frame ftest,
Vec vactual,
Frame fpreds,
Frame hitratio_fpreds,
java.lang.String label,
boolean printMe,
int max_conf_mat_size,
ConfusionMatrix cm,
AUC auc,
HitRatio hr)
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.
|
boolean |
isSupervised()
Needs to be set correctly otherwise eg scoring does not work.
|
protected float[] |
score0(Chunk[] chks,
int row_in_chunk,
double[] tmp,
float[] preds)
Bulk scoring API for one row.
|
adapt, adapt, adapt, addWarning, checksum, computeModelMetrics, getDomainMapping, getDomainMapping, missingColumnsType, remove_impl, schema, score, score, score, score, score, score, score0, start_training, start_training, stop_trainingdelete_and_lock, delete, delete, delete, read_lock, read_lock, unlock_all, unlock, update, write_lockclone, frozenType, read_impl, read, readExternal, readJSON_impl, readJSON, write_impl, write, writeExternal, writeHTML_impl, writeHTML, writeJSON_impl, writeJSONpublic boolean isSupervised()
ModelisSupervised in class Model<M extends Model<M,P,O>,P extends SupervisedModel.SupervisedParameters,O extends SupervisedModel.SupervisedOutput>public double calcError(Frame ftest, Vec vactual, Frame fpreds, Frame hitratio_fpreds, java.lang.String label, boolean printMe, int max_conf_mat_size, ConfusionMatrix cm, AUC auc, HitRatio hr)
ftest - Frame containing test datavactual - The response column Vecfpreds - Frame containing ADAPTED (domain labels from train+test data) predicted data (classification: label + per-class probabilities, regression: target)hitratio_fpreds - Frame containing predicted data (domain labels from test data) (classification: label + per-class probabilities, regression: target)label - Name for the scored data set to be printedprintMe - Whether to print the scoring results to Log.infomax_conf_mat_size - Largest size of Confusion Matrix (#classes) for it to be printed to Log.infocm - Confusion Matrix object to populate for multi-class classification (also used for regression)auc - AUC object to populate for binary classificationhr - HitRatio object to populate for classificationprotected float[] score0(Chunk[] chks, int row_in_chunk, double[] tmp, float[] preds)