kzwkt / wnd-charm

Automatically exported from code.google.com/p/wnd-charm
0 stars 0 forks source link

forgot to set train_frac_p in check_split_params() #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

In wndchrm.cpp split_and_test(), after you read in any fit file and it calls 
check_split_params(), it printf's out a little summary (line 349), like this:

samples per image=1, training images: 38, testing images 12 training 
fraction=0.000000

Please change check_split_params() to set train_frac_p to something reasonable, 
and also change the printf statement to report training images PER CLASS and 
testting images PER CLASS.

Original issue reported on code.google.com by christop...@nih.gov on 18 Feb 2011 at 1:16

GoogleCodeExporter commented 9 years ago
This is wrong.  train_frac must be set to 0 in order for TrainingSet->split() 
to make balanced training sets.  If its not 0, then it will use the ratio 
per-class, and ignore the testing/training images setting!

I realize that the debug line is completely deceptive as to what will happen.  
check_split_params() sets train_frac_p to 0 even if you specified a -r (without 
the '#' decorator) because the default is balanced, which means split() uses 
the straining images and testing images instead of the fraction.  If the user 
specified a -r (instead of -i and -j), check_split_params() simply sets the -i 
and -j params for you using the -r you gave.  So the fraction is always 0 
unless you have -r#, which is the intent.

Original comment by i...@cathilya.org on 18 Feb 2011 at 2:49

GoogleCodeExporter commented 9 years ago
OK, so how do I mark this as "fixed" or "not a bug"?

Original comment by i...@cathilya.org on 18 Feb 2011 at 2:50

GoogleCodeExporter commented 9 years ago
I fixed the output to only report the frac when its actually in play (i.e. when 
-r# is set).

Original comment by i...@cathilya.org on 19 Feb 2011 at 4:45