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

Method get_param

src/thundersvm/model/svmmodel.cpp:369–391  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

367}
368
369void SvmModel::get_param(char* kernel_type, int* degree, float* gamma, float* coef0, int* probability){
370 switch(param.kernel_type){
371 case 0:
372 strcpy(kernel_type, "linear");
373 break;
374 case 1:
375 strcpy(kernel_type, "polynomial");
376 break;
377 case 2:
378 strcpy(kernel_type, "rbf");
379 break;
380 case 3:
381 strcpy(kernel_type, "sigmoid");
382 break;
383 case 4:
384 strcpy(kernel_type, "precomputed");
385 break;
386 }
387 *degree = param.degree;
388 *gamma = param.gamma;
389 *coef0 = param.coef0;
390 *probability = param.probability;
391}
392
393void SvmModel::compute_linear_coef_single_model(size_t n_feature, const bool zero_based){
394 if(zero_based)

Callers 1

init_model_paramFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected