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

Function get_coef

src/thundersvm/thundersvm-scikit.cpp:297–304  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

295 }
296
297 void get_coef(float* dual_coef, int n_class, int n_sv, SvmModel* model){
298 SyncArray<float_type > coef((n_class - 1 ) * n_sv);
299 coef.copy_from(model->get_coef());
300 float_type * coef_ptr = coef.host_data();
301 for(int i = 0; i < coef.size(); i++){
302 dual_coef[i] = coef_ptr[i];
303 }
304 }
305
306 void get_linear_coef(float* linear_coef, int n_binary_model, int n_feature, SvmModel* model){
307 SyncArray<float_type > coef(n_binary_model * n_feature);

Callers

nothing calls this directly

Calls 3

copy_fromMethod · 0.80
host_dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected