SHOGUN  5.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
WeightedMajorityVote.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 3 of the License, or
5  * (at your option) any later version.
6  *
7  * Written (W) 2013 Viktor Gal
8  * Copyright (C) 2013 Viktor Gal
9  */
10 
11 #ifndef _WEIGHTED_MAJORITY_VOTE_H_
12 #define _WEIGHTED_MAJORITY_VOTE_H_
13 
14 #include <shogun/lib/config.h>
15 
17 #include <shogun/lib/SGVector.h>
18 
19 namespace shogun
20 {
35  {
36  public:
41 
49 
50  virtual ~CWeightedMajorityVote();
51 
60  virtual SGVector<float64_t> combine(const SGMatrix<float64_t>& ensemble_result) const;
61 
69  virtual float64_t combine(const SGVector<float64_t>& ensemble_result) const;
70 
77 
84 
86  virtual const char* get_name() const { return "WeightedMajorityVote"; }
87 
88  protected:
95  virtual float64_t weighted_combine(const SGVector<float64_t>& ensemble_result) const;
96 
99 
100  private:
101  void init();
102  void register_parameters();
103  };
104 }
105 
106 #endif /* _WEIGHTED_MAJORITY_VOTE_H_ */
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)
Weighted Majority Vote implementation.
double float64_t
Definition: common.h:50
virtual const char * get_name() const
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
CombinationRule abstract class The CombinationRule defines an interface to how to combine the classif...
virtual float64_t weighted_combine(const SGVector< float64_t > &ensemble_result) const

SHOGUN Machine Learning Toolbox - Documentation