libeblearn
|
#include <ebl_answer.h>
Public Member Functions | |
scaler_answer (uint negative_id_, uint positive_id_, bool raw_confidence=false, float threshold=0.0, bool spatial=false, const char *name="scaler_answer") | |
virtual void | fprop (Tstate &in, Tstate &out) |
virtual void | fprop (labeled_datasource< T, Tds1, Tds2 > &ds, Tstate &out) |
virtual std::string | describe () |
Returns a string describing this module and its parameters. | |
Protected Attributes | |
uint | negative_id |
The id of the negative class. | |
uint | positive_id |
The id of the positive class. | |
bool | raw_confidence |
Use raw output as confidence or not. | |
bbstate_idx< T > | jitter |
A temp buffer to extract jitter info to. | |
T | threshold |
Threshold used for classifying into pos/neg class. | |
bool | spatial |
If true, use spatial jitter as well. | |
uint | jsize |
Number of jitter elements used. |
This module produces binary-class answers and a scale estimate for the positive class. It also produces a target value for training given a datasource 'ds'.
ebl::scaler_answer< T, Tds1, Tds2, Tstate >::scaler_answer | ( | uint | negative_id_, |
uint | positive_id_, | ||
bool | raw_confidence = false , |
||
float | threshold = 0.0 , |
||
bool | spatial = false , |
||
const char * | name = "scaler_answer< T, Tds1, Tds2, Tstate >" |
||
) |
negative_id | The id of the negative class. |
positive_id | The id of the positive class. |
raw_confidence | If true, the confidence is just the net output. |
threshold | Classification threshold. |
spatial | If true, use spatial jitter as well. |
void ebl::scaler_answer< T, Tds1, Tds2, Tstate >::fprop | ( | Tstate & | in, |
Tstate & | out | ||
) | [virtual] |
Produce a vector of answers given input 'in'. 'out' contains answers in this order: class id, confidence and scale.
Reimplemented from ebl::answer_module< T, Tds1, Tds2, Tstate >.
void ebl::scaler_answer< T, Tds1, Tds2, Tstate >::fprop | ( | labeled_datasource< T, Tds1, Tds2 > & | ds, |
Tstate & | out | ||
) | [virtual] |
Copy a single target value into 'out' given datasource 'ds'. If negative class, target value is 0, the scale otherwise.
Reimplemented from ebl::answer_module< T, Tds1, Tds2, Tstate >.