*best_p = -1;
if(param->solver_type == L2R_LR || param->solver_type == L2R_L2LOSS_SVC)
{
- if( start_C <= 0)
+ if(start_C <= 0)
start_C = calc_start_C(prob, ¶m_tmp);
double max_C = 1024;
+ start_C = min(start_C, max_C);
double best_C_tmp, best_score_tmp;
- start_C = min(start_C, max_C);
+
find_parameter_C(prob, ¶m_tmp, start_C, max_C, &best_C_tmp, &best_score_tmp, fold_start, perm, subprob, nr_fold);
+
*best_C = best_C_tmp;
*best_score = best_score_tmp;
}
for(; i >= 0; i--)
{
param_tmp.p = i*max_p/num_p_steps;
- double start_C_tmp;
- if( start_C <= 0)
+ double start_C_tmp;
+ if(start_C <= 0)
start_C_tmp = calc_start_C(prob, ¶m_tmp);
else
start_C_tmp = start_C;
- double best_C_tmp, best_score_tmp;
start_C_tmp = min(start_C_tmp, max_C);
+ double best_C_tmp, best_score_tmp;
+
find_parameter_C(prob, ¶m_tmp, start_C_tmp, max_C, &best_C_tmp, &best_score_tmp, fold_start, perm, subprob, nr_fold);
+
if(best_score_tmp < *best_score)
{
*best_p = param_tmp.p;
-B bias : if bias >= 0, instance x becomes [x; bias]; if < 0, no bias term added (default -1)
-wi weight: weights adjust the parameter C of different classes (see README for details)
-v n: n-fold cross validation mode
- "-C : find parameters (C for -s 0, 2 and C, p for -s 11)\n"
+ -C : find parameters (C for -s 0, 2 and C, p for -s 11)\n
-q : quiet mode (no outputs)
"""
prob, param = None, None