41 template<
class Descriptor>
74 template<
class DataSet>
77 if(priori_knownledge>0.0)
79 double A = priori_knownledge;
80 double B = 1.0 - priori_knownledge;
82 double dB = B/(list.n_patternN);
83 std::cout <<
"Initialize weight with " << dA<<
" for " << list.
n_patternP <<
" positives, " << dB <<
" for " << list.n_patternN <<
" negatives, " << list.
Size() <<
" total patterns." << std::endl;
84 for(
unsigned int i =0; i<list.
Size(); i++)
90 double d0 = 1.0 / (double) list.
Size();
91 std::cout <<
"Initialize weight with " << d0 <<
" for " << list.
Size() <<
" patterns" << std::endl;
92 for(
unsigned int i =0; i<list.
Size(); i++)
void ResetWeight(DataSet &list, double priori_knownledge)
Definition: WeightedPattern.h:75
unsigned int n_patternP
Definition: DataSet.h:70
double d
Current weight associated to this pattern.
Definition: WeightedPattern.h:45
unsigned int Size() const
Return number of allocated samples (complete size of DataSet)
Definition: DataSet.h:101
ListType templates
a collection of Pattern used in this dataset
Definition: DataSet.h:73
implement the generic pattern object
bool correct() const
Definition: WeightedPattern.h:64
Definition: WeightedPattern.h:42
int test
Result on the last evaluate (-1,0,1) of Weak Classifier (binary problem)
Definition: WeightedPattern.h:48
float GetWeightedCategory() const
Definition: WeightedPattern.h:58