kzwkt / wnd-charm

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

only use class label as value if it's numeric #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

In TrainingSet.cpp TrainingSet::ReadFromFile() line 353 should check if class 
label is numeric before trying to atof() it and set the 
signiture's->sample_value.

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

GoogleCodeExporter commented 9 years ago
I'm not sure about that.  You mean leave it uninitialized?  atof() will return 
0 if it can't be interpreted numerically.  What value should it be set to if 
its not numeric - we can't set it to "NULL".  NAN?

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

GoogleCodeExporter commented 9 years ago
This should be taken care of in various later changes - specifically, the 
atof() is only attempted if the is_numeric flag is set for the dataset.

Please reopen if this is still an issue.

Original comment by i...@cathilya.org on 17 Mar 2011 at 5:42