"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "main/wagon_main.cc" between
speech_tools-2.4-release.tar.gz and speech_tools-2.5.0-release.tar.gz

About: The speech_tools - Edinburgh Speech Tools Library (used by the Festival Speech Synthesis System).

wagon_main.cc  (speech_tools-2.4-release):wagon_main.cc  (speech_tools-2.5.0-release)
skipping to change at line 220 skipping to change at line 220
"-swlimit <float> {0.0}\n"+ "-swlimit <float> {0.0}\n"+
" Percentage necessary improvement for stepwise,\n"+ " Percentage necessary improvement for stepwise,\n"+
" may be negative.\n"+ " may be negative.\n"+
"-swopt <string> Parameter to optimize for stepwise, for \n"+ "-swopt <string> Parameter to optimize for stepwise, for \n"+
" classification options are correct or entropy\n"+ " classification options are correct or entropy\n"+
" for regression options are rmse or correlation\n"+ " for regression options are rmse or correlation\n"+
" correct and correlation are the defaults\n"+ " correct and correlation are the defaults\n"+
"-balance <float> For derived stop size, if dataset at node, divided\n" + "-balance <float> For derived stop size, if dataset at node, divided\n" +
" by balance is greater than stop it is used as stop\n" + " by balance is greater than stop it is used as stop\n" +
" if balance is 0 (default) always use stop as is.\n"+ " if balance is 0 (default) always use stop as is.\n"+
"-cos Use mean cosine distance rather than gausian (TBD).\
n"+
"-dof <float> Randomly dropout feats in training (prob).\n"+
"-dos <float> Randomly dropout samples in training (prob).\n"+
"-vertex_output <string> Output <mean> or <best> of cluster\n"+ "-vertex_output <string> Output <mean> or <best> of cluster\n"+
"-held_out <int> Percent to hold out for pruning\n"+ "-held_out <int> Percent to hold out for pruning\n"+
"-max_questions <int> Maximum number of questions in tree\n"+
"-heap <int> {210000}\n"+ "-heap <int> {210000}\n"+
" Set size of Lisp heap, should not normally need\n"+ " Set size of Lisp heap, should not normally need\n"+
" to be changed from its default, only with *very*\n"+ " to be changed from its default, only with *very*\n"+
" large description files (> 1M)\n"+ " large description files (> 1M)\n"+
"-omp_nthreads <int> {1}\n"+
" Set number of OMP threads to run wagon in\n"+
" tree building; this overrides $OMP_NUM_THREADS\n"+
" (ignored if not supported)\n"+
"-noprune No (same class) pruning required\n", "-noprune No (same class) pruning required\n",
files, al); files, al);
if (al.present("-held_out")) if (al.present("-held_out"))
wgn_held_out = al.ival("-held_out"); wgn_held_out = al.ival("-held_out");
if (al.present("-dof"))
wgn_dropout_feats = al.fval("-dof");
if (al.present("-dos"))
wgn_dropout_samples = al.fval("-dos");
if (al.present("-cos"))
wgn_cos = al.ival("-cos");
if (al.present("-balance")) if (al.present("-balance"))
wgn_balance = al.fval("-balance"); wgn_balance = al.fval("-balance");
if ((!al.present("-desc")) || ((!al.present("-data")))) if ((!al.present("-desc")) || ((!al.present("-data"))))
{ {
cerr << argv[0] << ": missing description and/or datafile" << endl; cerr << argv[0] << ": missing description and/or datafile" << endl;
cerr << "use -h for description of arguments" << endl; cerr << "use -h for description of arguments" << endl;
} }
if (al.present("-quiet")) if (al.present("-quiet"))
wgn_quiet = TRUE; wgn_quiet = TRUE;
if (al.present("-verbose")) if (al.present("-verbose"))
wgn_verbose = TRUE; wgn_verbose = TRUE;
if (al.present("-stop")) if (al.present("-stop"))
wgn_min_cluster_size = atoi(al.val("-stop")); wgn_min_cluster_size = atoi(al.val("-stop"));
if (al.present("-max_questions"))
wgn_max_questions = atoi(al.val("-max_questions"));
if (al.present("-noprune")) if (al.present("-noprune"))
wgn_prune = FALSE; wgn_prune = FALSE;
if (al.present("-predictee")) if (al.present("-predictee"))
wgn_predictee_name = al.val("-predictee"); wgn_predictee_name = al.val("-predictee");
if (al.present("-count_field")) if (al.present("-count_field"))
wgn_count_field_name = al.val("-count_field"); wgn_count_field_name = al.val("-count_field");
if (al.present("-swlimit")) if (al.present("-swlimit"))
stepwise_limit = al.fval("-swlimit"); stepwise_limit = al.fval("-swlimit");
if (al.present("-frs")) // number of partitions to try in floats if (al.present("-frs")) // number of partitions to try in floats
wgn_float_range_split = atof(al.val("-frs")); wgn_float_range_split = atof(al.val("-frs"));
skipping to change at line 296 skipping to change at line 312
wagon_type = wn_decision_list; wagon_type = wn_decision_list;
WNode *tree; WNode *tree;
float score; float score;
LISP ignores = NIL; LISP ignores = NIL;
siod_init(al.ival("-heap")); siod_init(al.ival("-heap"));
if (al.present("-ignore")) if (al.present("-ignore"))
{ {
EST_String ig = al.val("-ignore"); EST_String ig = (const char *)al.sval("-ignore");
if (ig[0] == '(') if (ig[0] == '(')
ignores = read_from_string(ig); ignores = read_from_string(ig);
else else
ignores = vload(ig,1); ignores = vload(ig,1);
} }
// Load in the data // Load in the data
wgn_load_datadescription(al.val("-desc"),ignores); wgn_load_datadescription(al.val("-desc"),ignores);
wgn_load_dataset(wgn_dataset,al.val("-data")); wgn_load_dataset(wgn_dataset,al.val("-data"));
if (al.present("-distmatrix") && if (al.present("-distmatrix") &&
(wgn_DistMatrix.num_rows() < wgn_dataset.length())) (wgn_DistMatrix.num_rows() < wgn_dataset.length()))
skipping to change at line 352 skipping to change at line 368
feats_end, feats_end,
feats_start, feats_start,
wgn_VertexTrack.num_channels()); wgn_VertexTrack.num_channels());
exit(-1); exit(-1);
} }
for (i=feats_end+1; i<wgn_VertexTrack.num_channels(); i++) for (i=feats_end+1; i<wgn_VertexTrack.num_channels(); i++)
wgn_VertexFeats.a(0,i) = 0.0; /* don't do feats after end */ wgn_VertexFeats.a(0,i) = 0.0; /* don't do feats after end */
} }
if (al.present("-track_feats")) if (al.present("-track_feats"))
{ /* overrides start and end numbers */ { /* overrides start and end numbers */
EST_String wagon_track_features = al.val("-track_feats"); EST_String wagon_track_features = (const char *)al.val("-track_feats");
set_Vertex_Feats(wgn_VertexFeats,wagon_track_features); set_Vertex_Feats(wgn_VertexFeats,wagon_track_features);
} }
// printf("Track feats\n"); // printf("Track feats\n");
// for (i=0; i<wgn_VertexTrack.num_channels(); i++) // for (i=0; i<wgn_VertexTrack.num_channels(); i++)
// if (wgn_VertexFeats.a(0,i) > 0.0) // if (wgn_VertexFeats.a(0,i) > 0.0)
// printf("%d ",i); // printf("%d ",i);
// printf("\n"); // printf("\n");
if (al.present("-unittrack")) if (al.present("-unittrack"))
{ /* contains two features, a start and length. start indexes */ { /* contains two features, a start and length. start indexes */
/* into VertexTrack to the first vector in the segment */ /* into VertexTrack to the first vector in the segment */
wgn_UnitTrack.load(al.val("-unittrack")); wgn_UnitTrack.load(al.val("-unittrack"));
} }
#ifdef OMP_WAGON
if (al.present ("-omp_nthreads"))
{
omp_set_num_threads(atoi(al.val("-omp_nthreads")));
}else{
omp_set_num_threads(1);
}
#else
if (al.present ("-omp_nthreads"))
{
printf("wagon: -omp_nthreads ignored: not supported in this build.\n");
}
#endif
if (al.present("-test")) if (al.present("-test"))
wgn_load_dataset(wgn_test_dataset,al.val("-test")); wgn_load_dataset(wgn_test_dataset,al.val("-test"));
// Build and test the model // Build and test the model
if (al.present("-stepwise")) if (al.present("-stepwise"))
tree = wagon_stepwise(stepwise_limit); tree = wagon_stepwise(stepwise_limit);
else if (wagon_type == wn_decision_tree) else if (wagon_type == wn_decision_tree)
tree = wgn_build_tree(score); // default operation tree = wgn_build_tree(score); // default operation
else if (wagon_type == wn_decision_list) else if (wagon_type == wn_decision_list)
// dlist is printed with build_dlist rather than returned // dlist is printed with build_dlist rather than returned
 End of changes. 8 change blocks. 
2 lines changed or deleted 33 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)