public class ModelMetricsMultinomial extends ModelMetricsSupervised
Modifier and Type | Class and Description |
---|---|
static class |
ModelMetricsMultinomial.MetricBuilderMultinomial<T extends ModelMetricsMultinomial.MetricBuilderMultinomial<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
_description, _MSE, _nobs, _scoring_time
Constructor and Description |
---|
ModelMetricsMultinomial(Model model,
Frame frame,
long nobs,
double mse,
java.lang.String[] domain,
double sigma,
ConfusionMatrix cm,
float[] hr,
double logloss) |
Modifier and Type | Method and Description |
---|---|
ConfusionMatrix |
cm() |
static ModelMetricsMultinomial |
getFromDKV(Model model,
Frame frame) |
static TwoDimTable |
getHitRatioTable(float[] hits) |
float[] |
hr() |
double |
logloss() |
static ModelMetricsMultinomial |
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 ModelMetricsMultinomial |
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
auc_obj, buildKey, calcVarImp, calcVarImp, calcVarImp, calcVarImp, checksum_impl, deepCloneWithDifferentModelAndFrame, frame, getAllowedMetrics, getMetricFromModel, getMetricFromModelMetric, isForFrame, isForModel, model, mse, residual_degrees_of_freedom, rmse, sortModelsByMetric, sortModelsByMetric
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 ModelMetricsMultinomial(Model model, Frame frame, long nobs, double mse, java.lang.String[] domain, double sigma, ConfusionMatrix cm, float[] hr, double logloss)
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 ModelMetricsMultinomial 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 ModelMetricsMultinomial 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 ModelMetricsMultinomial 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])