47 #ifndef MODEL_MC_ONEVSREST_HH 48 #define MODEL_MC_ONEVSREST_HH 66 template<
typename TCModel>
73 typedef typename TCModel::FV_type
FV;
77 _modelsVector.resize( nClasses);
82 return static_cast<unsigned int>(_modelsVector.size());
87 return static_cast<unsigned int>(_modelsVector.size());
92 return _modelsVector[classIndex];
97 return _modelsVector[classIndex];
103 _modelsVector.begin(), _modelsVector.end());
106 template<
typename STDATA>
114 for(
unsigned int classIndex = 0; classIndex < _modelsVector.size();
117 std::ostringstream prefix_os;
118 prefix_os << classIndex <<
"vsRest_";
119 _modelsVector[classIndex].saveTrainingInfo( statistics,
125 template<
typename STDATA>
131 _modelsVector.begin(), _modelsVector.end(), statistics);
149 template<
typename STDATA>
165 template<
typename STDATA>
170 std::vector< TCModel> _modelsVector;
178 #include "Model_MC_OneVsRest.icc"
#define CHECK_MEMBER_TEMPLATE(c)
Ensure that TCMODEL provides minimal functions to be used With Multiclass-Algortithms.
void collectSupportVectorsFromTCModels(const ForwardIter &modelsBegin, const ForwardIter &modelsEnd)
void collectSupportVectorsFromTCModels()
#define CHECK_CLASS_TEMPLATE1(c)
void saveParameters(STDATA &stData) const
save all data from two-class models to Map, where the keys of each model will be prefixed by its posi...
unsigned int nTwoClassModels() const
void loadParameters(STDATA &stData)
load all data from two-class models to Map, where the keys of each model are prefixed by its position...
void resizeModelsVector(unsigned int nClasses)
unsigned int nClasses() const
void saveTCTrainingInfos(STDATA &statistics)
const TCModel & twoClassModel(unsigned int classIndex) const
TCModel & twoClassModel(unsigned int classIndex)
void calcTrainingStatisticsFromTCModels(const ForwardIter &modelsBegin, const ForwardIter &modelsEnd, STDATA &statistics)
void saveTrainingInfoStatistics(STDATA &statistics)