UFJF - Machine Learning Toolkit  0.51.8
Solution.hpp
Go to the documentation of this file.
1 
7 #pragma once
8 
9 #include <vector>
10 #include "Kernel.hpp"
11 
12 namespace mltk{
13  class Solution {
14  // Attributes
15  public :
21  std::vector<double> alpha;
23  double bias = 0;
25  std::vector<int> fnames;
27  double margin = 0;
29  double norm = 0;
31  unsigned int svs = 0;
32 
33  Solution& operator=(const Solution& other){
34  w = other.w;
35  func = other.func;
36  K = other.K;
37  alpha = other.alpha;
38  bias = other.bias;
39  fnames = other.fnames;
40  margin = other.margin;
41  norm = other.norm;
42  svs = other.svs;
43 
44  return *this;
45  }
46  };
47 }
Definition: Solution.hpp:13
double bias
Bias of the solution.
Definition: Solution.hpp:23
double norm
Norm of the solution.
Definition: Solution.hpp:29
Kernel< double > K
Kernel for Dual methods.
Definition: Solution.hpp:19
unsigned int svs
Number of support Vectors.
Definition: Solution.hpp:31
std::vector< int > fnames
Features names of the resulting solution.
Definition: Solution.hpp:25
mltk::Point< double > w
Weights vector.
Definition: Solution.hpp:17
std::vector< double > alpha
Alpha Vector for Dual methods.
Definition: Solution.hpp:21
double margin
Margin generated from the classifier that generated the solution.
Definition: Solution.hpp:27
UFJF-MLTK main namespace for core functionalities.
Definition: classifier/Classifier.hpp:11