tarbaevbb / wnd-charm

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

Class matching problem #30

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
-->What steps will reproduce the problem?
run following command:   
[eckleyd@lgopt14 wndchrm-1.30.227]$ wndchrm classify -w 
/lgopt4/colettace/data/terminalbulb/images/small_feature_set/small.fit 
/iicbu/d1iicbu/mantillasm/25Cworms/25C.fit /home/eckleyd/25Cclassifywnn.html

see this output:
Processing training set 
'/lgopt4/colettace/data/terminalbulb/images/small_feature_set/small.fit'.
----------
Summary of 
'/lgopt4/colettace/data/terminalbulb/images/small_feature_set/small.fit' (970 
samples total, 1 samples per image):
'Class label' (interpreted value) number of samples.
'00_day'    (0) 106
'02_day'    (2) 218
'04_day'    (4) 159
'06_day'    (6) 176
'08_day'    (8) 195
'10_day'    (10)    62
'12_day'    (12)    54
----------
Processing test set '/iicbu/d1iicbu/mantillasm/25Cworms/25C.fit'.
----------
Summary of '/iicbu/d1iicbu/mantillasm/25Cworms/25C.fit' (440 samples total, 1 
samples per image):
'Class label' (interpreted value) number of samples.
'00_day'    (0) 113
'02_day'    (2) 221
'04_day'    (4) 106
----------
Segmentation fault
[eckleyd@lgopt14 wndchrm-1.30.227]$ 

-->What is the expected output?
an html style report
 -->What do you see instead?
seg fault

Please use labels and text to provide additional information.

Original issue reported on code.google.com by dmarkeck...@gmail.com on 20 May 2011 at 4:11

Attachments:

GoogleCodeExporter commented 9 years ago
This is fixed in revision 239 (1.30 branch and trunk).
When class labels in a specified test set don't match any in the training set, 
instead of reassigning them to the unknown class (class 0), the class 
assignments are kept as read.  Instead, a map of training set class indexes is 
kept in the test set (train_class array).  This array is allocated and 
populated in wndchrm.cpp.  The sample class is determined from this array in 
ClassifyImage, or, if the array is NULL, it is assumed that the indexes match 
b/w the test and train set.
If the array is not NULL, and the test label has no match, then the class index 
is 0 (unknown class).

Original comment by i...@cathilya.org on 20 May 2011 at 8:53