struct chill::LinearClassifierΒΆ

One-versus-rest ridge classifier on a dense feature matrix.

#include <structure_desc.hpp>
 
struct LinearClassifier {
    // fields
 
    int nClasses = 0;
    int nFeat = 0;
    double ridge = 1e-6;
    std::vector<double> weights;
    std::vector<std::string> labels;
 
    // methods
 
    void fit(const std::vector<std::vector<double>>& X, const std::vector<int>& y);
    int predict(const std::vector<double>& x) const;
};