35 #ifndef OPENMS_ANALYSIS_SVM_SIMPLESVM_H 36 #define OPENMS_ANALYSIS_SVM_SIMPLESVM_H 100 void setup(PredictorMap& predictors,
const std::map<Size, Int>& labels);
111 void predict(std::vector<Prediction>& predictions,
112 std::vector<Size> indexes = std::vector<Size>())
const;
122 void getFeatureWeights(std::map<String, double>& feature_weights)
const;
125 void writeXvalResults(
const String& path)
const;
132 std::vector<std::vector<struct svm_node> >
nodes_;
135 struct svm_problem data_;
138 struct svm_parameter svm_params_;
159 void scaleData_(PredictorMap& predictors)
const;
162 void convertData_(
const PredictorMap& predictors);
165 std::pair<double, double> chooseBestParameters_()
const;
168 void optimizeParameters_();
172 #endif // #ifndef OPENMS_ANALYSIS_SVM_SIMPLESVM_H SVMPerformance performance_
Cross-validation results.
Definition: SimpleSVM.h:153
A more convenient string class.
Definition: String.h:57
std::vector< String > predictor_names_
Names of predictors in the model (excluding uninformative ones)
Definition: SimpleSVM.h:144
struct svm_model * model_
Pointer to SVM model (LIBSVM format)
Definition: SimpleSVM.h:141
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
std::vector< std::vector< struct svm_node > > nodes_
Values of predictors (LIBSVM format)
Definition: SimpleSVM.h:132
SVM prediction result.
Definition: SimpleSVM.h:75
std::vector< double > log2_gamma_
Definition: SimpleSVM.h:150
static void printNull_(const char *)
Dummy function to suppress LIBSVM output.
Definition: SimpleSVM.h:156
std::map< Int, double > probabilities
Predicted probabilities for different classes.
Definition: SimpleSVM.h:81
Simple interface to support vector machines for classification (via LIBSVM).
Definition: SimpleSVM.h:66
Size n_parts_
Number of partitions for cross-validation.
Definition: SimpleSVM.h:147
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:128
Int label
Predicted class label.
Definition: SimpleSVM.h:78
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:92
std::vector< std::vector< double > > SVMPerformance
Classification performance for different param. combinations (C/gamma):
Definition: SimpleSVM.h:129
int Int
Signed integer type.
Definition: Types.h:103
std::map< String, std::vector< double > > PredictorMap
Mapping from predictor name to vector of predictor values.
Definition: SimpleSVM.h:72