| 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); |