A few examples regarding the plssvm::data_set class.
#include <string>
#include <vector>
int main() {
std::vector<std::vector<double>> data_vector{ { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 } };
std::vector<int> label_vector{ 0, 0, 1 };
auto different_labels = data3.different_labels().value();
return 0;
}
Encapsulate all necessary data that is needed for training or predicting using an SVM.
Definition: data_set.hpp:69
bool has_labels() const noexcept
Returns whether this data set contains labels or not.
Definition: data_set.hpp:194
optional_ref< const scaling > scaling_factors() const noexcept
Returns the scaling factors as an optional reference used to scale the data points in this data set.
Definition: data_set.hpp:641
Core header including all other necessary headers.