Skip to content
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

[DOC] Add Quantile forest examples #147

Merged
merged 14 commits into from
Oct 24, 2023
Merged

[DOC] Add Quantile forest examples #147

merged 14 commits into from
Oct 24, 2023

Conversation

SUKI-O
Copy link
Member

@SUKI-O SUKI-O commented Oct 16, 2023

Fixes #87

Changes proposed in this pull request:

  • Add examples to show how to use RandomForestRegressor class to genera quantile predictions.

Before submitting

  • I've read and followed all steps in the Making a pull request
    section of the CONTRIBUTING docs.
  • I've updated or added any relevant docstrings following the syntax described in the
    Writing docstrings section of the CONTRIBUTING docs.
  • If this PR fixes a bug, I've added a test that will fail without my fix.
  • If this PR adds a new feature, I've added tests that sufficiently cover my new functionality.

After submitting

  • All GitHub Actions jobs for my pull request have passed.

@codecov
Copy link

codecov bot commented Oct 16, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (359ea75) 89.66% compared to head (2c30bd0) 89.66%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #147   +/-   ##
=======================================
  Coverage   89.66%   89.66%           
=======================================
  Files          41       41           
  Lines        3367     3367           
=======================================
  Hits         3019     3019           
  Misses        348      348           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@adam2392
Copy link
Collaborator

The 4 rendered artifacts: https://output.circle-artifacts.com/output/job/5db6e8d1-7cbe-4795-80d5-bbe5ab46dde6/artifacts/0/dev/use.html

@SUKI-O perhaps we can put this into its own section? I.e. Quantile Predictions? See the other example sections. This will help group the examples better.

Copy link
Collaborator

@adam2392 adam2392 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great start and very encouraging that the simulations look very similar to those in quantile-forests.

Can you try to break up each example to make them easier to read?

For example, see the following example: https://output.circle-artifacts.com/output/job/5db6e8d1-7cbe-4795-80d5-bbe5ab46dde6/artifacts/0/dev/auto_examples/outlier_detection/plot_extended_isolation_forest.html#sphx-glr-auto-examples-outlier-detection-plot-extended-isolation-forest-py

In addition, perhaps we can be more explicit about what each example should show. What is the take-away message? E.g. in the right-skewed simulation, is it that QORF is better than standard ORF? What does better mean?

examples/plot_quantile_interpolation_with_RF.py Outdated Show resolved Hide resolved
examples/plot_quantile_regression_intervals_with_RF.py Outdated Show resolved Hide resolved
examples/plot_quantile_vs_standard_oblique_forest.py Outdated Show resolved Hide resolved
examples/plot_quantile_toy_example_with_RF.py Outdated Show resolved Hide resolved
@adam2392 adam2392 marked this pull request as ready for review October 17, 2023 14:51
@adam2392 adam2392 marked this pull request as draft October 17, 2023 14:51
Copy link
Member

@sampan501 sampan501 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good after removing the print statements that @adam2392 referenced

@SUKI-O SUKI-O marked this pull request as ready for review October 18, 2023 15:38
@SUKI-O SUKI-O requested a review from adam2392 October 18, 2023 18:32
@adam2392
Copy link
Collaborator

https://output.circle-artifacts.com/output/job/eb2e193e-9f05-4d58-903b-41b9a7cf478c/artifacts/0/dev/use.html

I don't see the examples rendered now so there's probably an error in your change. You can leverage the development guide to build the docs locally for yourself to peruse.

@adam2392
Copy link
Collaborator

You are probably missing a section header which is rendered from the README files inside each subsection

Copy link
Collaborator

@adam2392 adam2392 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know the examples are copied "as-is" from quantile-forests, but I think their documentation is not as comprehensive as I would've liked.

The examples could use a bit more explanation. Otherwise, someone reading these have no idea how to interpret the results, or the figures. WDYT @SUKI-O @sampan501 @PSSF23 ?

doc/whats_new/v0.3.rst Outdated Show resolved Hide resolved
examples/quantile_predictions/README.txt Outdated Show resolved Hide resolved
Co-authored-by: Adam Li <adam2392@gmail.com>
Copy link
Member

@sampan501 sampan501 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the only thing missing is a few comments about what exactly you are plotting and how to interpret the plots and we should be good to go

Copy link
Collaborator

@adam2392 adam2392 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few minor changes and then LGTM.

Generally, it's useful to render the docs locally to see if there's any formatting issues.

Xref: https://output.circle-artifacts.com/output/job/b7f1c854-cb46-4c2d-8a79-57965fe88bd9/artifacts/0/dev/use.html#quantile-predictions-with-random-forest

…e_forest.py

Co-authored-by: Adam Li <adam2392@gmail.com>
SUKI-O and others added 2 commits October 24, 2023 14:44
…_RF.py

Co-authored-by: Adam Li <adam2392@gmail.com>
…_RF.py

Co-authored-by: Adam Li <adam2392@gmail.com>
@adam2392 adam2392 enabled auto-merge (squash) October 24, 2023 19:16
@adam2392 adam2392 merged commit cedcb1e into main Oct 24, 2023
25 checks passed
@sampan501 sampan501 deleted the quantile_forest_exp branch October 24, 2023 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add quantile-regression forest examples
3 participants