New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
id3 algorithm #1947
id3 algorithm #1947
Conversation
mazumdarparijat
commented
Mar 6, 2014
- id3 algorithm for decision trees implemented
- Completed Issue #325 ID3 classification trees implementation #1110
@iglesias I have addressed monicadragen's PR on id3. While I had to rework most parts of the original commits, I have tried to keep the things same wherever possible. Please have a look! |
{ | ||
float64_t gain = informational_gain_attribute(i,feats,class_labels); | ||
|
||
if(gain > max){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (asdasd)
(whitespace)
Hi @mazumdarparijat I suggest the following approach:
This should not include more than 3 files and not more than a few hundred lines. It will be much easier to think about the code, what it is supposed to do, how it should be documented, what unit tests should there be. Then you add another class (few files) and their unit tests. And so on. What do you think about that? |
{ | ||
|
||
SG_REF(feats); | ||
SG_UNREF(m_feats); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix indenting... and this is for the whole file.
most editor has a script for this nowadays
the problems with this patch is actually are:
thank you for the patch. contrary to @karlnapf comment, i think you could continue this pull request, as soon as you remove all those things i've mentioned above, the PR will be much much less, and easier to review |
@@ -0,0 +1,97 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
header file among examples? why?
this file should not be here (examples) at all...
@vigsterkr These (classifier_multiclass_id3.cpp/.h) are actually artefacts of monicadragan's patch that I applied. I moved this file, renamed and also refactored it massively. I am not sure why this is showing up still. |
@vigsterkr I agree with you on the structure. The point is that it is impossible to review all of this at once. Rather add things one-by-one. If there is a refactoring of some existing class, do that first (including tests etc) Then, in a separate PR, add new classes. Then finally examples. |
@karlnapf yeah like the |
@vigsterkr exactly like that ;) |