24 #include <raft/core/handle.hpp>
26 #include <cuvs/distance/distance.hpp>
27 #include <cuvs/distance/grammian.hpp>
57 template <
typename math_t>
58 void svcFit(
const raft::handle_t& handle,
64 cuvs::distance::kernels::KernelParams& kernel_params,
66 const math_t* sample_weight);
90 template <
typename math_t>
100 cuvs::distance::kernels::KernelParams& kernel_params,
102 const math_t* sample_weight);
133 template <
typename math_t>
138 cuvs::distance::kernels::KernelParams& kernel_params,
175 template <
typename math_t>
183 cuvs::distance::kernels::KernelParams& kernel_params,
195 template <
typename math_t>
217 template <
typename math_t>
236 SVC(raft::handle_t& handle,
241 math_t cache_size = 200,
243 int nochange_steps = 1000,
244 rapids_logger::level_enum verbosity = rapids_logger::level_enum::info);
261 math_t* input,
int n_rows,
int n_cols, math_t* labels,
const math_t* sample_weight =
nullptr);
272 void predict(math_t* input,
int n_rows,
int n_cols, math_t* preds);
286 const raft::handle_t& handle;
C-Support Vector Classification.
Definition: svc.hpp:218
SVC(raft::handle_t &handle, math_t C=1, math_t tol=1.0e-3, cuvs::distance::kernels::KernelParams kernel_params=cuvs::distance::kernels::KernelParams{cuvs::distance::kernels::LINEAR, 3, 1, 0}, math_t cache_size=200, int max_iter=-1, int nochange_steps=1000, rapids_logger::level_enum verbosity=rapids_logger::level_enum::info)
Constructs a support vector classifier.
SvmModel< math_t > model
Definition: svc.hpp:224
cuvs::distance::kernels::KernelParams kernel_params
Definition: svc.hpp:222
SvmParameter param
Definition: svc.hpp:223
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.
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 svcPredictSparse(const raft::handle_t &handle, int *indptr, int *indices, math_t *data, int n_rows, int n_cols, int nnz, cuvs::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 svcFit(const raft::handle_t &handle, math_t *input, int n_rows, int n_cols, math_t *labels, const SvmParameter ¶m, cuvs::distance::kernels::KernelParams &kernel_params, SvmModel< math_t > &model, const math_t *sample_weight)
Fit a support vector classifier to the training data.
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, cuvs::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, cuvs::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:36
@ LINEAR
Definition: svm_api.h:24