public abstract static class ModelMetrics.MetricBuilder<T extends ModelMetrics.MetricBuilder<T>> extends Iced<T>
perRow
method is called once-per-scored-row, and
the reduce
method called once per MRTask.reduce, and the <init>
called once per MRTask.map.Modifier and Type | Field and Description |
---|---|
long |
_count |
CustomMetric |
_customMetric |
double |
_sumsqe |
double |
_wcount |
double[] |
_work |
double |
_wY |
double |
_wYY |
Constructor and Description |
---|
MetricBuilder() |
Modifier and Type | Method and Description |
---|---|
void |
cachePrediction(double[] cdist,
Chunk[] chks,
int row,
int cacheChunkIdx,
Model m) |
abstract ModelMetrics |
makeModelMetrics(Model m,
Frame f,
Frame adaptedFrame,
Frame preds)
Having computed a MetricBuilder, this method fills in a ModelMetrics
|
Frame |
makePredictionCache(Model m,
Vec response) |
double[] |
perRow(double[] ds,
float[] yact,
double weight,
double offset,
Model m) |
abstract double[] |
perRow(double[] ds,
float[] yact,
Model m) |
void |
postGlobal() |
void |
postGlobal(CustomMetric customMetric) |
void |
reduce(java.lang.Object mb) |
void |
reduce(T mb) |
void |
reduceForCV(T mb) |
void |
setCustomMetric(CustomMetric customMetric)
Set value of custom metric.
|
double |
weightedSigma() |
asBytes, clone, copyOver, frozenType, read, readExternal, readJSON, reloadFromBytes, toJsonBytes, toJsonString, write, writeExternal, writeJSON
public transient double[] _work
public double _sumsqe
public long _count
public double _wcount
public double _wY
public double _wYY
public CustomMetric _customMetric
public double weightedSigma()
public abstract double[] perRow(double[] ds, float[] yact, Model m)
public double[] perRow(double[] ds, float[] yact, double weight, double offset, Model m)
public void reduce(T mb)
public void reduce(java.lang.Object mb)
public void reduceForCV(T mb)
public void postGlobal()
public void postGlobal(CustomMetric customMetric)
public abstract ModelMetrics makeModelMetrics(Model m, Frame f, Frame adaptedFrame, Frame preds)
m
- Modelf
- Scored FrameadaptedFrame
- Adapted Framepreds
- Predictions of m on f (optional) @return Filled Model Metrics objectpublic void setCustomMetric(CustomMetric customMetric)
customMetric
- computed custom metric outside of this default builder