public abstract class SupervisedModel<M extends Model<M,P,O>,P extends Model.Parameters<M,P,O>,O extends Model.Output<M,P,O>> extends Model<M,P,O>
Model.ModelCategory, Model.Output<M extends Model<M,P,O>,P extends Model.Parameters<M,P,O>,O extends Model.Output<M,P,O>>, Model.Parameters<M extends Model<M,P,O>,P extends Model.Parameters<M,P,O>,O extends Model.Output<M,P,O>>| Modifier and Type | Field and Description |
|---|---|
protected float[] |
_modelClassDist |
protected float[] |
_priorClassDist |
| Constructor and Description |
|---|
SupervisedModel(Key selfKey,
Frame fr,
P parms,
O output,
float[] priorClassDist) |
SupervisedModel(Key selfKey,
java.lang.String[] names,
java.lang.String[][] domains,
P parms,
O output,
float[] priorClassDist) |
| 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.
|
protected float[] |
score0(Chunk[] chks,
int row_in_chunk,
double[] tmp,
float[] preds)
Bulk scoring API for one row.
|
void |
setModelClassDistribution(float[] classdist) |
adapt, getDomainMapping, getDomainMapping, schema, score, score, score, score, score, score, score0delete_and_lock, delete, delete, delete, errStr, read_lock, read_lock, unlock_all, unlock, update, write_lockclone, frozenType, read_impl, read, readJSON_impl, readJSON, write_impl, write, writeHTML_impl, writeHTML, writeJSON_impl, writeJSONprotected float[] _priorClassDist
protected float[] _modelClassDist
public SupervisedModel(Key selfKey, Frame fr, P parms, O output, float[] priorClassDist)
public void setModelClassDistribution(float[] classdist)
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)