public class ModelMetricsOrdinal extends ModelMetricsSupervised
Modifier and Type | Class and Description |
---|---|
static class |
ModelMetricsOrdinal.MetricBuilderOrdinal<T extends ModelMetricsOrdinal.MetricBuilderOrdinal<T>> |
ModelMetricsSupervised.MetricBuilderSupervised<T extends ModelMetricsSupervised.MetricBuilderSupervised<T>>
ModelMetrics.MetricBuilder<T extends ModelMetrics.MetricBuilder<T>>
Modifier and Type | Field and Description |
---|---|
ConfusionMatrix |
_cm |
float[] |
_hit_ratios |
double |
_logloss |
double |
_mean_per_class_error |
_domain, _sigma
_custom_metric, _description, _MSE, _nobs, _scoring_time
Constructor and Description |
---|
ModelMetricsOrdinal(Model model,
Frame frame,
long nobs,
double mse,
java.lang.String[] domain,
double sigma,
ConfusionMatrix cm,
float[] hr,
double logloss,
CustomMetric customMetric) |
Modifier and Type | Method and Description |
---|---|
ConfusionMatrix |
cm() |
static ModelMetricsOrdinal |
getFromDKV(Model model,
Frame frame) |
static TwoDimTable |
getHitRatioTable(float[] hits) |
float[] |
hr() |
double |
logloss() |
static ModelMetricsOrdinal |
make(Frame perClassProbs,
Vec actualLabels)
Build a Multinomial ModelMetrics object from per-class probabilities (in Frame preds - no labels!), from actual labels, and a given domain for all possible labels (maybe more than what's in labels)
|
static ModelMetricsOrdinal |
make(Frame perClassProbs,
Vec actualLabels,
java.lang.String[] domain)
Build a Multinomial ModelMetrics object from per-class probabilities (in Frame preds - no labels!), from actual labels, and a given domain for all possible labels (maybe more than what's in labels)
|
double |
mean_per_class_error() |
java.lang.String |
toString() |
static void |
updateHits(double w,
int iact,
double[] ds,
double[] hits) |
static void |
updateHits(double w,
int iact,
double[] ds,
double[] hits,
double[] priorClassDistribution) |
r2
appendToStringMetrics, auc_obj, buildKey, buildKey, calcVarImp, calcVarImp, calcVarImp, calcVarImp, checksum_impl, deepCloneWithDifferentModelAndFrame, defaultModelMetrics, frame, getAllowedMetrics, getMetricFromModel, getMetricFromModelMetric, isForFrame, isForModel, model, mse, residual_degrees_of_freedom, rmse, sortModelsByMetric, sortModelsByMetric, withDescription, withModelAndFrame
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 final float[] _hit_ratios
public final ConfusionMatrix _cm
public final double _logloss
public final double _mean_per_class_error
public ModelMetricsOrdinal(Model model, Frame frame, long nobs, double mse, java.lang.String[] domain, double sigma, ConfusionMatrix cm, float[] hr, double logloss, CustomMetric customMetric)
public java.lang.String toString()
toString
in class ModelMetricsSupervised
public double logloss()
public double mean_per_class_error()
public ConfusionMatrix cm()
cm
in class ModelMetrics
public float[] hr()
hr
in class ModelMetrics
public static ModelMetricsOrdinal getFromDKV(Model model, Frame frame)
public static void updateHits(double w, int iact, double[] ds, double[] hits)
public static void updateHits(double w, int iact, double[] ds, double[] hits, double[] priorClassDistribution)
public static TwoDimTable getHitRatioTable(float[] hits)
public static ModelMetricsOrdinal make(Frame perClassProbs, Vec actualLabels)
perClassProbs
- Frame containing predicted per-class probabilities (and no predicted labels)actualLabels
- A Vec containing the actual labels (can be for fewer labels than what's in domain, since the predictions can be for a small subset of the data)public static ModelMetricsOrdinal make(Frame perClassProbs, Vec actualLabels, java.lang.String[] domain)
perClassProbs
- Frame containing predicted per-class probabilities (and no predicted labels)actualLabels
- A Vec containing the actual labels (can be for fewer labels than what's in domain, since the predictions can be for a small subset of the data)domain
- Ordered list of factor levels for which the probabilities are given (perClassProbs[i] are the per-observation probabilities for belonging to class domain[i])