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

Rework quantile to interval format #377

Merged
merged 8 commits into from
Nov 15, 2023

Conversation

nikosbosse
Copy link
Contributor

This (very modular and small PR 🐶 🐕 )

  • creates a new function quantile_to_interval() with two methods for vectors and for a data.frame
  • the function transforms your data from a quantile format to an interval format (which is needed to compute the weighted interval score)
  • it replaces an existing function (quantile_to_range_long() which does the same thing for data.frames)

Copy link

codecov bot commented Nov 2, 2023

Codecov Report

❗ No coverage uploaded for pull request base (intermediate-clean-up@2f33bdc). Click here to learn what that means.
The diff coverage is n/a.

❗ Current head 6981fd6 differs from pull request most recent head 88acb9a. Consider uploading reports for the commit 88acb9a to get more accurate results

@@                   Coverage Diff                    @@
##             intermediate-clean-up     #377   +/-   ##
========================================================
  Coverage                         ?   85.54%           
========================================================
  Files                            ?       20           
  Lines                            ?     1570           
  Branches                         ?        0           
========================================================
  Hits                             ?     1343           
  Misses                           ?      227           
  Partials                         ?        0           

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

@nikosbosse nikosbosse changed the base branch from main to intermediate-clean-up November 2, 2023 11:49
Base automatically changed from intermediate-clean-up to scoringutils-review November 7, 2023 13:48
@seabbs
Copy link
Contributor

seabbs commented Nov 7, 2023

Do you want this reviewed @nikosbosse?

@nikosbosse
Copy link
Contributor Author

Yes please!

@nikosbosse nikosbosse requested a review from seabbs November 7, 2023 14:47
Copy link
Contributor

@seabbs seabbs left a comment

Choose a reason for hiding this comment

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

The actual functionality is all fine but quite messy from a software dev perspective in terms of code listing and handling imports.

Only major comment is about the sister function that maps intervals back to quantiles.

R/score_quantile.R Show resolved Hide resolved
quantile_to_interval <- function(...) {
UseMethod("quantile_to_interval")
}

Copy link
Contributor

Choose a reason for hiding this comment

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

random space

R/utils_data_handling.R Show resolved Hide resolved
R/utils_data_handling.R Show resolved Hide resolved
R/utils_data_handling.R Show resolved Hide resolved
R/utils_data_handling.R Show resolved Hide resolved
R/utils_data_handling.R Show resolved Hide resolved
R/utils_data_handling.R Show resolved Hide resolved
tests/testthat/test-summarise_scores.R Show resolved Hide resolved
tests/testthat/test-utils_data_handling.R Show resolved Hide resolved
Copy link
Contributor

@seabbs seabbs left a comment

Choose a reason for hiding this comment

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

The actual functionality is all fine but quite messy from a software dev perspective in terms of code listing and handling imports.

Only major comment is about the sister function that maps intervals back to quantiles.

@seabbs seabbs mentioned this pull request Nov 15, 2023
@nikosbosse nikosbosse merged commit 9ba205a into scoringutils-review Nov 15, 2023
@nikosbosse nikosbosse deleted the rework-quantile-to-interval-format branch November 15, 2023 14:31
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.

2 participants