-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Bootstrap strategy for RandomForest #3829
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
Conversation
|
@Patschkowski thank you for this PR, looking forward to having this feature added, could you please fix the error that is happening on the Mac CI infrastructure? Many thanks |
|
@shrit builds are now OK but the documentation build complains about a dead link that is unrelated to my changes. How to handle? |
|
not a problem, we can merge it with this one failing, many thanks. |
rcurtin
left a comment
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.
Thanks for the working on this @Patschkowski! I think it will be nice functionality to add. I have a handful of comments; I hope they are helpful. Let me know if I can clarify any of them. Other things to handle before merge (small issues but I want to write them down at least):
- update HISTORY.md to point out the addition
- add a comment to
random_forest.hppin the definition ofRandomForestto indicate thatUseWeightswill go away in mlpack 5.0.0 - add your name to the list of contributors if you want :)
|
@Patschkowski OS X failure is not related, we are trying to fix this in another PR |
rcurtin
left a comment
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.
Thanks for the changes @Patschkowski! I am sure you are getting tired of these reviews by now but there are a couple more small things to handle. Most specifically the example in the documentation doesn't compile for two reasons: one of them is something wrong in the code itself, and the other is something wrong in code that I wrote a long time ago that happens to impact yours.
If you can add these changes to your PR and fix the other issues in the example then that should build correctly:
I left instructions in the comments on how you can build locally, but if you prefer, I'm happy to test that myself when you push changes. (Normally the documentation snippet build job would get this, but that is currently not working as I fix it in another branch. Until then I don't mind checking by hand.)
Thanks again. These last comments really are just wrapping up, as soon as we can get the documentation to build correctly and the example to be clear then let's merge.
Co-authored-by: Ryan Curtin <[email protected]>
Co-authored-by: Ryan Curtin <[email protected]>
Co-authored-by: Ryan Curtin <[email protected]>
Co-authored-by: Ryan Curtin <[email protected]>
Co-authored-by: Ryan Curtin <[email protected]>
Co-authored-by: Ryan Curtin <[email protected]>
Co-authored-by: Ryan Curtin <[email protected]>
|
@rcurtin , hope we are there now. Waiting your review |
rcurtin
left a comment
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.
Thanks @Patschkowski! Let's get this merged finally. :)
I pushed one commit that makes a couple small changes:
- The lack of a newline at the end of
random_forest.mdactually breaks thescripts/test-docs.shscript... I could fix the script, or I could add a newline at the end of the file, which is a good thing anyway, so added the newline. - For the test code to compile, there is no
using namespace mlpackanywhere, so I had to fully qualify all the names withmlpack::. - I also fixed a comment that wrapped but didn't have a leading
//. - Lastly I also made the example give a little bit of output so that if a user runs it they at least get something.
Thanks so much for the hard work on this! I appreciate your dedication to the effort.
| cmake_policy(SET CMP0159 NEW) # file(STRINGS) with REGEX updates CMAKE_MATCH_<n> | ||
| if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.29") | ||
| cmake_policy(SET CMP0159 NEW) # file(STRINGS) with REGEX updates CMAKE_MATCH_<n> | ||
| endif() |
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.
@shrit just FYI, this looks necessary for older CMake versions. If you want to update mlpack.cmake downstream in the examples repo, once this is merged you could pull the change here.
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.
yes for sure, make sense.
| const double minGainSplit, | ||
| arma::vec& splitInfo, | ||
| AuxiliarySplitInfo& aux); | ||
| static double SplitIfBetter(const double bestGain, |
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.
Nice catch! This does need to be static indeed.
| static size_t CalculateDirection( | ||
| const ElemType& point, | ||
| const double& splitInfo, | ||
| const arma::vec& splitInfo, |
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.
Thanks also for this fix!
| b_int (0), | ||
| state(0), | ||
| a_int(0), | ||
| b_int(0), |
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.
Thanks for these fixes also---I know it was not directly a part of your PR. (And all the other builds should be fixed very shortly... I'm just finishing up #3893 this morning...)
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. 👍
|
Thanks @Patschkowski! Glad to finally have this merged 👍 |
Pull-Request for #3820