Loading...
Searching...
No Matches
chill::LinearClassifier Struct Reference

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

#include <structure_desc.hpp>

Public Member Functions

void fit (const std::vector< std::vector< double > > &X, const std::vector< int > &y)
int predict (const std::vector< double > &x) const

Public Attributes

int nClasses = 0
int nFeat = 0
double ridge = 1e-6
std::vector< double > weights
std::vector< std::string > labels

Detailed Description

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

Definition at line 51 of file structure_desc.hpp.

Member Function Documentation

◆ fit()

void chill::LinearClassifier::fit ( const std::vector< std::vector< double > > & X,
const std::vector< int > & y )

◆ predict()

int chill::LinearClassifier::predict ( const std::vector< double > & x) const
nodiscard

Member Data Documentation

◆ labels

std::vector<std::string> chill::LinearClassifier::labels

Definition at line 56 of file structure_desc.hpp.

◆ nClasses

int chill::LinearClassifier::nClasses = 0

Definition at line 52 of file structure_desc.hpp.

◆ nFeat

int chill::LinearClassifier::nFeat = 0

Definition at line 53 of file structure_desc.hpp.

◆ ridge

double chill::LinearClassifier::ridge = 1e-6

Definition at line 54 of file structure_desc.hpp.

◆ weights

std::vector<double> chill::LinearClassifier::weights

Definition at line 55 of file structure_desc.hpp.


The documentation for this struct was generated from the following file: