oa::Metric

base class for all metrics. Follows the keras pattern: - update(): add a new batch of predictions/labels - reset(): clear accumulated state - result(): get the current metric value

Public Methods

bool oa::Metric::isLossMetric()
const char * oa::Metric::name()
oa::I32 oa::Metric::render(char * outBuffer, oa::I32 inBufferSize, bool inFirst)
void oa::Metric::reset()
oa::F64 oa::Metric::result()
void oa::Metric::update(const Matrix & inPreds, const Matrix & inLabels)
void oa::Metric::updateStep(oa::F32 inLoss, bool inHasLoss, oa::F64 inElapsedSeconds, oa::I64 inStepCount)

Constructor & Destructor Documentation

void oa::Metric::~Metric()
No public source comment is attached to this declaration.

Public Method Documentation

bool oa::Metric::isLossMetric()
No public source comment is attached to this declaration.

Returns

bool

The declared return value.

const char * oa::Metric::name()
No public source comment is attached to this declaration.

Returns

const char *

The declared return value.

oa::I32 oa::Metric::render( char * outBuffer, oa::I32 inBufferSize, bool inFirst )
Render the metric to a buffer for progress bar display. inFirst: if true, don't prepend " · " separator.

Parameters

outBuffer
char *

inBufferSize
oa::I32

inFirst
bool

Returns

oa::I32

The declared return value.

void oa::Metric::reset()
No public source comment is attached to this declaration.

Returns

void

The declared return value.

oa::F64 oa::Metric::result()
No public source comment is attached to this declaration.

Returns

oa::F64

The declared return value.

void oa::Metric::update( const Matrix & inPreds, const Matrix & inLabels )
No public source comment is attached to this declaration.

Parameters

inPreds
const Matrix &

inLabels
const Matrix &

Returns

void

The declared return value.

void oa::Metric::updateStep( oa::F32 inLoss, bool inHasLoss, oa::F64 inElapsedSeconds, oa::I64 inStepCount )
Consume one completed training step.

Parameters

inLoss
oa::F32

inHasLoss
bool

inElapsedSeconds
oa::F64

inStepCount
oa::I64

Returns

void

The declared return value.