-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Document HoeffdingTree
#3572
Document HoeffdingTree
#3572
Conversation
@rcurtin it is ready to be reviewed ? |
Yep, ready for review 👍 |
Perfect, will give it a chance tomorrow |
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.
Very good, similar comments to the last review of the logistic regression class the following links are not working:
Also regarding the fitness function, it would be great to have more details about them if we have many, because currently, we are only mentioning the Gini Impurity.
I am not an expert in trees, so I have no idea how many fitness functions you can have, or what we have already implemented.
The last thing is double
about the precision, but apart from that great work, we can merge this really soon
const bool batchTraining, | ||
const double successProbability); |
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.
Can we make the sucessProbability
as ElemType?
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.
I didn't do this, mostly so that when you switch to using a different ElemType
, as few things change in the API as possible. (That will also make the documentation job in #3584 easier.) For something like the success probability, using a double
or a float
or whatever other element type really won't make any serious difference, so I think it might be easier to leave as-is.
const arma::Row<size_t>& labels, | ||
const size_t numClasses, | ||
const bool batchTraining, | ||
const double successProbability, |
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.
Same as above
const size_t numClasses = 0); | ||
const size_t numClasses, | ||
const bool batchTraining, | ||
const double successProbability, |
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.
Same as above
Yep, the invalid links will be handled in a follow-up PR. 👍
Good point. I added a sentence or two with some links in b74b8bc; let me know what you think. 👍
In this case, actually the way |
All is good from my side, and yes one |
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.
Second approval provided automatically after 24 hours. 👍
Here's rendered documentation: https://www.ratml.org/misc/mlpack-markdown-doc/hoeffding_tree.html
As with a lot of the previous examples, I had to make fairly intrusive changes to
Train()
to match the API required by the hyperparameter tuner. Because we don't yet require C++17 (where I could usestd::optional
), there are a lot of overloads. Once we do, the code can be cleaned up.The only other functionality I added was a user-facing
Reset()
function to reset the tree, plus a few accessors to get properties of the trees.I also added a number of tests for everything that I implemented, as well as a test to make sure that training on floating-point data works.