A few examples regarding the plssvm::csvm class.
#include <string>
#include <vector>
int main() {
const double model_score = svm->score(model);
const double score = svm->score(model, test_data);
const std::vector<int> predicted_labels = opencl_svm.
predict(model, test_data);
return 0;
}
std::vector< label_type > predict(const model< real_type, label_type > &model, const data_set< real_type, label_type > &data) const
Predict the labels for the data set using the model.
Definition: csvm.hpp:326
Encapsulate all necessary data that is needed for training or predicting using an SVM.
Definition: data_set.hpp:69
Implements a class encapsulating the result of a call to the SVM fit function. A model is used to pre...
Definition: model.hpp:50
A C-SVM implementation using OpenCL as backend.
Definition: csvm.hpp:42
Core header including all other necessary headers.
std::unique_ptr< csvm > make_csvm(const backend_type backend, Args &&...args)
Create a new C-SVM using the backend type and additional parameter args.
Definition: csvm_factory.hpp:158