MCPcopy Create free account
hub / github.com/Xtra-Computing/thundersvm / CSMOSolver

Class CSMOSolver

include/thundersvm/solver/csmosolver.h:14–41  ·  view source on GitHub ↗

* @brief C-SMO solver for SVC, SVR and OneClassSVC */

Source from the content-addressed store, hash-verified

12 * @brief C-SMO solver for SVC, SVR and OneClassSVC
13 */
14class CSMOSolver {
15public:
16 void solve(const KernelMatrix &k_mat, const SyncArray<int> &y, SyncArray<float_type> &alpha, float_type &rho,
17 SyncArray<float_type> &f_val, float_type eps, float_type Cp, float_type Cn, int ws_size, int max_iter) const;
18
19protected:
20 void init_f(const SyncArray<float_type> &alpha, const SyncArray<int> &y, const KernelMatrix &k_mat,
21 SyncArray<float_type> &f_val) const;
22
23 virtual void
24 select_working_set(vector<int> &ws_indicator, const SyncArray<int> &f_idx2sort, const SyncArray<int> &y,
25 const SyncArray<float_type> &alpha, float_type Cp, float_type Cn,
26 SyncArray<int> &working_set) const;
27
28 virtual float_type
29 calculate_rho(const SyncArray<float_type> &f_val, const SyncArray<int> &y, SyncArray<float_type> &alpha,
30 float_type Cp,
31 float_type Cn) const;
32 float_type calculate_obj(const SyncArray<float_type> &f_val, const SyncArray<float_type> &alpha,
33 const SyncArray<int> &y) const;
34
35 virtual void
36 smo_kernel(const SyncArray<int> &y, SyncArray<float_type> &f_val, SyncArray<float_type> &alpha,
37 SyncArray<float_type> &alpha_diff,
38 const SyncArray<int> &working_set, float_type Cp, float_type Cn, const SyncArray<kernel_type> &k_mat_rows,
39 const SyncArray<kernel_type> &k_mat_diag, int row_len, float_type eps, SyncArray<float_type> &diff,
40 int max_iter) const;
41};
42
43#endif //THUNDERSVM_CSMOSOLVER_H

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected