Esempio n. 1
0
 void resetParam(AzParam &azp, const char *pfx, bool is_warmstart) {
   azp.reset_prefix(pfx); 
   if (!is_warmstart) {
     azp.vStr(kw_pl_type, &s_pl_type); 
     if (s_pl_type.length() > 0) ptyp = *s_pl_type.point(); 
     else                        ptyp = AzpPoolingDflt_None; 
     azp.vInt(kw_pl_num, &pl_num); 
     azp.vInt(kw_pl_sz, &pl_sz); 
     azp.vInt(kw_pl_step, &pl_step); 
     azp.swOff(&do_pl_simple_grid, kw_no_pl_simple_grid); 
   }
   azp.reset_prefix(); 
 }
Esempio n. 2
0
/*------------------------------------------------------------------*/
void AzOptOnTree::resetParam(AzParam &p)
{
  p.vFloat(kw_lambda, &lambda); 
  p.vFloat(kw_sigma, &sigma); 
  p.vInt(kw_max_ite_num, &max_ite_num); 
  p.vFloat(kw_eta, &eta); 
  p.vFloat(kw_exit_delta, &exit_delta); 
  p.vFloat(kw_max_delta, &max_delta); 
  p.swOn(&doUseAvg, kw_doUseAvg); 
  p.swOff(&doIntercept, kw_not_doIntercept); /* useless but keep this for compatibility */
  p.swOn(&doIntercept, kw_doIntercept); 

  if (max_ite_num <= 0) {
    max_ite_num = max_ite_num_dflt_oth; 
    if (AzLoss::isExpoFamily(loss_type)) {
      max_ite_num = max_ite_num_dflt_expo; 
    }
  }
}