SHOGUN  v3.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MajorityVote.cpp
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 
12 #include <shogun/lib/SGMatrix.h>
13 
14 using namespace shogun;
15 
18 {
19 
20 }
21 
23 {
24 
25 }
26 
28 {
29  m_weights.resize_vector(ensemble_result.num_cols);
30  m_weights.set_const(1.0);
31 
32  SGVector<float64_t> combined_result = CWeightedMajorityVote::combine(ensemble_result);
33 
34  return combined_result;
35 }
36 
38 {
39  m_weights.resize_vector(ensemble_result.vlen);
40  m_weights.set_const(1.0);
41 
42  return weighted_combine(ensemble_result);
43 }

SHOGUN Machine Learning Toolbox - Documentation