24 #include <raft/core/handle.hpp>
25 #include <raft/distance/distance_types.hpp>
55 template <
typename math_t>
56 void svcFit(
const raft::handle_t& handle,
62 raft::distance::kernels::KernelParams& kernel_params,
64 const math_t* sample_weight);
88 template <
typename math_t>
98 raft::distance::kernels::KernelParams& kernel_params,
100 const math_t* sample_weight);
131 template <
typename math_t>
136 raft::distance::kernels::KernelParams& kernel_params,
173 template <
typename math_t>
181 raft::distance::kernels::KernelParams& kernel_params,
193 template <
typename math_t>
215 template <
typename math_t>
234 SVC(raft::handle_t& handle,
239 math_t cache_size = 200,
241 int nochange_steps = 1000,
259 math_t* input,
int n_rows,
int n_cols, math_t* labels,
const math_t* sample_weight =
nullptr);
270 void predict(math_t* input,
int n_rows,
int n_cols, math_t* preds);
284 const raft::handle_t& handle;
C-Support Vector Classification.
Definition: svc.hpp:216
SvmModel< math_t > model
Definition: svc.hpp:222
raft::distance::kernels::KernelParams kernel_params
Definition: svc.hpp:220
SvmParameter param
Definition: svc.hpp:221
void fit(math_t *input, int n_rows, int n_cols, math_t *labels, const math_t *sample_weight=nullptr)
Fit a support vector classifier to the training data.
void decisionFunction(math_t *input, int n_rows, int n_cols, math_t *preds)
Calculate decision function value for samples in input.
void predict(math_t *input, int n_rows, int n_cols, math_t *preds)
Predict classes for samples in input.
SVC(raft::handle_t &handle, math_t C=1, math_t tol=1.0e-3, raft::distance::kernels::KernelParams kernel_params=raft::distance::kernels::KernelParams{raft::distance::kernels::LINEAR, 3, 1, 0}, math_t cache_size=200, int max_iter=-1, int nochange_steps=1000, int verbosity=CUML_LEVEL_INFO)
Constructs a support vector classifier.
#define CUML_LEVEL_INFO
Definition: log_levels.hpp:28
void buffer_size(int n, int batch_size, int frequency, int *start_leveltrend_len, int *start_season_len, int *components_len, int *error_len, int *leveltrend_coef_shift, int *season_coef_shift)
void svcFitSparse(const raft::handle_t &handle, int *indptr, int *indices, math_t *data, int n_rows, int n_cols, int nnz, math_t *labels, const SvmParameter ¶m, raft::distance::kernels::KernelParams &kernel_params, SvmModel< math_t > &model, const math_t *sample_weight)
Fit a support vector classifier to the training data.
void svcFit(const raft::handle_t &handle, math_t *input, int n_rows, int n_cols, math_t *labels, const SvmParameter ¶m, raft::distance::kernels::KernelParams &kernel_params, SvmModel< math_t > &model, const math_t *sample_weight)
Fit a support vector classifier to the training data.
void svcPredict(const raft::handle_t &handle, math_t *input, int n_rows, int n_cols, raft::distance::kernels::KernelParams &kernel_params, const SvmModel< math_t > &model, math_t *preds, math_t buffer_size, bool predict_class)
Predict classes or decision function value for samples in input.
void svcPredictSparse(const raft::handle_t &handle, int *indptr, int *indices, math_t *data, int n_rows, int n_cols, int nnz, raft::distance::kernels::KernelParams &kernel_params, const SvmModel< math_t > &model, math_t *preds, math_t buffer_size, bool predict_class)
Predict classes or decision function value for samples in input.
void svmFreeBuffers(const raft::handle_t &handle, SvmModel< math_t > &m)
Definition: dbscan.hpp:30
Definition: svm_model.h:35
Definition: svm_parameter.h:34
@ LINEAR
Definition: svm_api.h:24