Debian Codegraph @

src/algorithms/CostFactorySVM.h

raw symbols SCIP
1 /**********************************************************************
2 CostFactorySVM.h: select features, typical use: feature selection for classification
3 Author(s): [email protected]
4 Copyright (C) 2016-2020 European Union (Joint Research Centre)
5
6 This file is part of jiplib.
7
8 jiplib is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 jiplib is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with jiplib. If not, see <https://www.gnu.org/licenses/>.
20 ***********************************************************************/
21 #ifndef _COSTFACTORYSVM_H_
22 #define _COSTFACTORYSVM_H_
23
24 /* #include <math.h> */
25 #include <cmath>
26 #include <vector>
27 #include <map>
28 #include "base/Vector2d.h"
29 #include "CostFactory.h"
30
31 namespace svm{
32 enum SVM_TYPE {C_SVC=0, nu_SVC=1,one_class=2, epsilon_SVR=3, nu_SVR=4};
33 enum KERNEL_TYPE {linear=0,polynomial=1,radial=2,sigmoid=3};
34 }
35
36 class CostFactorySVM : public CostFactory
37 {
38 public:
39 CostFactorySVM();
40 CostFactorySVM(std::string svm_type, std::string kernel_type, unsigned short kernel_degree, float gamma, float coef0, float ccost, float nu, float epsilon_loss, int cache, float epsilon_tol, bool shrinking, bool prob_est, unsigned short cv, short verbose);
41 ~CostFactorySVM();
42 double getCost(const std::vector<Vector2d<float> > &trainingFeatures);
43
44 private:
45 std::string m_svm_type;
46 std::string m_kernel_type;
47 unsigned short m_kernel_degree;
48 float m_gamma;
49 float m_coef0;
50 float m_ccost;
51 float m_nu;
52 float m_epsilon_loss;
53 int m_cache;
54 float m_epsilon_tol;
55 bool m_shrinking;
56 bool m_prob_est;
57 };
58 #endif