60     typedef std::map<String, std::pair<double, double> > 
ScaleMap;
 
   93     void setup(
PredictorMap& predictors, 
const std::map<Size, double>& outcomes, 
bool classification = 
true);
 
  104     void predict(std::vector<Prediction>& predictions,
 
  105                  std::vector<Size> indexes = std::vector<Size>()) 
const;
 
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:66
 
Simple interface to support vector machines for classification and regression (via LIBSVM).
Definition: SimpleSVM.h:53
 
~SimpleSVM() override
Destructor.
 
SimpleSVM & operator=(const SimpleSVM &)=delete
 
void predict(PredictorMap &predictors, std::vector< Prediction > &predictions) const
Predict class labels or regression values (and probabilities).
 
std::map< double, double > probabilities
Class label (or regression value) and their predicted probabilities.
Definition: SimpleSVM.h:69
 
void predict(std::vector< Prediction > &predictions, std::vector< Size > indexes=std::vector< Size >()) const
Predict class labels or regression values (and probabilities).
 
std::unique_ptr< Impl > pimpl_
Definition: SimpleSVM.h:136
 
void writeXvalResults(const String &path) const
Write cross-validation (parameter optimization) results to a CSV file.
 
std::map< String, std::vector< double > > PredictorMap
Mapping from predictor name to vector of predictor values.
Definition: SimpleSVM.h:57
 
double outcome
Predicted class label (or regression value)
Definition: SimpleSVM.h:66
 
const ScaleMap & getScaling() const
Get data range of predictors before scaling to [0, 1].
 
SimpleSVM()
Default constructor.
 
SimpleSVM(const SimpleSVM &)=delete
 
std::map< String, std::pair< double, double > > ScaleMap
Mapping from predictor name to predictor min and max.
Definition: SimpleSVM.h:60
 
void setup(PredictorMap &predictors, const std::map< Size, double > &outcomes, bool classification=true)
Load data and train a model.
 
void getFeatureWeights(std::map< String, double > &feature_weights) const
Get the weights used for features (predictors) in the SVM model.
 
SVM/SVR prediction result.
Definition: SimpleSVM.h:64
 
A more convenient string class.
Definition: String.h:34
 
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19