public class ModelMetrics extends Keyed<ModelMetrics>
Modifier and Type | Class and Description |
---|---|
static class |
ModelMetrics.MetricBuilder<T extends ModelMetrics.MetricBuilder<T>>
Class used to compute AUCs, CMs & HRs "on the fly" during other passes
over Big Data.
|
Modifier and Type | Field and Description |
---|---|
java.lang.String |
_description |
double |
_MSE |
long |
_nobs |
long |
_scoring_time |
Constructor and Description |
---|
ModelMetrics(Model model,
Frame frame,
long nobs,
double MSE,
java.lang.String desc) |
Modifier and Type | Method and Description |
---|---|
AUC2 |
auc_obj() |
static Key<ModelMetrics> |
buildKey(Model model,
Frame frame) |
static TwoDimTable |
calcVarImp(double[] rel_imp,
java.lang.String[] coef_names) |
static TwoDimTable |
calcVarImp(double[] rel_imp,
java.lang.String[] coef_names,
java.lang.String table_header,
java.lang.String[] col_headers) |
static TwoDimTable |
calcVarImp(float[] rel_imp,
java.lang.String[] coef_names) |
static TwoDimTable |
calcVarImp(VarImp vi) |
protected long |
checksum_impl()
High-quality 64-bit checksum of the content of the object.
|
ConfusionMatrix |
cm() |
Frame |
frame() |
static java.util.Set<java.lang.String> |
getAllowedMetrics(Key<Model> key) |
static ModelMetrics |
getFromDKV(Model model,
Frame frame) |
static double |
getMetricFromModel(Key<Model> key,
java.lang.String criterion) |
float[] |
hr() |
boolean |
isForFrame(Frame f) |
boolean |
isForModel(Model m) |
Model |
model() |
double |
mse() |
long |
residual_degrees_of_freedom() |
double |
rmse() |
static java.util.List<Key<Model>> |
sortModelsByMetric(java.lang.String sort_by,
boolean decreasing,
java.util.List<Key<Model>> modelKeys)
Return a new list of models sorted by the named criterion, such as "auc", mse", "hr", "err", "err_count",
"accuracy", "specificity", "recall", "precision", "mcc", "max_per_class_error", "f1", "f2", "f0point5".
|
java.lang.String |
toString() |
checksum, makeSchema, readAll_impl, readAll, remove_impl, remove, remove, remove, remove, writeAll_impl, writeAll
asBytes, clone, copyOver, frozenType, read, readExternal, readJSON, reloadFromBytes, toJsonString, write, writeExternal, writeJSON
public java.lang.String _description
public final long _scoring_time
public final double _MSE
public final long _nobs
public long residual_degrees_of_freedom()
public java.lang.String toString()
toString
in class java.lang.Object
public Model model()
public Frame frame()
public double mse()
public double rmse()
public ConfusionMatrix cm()
public float[] hr()
public AUC2 auc_obj()
public static double getMetricFromModel(Key<Model> key, java.lang.String criterion)
public static java.util.List<Key<Model>> sortModelsByMetric(java.lang.String sort_by, boolean decreasing, java.util.List<Key<Model>> modelKeys)
sort_by
- criterion by which we should sortdecreasing
- sort by decreasing metrics or notmodelKeys
- keys of models to sortmpublic static TwoDimTable calcVarImp(VarImp vi)
public static TwoDimTable calcVarImp(float[] rel_imp, java.lang.String[] coef_names)
public static TwoDimTable calcVarImp(double[] rel_imp, java.lang.String[] coef_names)
public static TwoDimTable calcVarImp(double[] rel_imp, java.lang.String[] coef_names, java.lang.String table_header, java.lang.String[] col_headers)
public static Key<ModelMetrics> buildKey(Model model, Frame frame)
public boolean isForModel(Model m)
public boolean isForFrame(Frame f)
public static ModelMetrics getFromDKV(Model model, Frame frame)
protected long checksum_impl()
Keyed
checksum_impl
in class Keyed<ModelMetrics>