libeblearn
ebl::scaler_answer< T, Tds1, Tds2, Tstate > Class Template Reference

#include <ebl_answer.h>

Inheritance diagram for ebl::scaler_answer< T, Tds1, Tds2, Tstate >:
ebl::answer_module< T, Tds1, Tds2, Tstate > ebl::module_1_1< T, Tstate > ebl::module

List of all members.

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.
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.

Detailed Description

template<typename T, typename Tds1 = T, typename Tds2 = T, class Tstate = bbstate_idx<T>>
class ebl::scaler_answer< T, Tds1, Tds2, Tstate >

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'.


Constructor & Destructor Documentation

template<typename T , typename Tds1 , typename Tds2 , class Tstate >
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 >" 
)
Parameters:
negative_idThe id of the negative class.
positive_idThe id of the positive class.
raw_confidenceIf true, the confidence is just the net output.
thresholdClassification threshold.
spatialIf true, use spatial jitter as well.

Member Function Documentation

template<typename T , typename Tds1 , typename Tds2 , class Tstate >
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 >.

template<typename T , typename Tds1 , typename Tds2 , class 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 >.


The documentation for this class was generated from the following files: