EDN Admin
Well-known member
hi,all, I have created a form that contains two groups of radio buttons like this:
<img alt="" src="http://social.msdn.microsoft.com/Forums/getfile/192871
C_SVC and RBF are checked by default, and i have created code for button check for every radio button like this:
<pre class="prettyprint" style=" if(IsDlgButtonChecked(IDC_C_SVC_RADIO) == BST_CHECKED){
param.svm_type = C_SVC;
}else if(IsDlgButtonChecked(IDC_NU_SVC_RADIO) == BST_CHECKED){
param.svm_type = NU_SVC;
}else if(IsDlgButtonChecked(IDC_ONE_CLASS_RADIO) == BST_CHECKED){
param.svm_type = ONE_CLASS;
}else if(IsDlgButtonChecked(IDC_EPS_SVR_RADIO) == BST_CHECKED){
param.svm_type = EPSILON_SVR;
}else{
param.svm_type = NU_SVR;
}
if(IsDlgButtonChecked(IDC_KER_LINEAR_RADIO) == BST_CHECKED){
param.svm_type = LINEAR;
}else if(IsDlgButtonChecked(IDC_KER_POLY_RADIO) == BST_CHECKED){
param.svm_type = POLY;
}else if(IsDlgButtonChecked(IDC_KER_RBF_RADIO) == BST_CHECKED){
param.svm_type = RBF;
}else if(IsDlgButtonChecked(IDC_KER_SIG_RADIO) == BST_CHECKED){
param.svm_type = SIGMOID;
}else{
param.svm_type = PRECOMPUTED;
}[/code]
<br/>
the enum values for C_SVC, NU_SVC, ONE_CLASS, EPSILON_SVR, NU_SVR are 0, 1, 2, 3, 4; and the enum values for LINEAR, POLY, RBF, SIGMOID, PRECOMPUTED are 0, 1, 2, 3, 4; so its obvious wrong for the svm_type
(which should be 0) shown in the message box, so whats wrong?
cheers
View the full article
<img alt="" src="http://social.msdn.microsoft.com/Forums/getfile/192871
C_SVC and RBF are checked by default, and i have created code for button check for every radio button like this:
<pre class="prettyprint" style=" if(IsDlgButtonChecked(IDC_C_SVC_RADIO) == BST_CHECKED){
param.svm_type = C_SVC;
}else if(IsDlgButtonChecked(IDC_NU_SVC_RADIO) == BST_CHECKED){
param.svm_type = NU_SVC;
}else if(IsDlgButtonChecked(IDC_ONE_CLASS_RADIO) == BST_CHECKED){
param.svm_type = ONE_CLASS;
}else if(IsDlgButtonChecked(IDC_EPS_SVR_RADIO) == BST_CHECKED){
param.svm_type = EPSILON_SVR;
}else{
param.svm_type = NU_SVR;
}
if(IsDlgButtonChecked(IDC_KER_LINEAR_RADIO) == BST_CHECKED){
param.svm_type = LINEAR;
}else if(IsDlgButtonChecked(IDC_KER_POLY_RADIO) == BST_CHECKED){
param.svm_type = POLY;
}else if(IsDlgButtonChecked(IDC_KER_RBF_RADIO) == BST_CHECKED){
param.svm_type = RBF;
}else if(IsDlgButtonChecked(IDC_KER_SIG_RADIO) == BST_CHECKED){
param.svm_type = SIGMOID;
}else{
param.svm_type = PRECOMPUTED;
}[/code]
<br/>
the enum values for C_SVC, NU_SVC, ONE_CLASS, EPSILON_SVR, NU_SVR are 0, 1, 2, 3, 4; and the enum values for LINEAR, POLY, RBF, SIGMOID, PRECOMPUTED are 0, 1, 2, 3, 4; so its obvious wrong for the svm_type
(which should be 0) shown in the message box, so whats wrong?
cheers
View the full article