22 register_parameters();
29 register_parameters();
59 std::map<index_t, float64_t> freq;
60 std::map<index_t, float64_t>::iterator it;
69 it = freq.find(ensemble_result[i]);
72 freq.insert(std::make_pair(ensemble_result[i],
m_weights[i]));
75 max_label = ensemble_result[i];
84 max_label = it->first;
103 void CWeightedMajorityVote::init()
108 void CWeightedMajorityVote::register_parameters()
virtual SGVector< float64_t > combine(const SGMatrix< float64_t > &ensemble_result) const
SGVector< float64_t > get_weights() const
void set_weights(SGVector< float64_t > &w)
virtual ~CWeightedMajorityVote()
static const float64_t ALMOST_NEG_INFTY
almost neg (log) infinity
SGVector< float64_t > m_weights
all of classes and functions are contained in the shogun namespace
static int is_nan(double f)
checks whether a float is nan
CombinationRule abstract class The CombinationRule defines an interface to how to combine the classif...
Matrix::Scalar max(Matrix m)
SGVector< T > get_row_vector(index_t row) const
virtual float64_t weighted_combine(const SGVector< float64_t > &ensemble_result) const