-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Explicit NA
-handling 🛠️
#10
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* The `accuracy()`-function now handles missings values according to na.rm * The `accuracy()`-function uses `std::vector` to offset the loss in speed from missing values checking * Updated tools; the modifyRcppExports is now more dynamic and uses regex instead of hardcoded functions. NOTE: All checks passed locally.
* The `zerooneloss()`-function now accepts the argument `na.rm` * Internal optimaztion of the function to make it faster
* The NEWS have been updated to reflect the new changes.
* All functions now has an argument `na.rm` to explicitly handle missing values. * Migrated to std::vector instead of NumericVector * Fixed a small bug in `accuracy.Rd`
* Unit-tests: The unit-tests now tests if misssing values are being handled according to the `na.rm`-argument * NA-handling in functions: `rsq()`-, `ccc()`-, `mae()`-, `mape()`-, `mse()`-, `pinball()`-, `rae()`-, `rmse()`-, `rrmse()`- and `smape()`-functions now all uses `std::vector` instead of `NumericVector`, and has explicit NA-handling. All tests passed locally.
serkor1
added
documentation
Improvements or additions to documentation
enhancement
New feature or request
labels
Dec 6, 2024
serkor1
added a commit
that referenced
this pull request
Dec 6, 2024
* [UPDATE] `accuracy()`-function * The `accuracy()`-function now handles missings values according to na.rm * The `accuracy()`-function uses `std::vector` to offset the loss in speed from missing values checking * Updated tools; the modifyRcppExports is now more dynamic and uses regex instead of hardcoded functions. NOTE: All checks passed locally. * [UPDATE] `zerooneloss()`-function 🚀 * The `zerooneloss()`-function now accepts the argument `na.rm` * Internal optimaztion of the function to make it faster * [DOCUMENTATION] Updated NEWS 📚 * The NEWS have been updated to reflect the new changes. * [UPDATE] `RMSE()`- `RMSLE()`- and `huberloss()` 🚀 * All functions now has an argument `na.rm` to explicitly handle missing values. * Migrated to std::vector instead of NumericVector * Fixed a small bug in `accuracy.Rd` * [UPDATE] Unit-tests and NA-handlings 🔥 * Unit-tests: The unit-tests now tests if misssing values are being handled according to the `na.rm`-argument * NA-handling in functions: `rsq()`-, `ccc()`-, `mae()`-, `mape()`-, `mse()`-, `pinball()`-, `rae()`-, `rmse()`-, `rrmse()`- and `smape()`-functions now all uses `std::vector` instead of `NumericVector`, and has explicit NA-handling. All tests passed locally. * [VERSION-BUMP] 0.1-0 ---> 0.1-1 🪜 > [!NOTE] > > Checks fail on PR for OSX. But all else passes.
serkor1
added a commit
that referenced
this pull request
Dec 8, 2024
* Explicit `NA`-handling 🛠️ (#10) * [UPDATE] `accuracy()`-function * The `accuracy()`-function now handles missings values according to na.rm * The `accuracy()`-function uses `std::vector` to offset the loss in speed from missing values checking * Updated tools; the modifyRcppExports is now more dynamic and uses regex instead of hardcoded functions. NOTE: All checks passed locally. * [UPDATE] `zerooneloss()`-function 🚀 * The `zerooneloss()`-function now accepts the argument `na.rm` * Internal optimaztion of the function to make it faster * [DOCUMENTATION] Updated NEWS 📚 * The NEWS have been updated to reflect the new changes. * [UPDATE] `RMSE()`- `RMSLE()`- and `huberloss()` 🚀 * All functions now has an argument `na.rm` to explicitly handle missing values. * Migrated to std::vector instead of NumericVector * Fixed a small bug in `accuracy.Rd` * [UPDATE] Unit-tests and NA-handlings 🔥 * Unit-tests: The unit-tests now tests if misssing values are being handled according to the `na.rm`-argument * NA-handling in functions: `rsq()`-, `ccc()`-, `mae()`-, `mape()`-, `mse()`-, `pinball()`-, `rae()`-, `rmse()`-, `rrmse()`- and `smape()`-functions now all uses `std::vector` instead of `NumericVector`, and has explicit NA-handling. All tests passed locally. * [VERSION-BUMP] 0.1-0 ---> 0.1-1 🪜 > [!NOTE] > > Checks fail on PR for OSX. But all else passes. * [BUG-FIX] `plot()`-method for `ROC()` and `prROC()` 🔨 (#11) * The plots are now correctly displaying lines when `panels = FALSE` * NEWS.md updated accordingly.
serkor1
added a commit
that referenced
this pull request
Dec 8, 2024
* [UPDATE] `accuracy()`-function * The `accuracy()`-function now handles missings values according to na.rm * The `accuracy()`-function uses `std::vector` to offset the loss in speed from missing values checking * Updated tools; the modifyRcppExports is now more dynamic and uses regex instead of hardcoded functions. NOTE: All checks passed locally. * [UPDATE] `zerooneloss()`-function 🚀 * The `zerooneloss()`-function now accepts the argument `na.rm` * Internal optimaztion of the function to make it faster * [DOCUMENTATION] Updated NEWS 📚 * The NEWS have been updated to reflect the new changes. * [UPDATE] `RMSE()`- `RMSLE()`- and `huberloss()` 🚀 * All functions now has an argument `na.rm` to explicitly handle missing values. * Migrated to std::vector instead of NumericVector * Fixed a small bug in `accuracy.Rd` * [UPDATE] Unit-tests and NA-handlings 🔥 * Unit-tests: The unit-tests now tests if misssing values are being handled according to the `na.rm`-argument * NA-handling in functions: `rsq()`-, `ccc()`-, `mae()`-, `mape()`-, `mse()`-, `pinball()`-, `rae()`-, `rmse()`-, `rrmse()`- and `smape()`-functions now all uses `std::vector` instead of `NumericVector`, and has explicit NA-handling. All tests passed locally. * [VERSION-BUMP] 0.1-0 ---> 0.1-1 🪜 > [!NOTE] > > Checks fail on PR for OSX. But all else passes.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
About
Issue #8 concerns non-transparent
NA
-handling in pairwise regression and classification metrics. When developing this package it was intended thatNA
-values were to be handled outside of the functions using wrappers; this was the main idea up until 4bd30bd (See point 5).Explicit and transparent
NA
-handling is essential for any package. Posting this Issue #8 significantly improved the quality of {SLmetrics} - thank you @EmilHvitfeldt.Changes
na.rm
-arguments, to explicitly handleNA
-values.std::vector
instead ofNumericVector
, it appears to faster (See 'On performance')On performance
Created on 2024-12-06 with reprex v2.1.1
Note
This PR ONLY addresses the raised issue for
.factor
and.numeric
methods. Thecmatrix
-method needssignificant rework.
This will be fixed soon (TM)