19 #include <raft/core/handle.hpp>
124 const std::size_t nRows,
125 const std::size_t nCols,
127 const T* sampleWeight);
140 const std::size_t nCols,
157 static void predict(
const raft::handle_t& handle,
161 const std::size_t nRows,
162 const std::size_t nCols,
180 const std::size_t nRows,
181 const std::size_t nCols,
200 const std::size_t nRows,
201 const std::size_t nCols,
Definition: params.hpp:34
Definition: dbscan.hpp:30
penalty
Definition: params.hpp:34
Definition: linear.hpp:82
static void decisionFunction(const raft::handle_t &handle, const LinearSVMParams ¶ms, const LinearSVMModel< T > &model, const T *X, const std::size_t nRows, const std::size_t nCols, T *out)
Calculate decision function value for samples in input.
std::size_t coefCols() const
Definition: linear.hpp:106
std::size_t nClasses
Definition: linear.hpp:101
static void predictProba(const raft::handle_t &handle, const LinearSVMParams ¶ms, const LinearSVMModel< T > &model, const T *X, const std::size_t nRows, const std::size_t nCols, const bool log, T *out)
For SVC, predict the probabilities for each outcome.
static void predict(const raft::handle_t &handle, const LinearSVMParams ¶ms, const LinearSVMModel< T > &model, const T *X, const std::size_t nRows, const std::size_t nCols, T *out)
Predict using the trained LinearSVM model.
static LinearSVMModel< T > fit(const raft::handle_t &handle, const LinearSVMParams ¶ms, const T *X, const std::size_t nRows, const std::size_t nCols, const T *y, const T *sampleWeight)
Allocate and fit the LinearSVM model.
T * w
Definition: linear.hpp:89
static void free(const raft::handle_t &handle, LinearSVMModel< T > &model)
Free the allocated memory. The model is not usable after the call of this method.
static LinearSVMModel< T > allocate(const raft::handle_t &handle, const LinearSVMParams ¶ms, const std::size_t nCols, const std::size_t nClasses=0)
Explicitly allocate the data for the model without training it.
T * probScale
Definition: linear.hpp:99
T * classes
Definition: linear.hpp:91
std::size_t coefRows
Definition: linear.hpp:103
Definition: linear.hpp:24
bool probability
Definition: linear.hpp:55
Loss
Definition: linear.hpp:33
@ EPSILON_INSENSITIVE
Definition: linear.hpp:39
@ HINGE
Definition: linear.hpp:35
@ SQUARED_HINGE
Definition: linear.hpp:37
@ SQUARED_EPSILON_INSENSITIVE
Definition: linear.hpp:41
double epsilon
Definition: linear.hpp:78
bool fit_intercept
Definition: linear.hpp:49
double change_tol
Definition: linear.hpp:76
int linesearch_max_iter
Definition: linear.hpp:61
double C
Definition: linear.hpp:72
int max_iter
Definition: linear.hpp:57
int lbfgs_memory
Definition: linear.hpp:65
int verbose
Definition: linear.hpp:67
Penalty
Definition: linear.hpp:26
@ L2
Definition: linear.hpp:30
@ L1
Definition: linear.hpp:28
bool penalized_intercept
Definition: linear.hpp:53
double grad_tol
Definition: linear.hpp:74
Loss loss
Definition: linear.hpp:47