-
Notifications
You must be signed in to change notification settings - Fork 635
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
Add rangeBounds
parameter to preProcess()
#730
Conversation
Add an ability to specify interval for `range` transformation.
Codecov Report
@@ Coverage Diff @@
## master #730 +/- ##
==========================================
+ Coverage 16.97% 17.16% +0.19%
==========================================
Files 90 90
Lines 13185 13196 +11
==========================================
+ Hits 2238 2265 +27
+ Misses 10947 10931 -16
Continue to review full report at Codecov.
|
This PR interferes with issue #729: unit tests for To work-around this issue, I reproduced existing tests related to |
Thanks for adding this. You could also get this effect by using the |
Separate unit tests for preProcess/range method added in PR topepo#730 are no longer needed after fixing issue topepo#729. Their functionality has been moved to generic preProcess/methods suite.
Remove duplicate unit tests introduced in PR #730
@sergeykorop Based on the reverse dependency checks, can you make some quick changes to ensure that the new version of range scaling works with objects from previous versions where those objects don't exist? For example, the printing is off: > standardObj
Created from 214 samples and 2343 variables
Pre-processing:
- ignored (0)
- re-scaling to [, ] (2343) Also, for old objects, these lines fail: newdata[, object$method$range] <- sweep(newdata[, object$method$range,
drop = FALSE], 2, (object$ranges[2, ] - object$ranges[1,
])/(object$rangeBounds[2] - object$rangeBounds[1]), "/")
newdata[, object$method$range] <- sweep(newdata[, object$method$range,
drop = FALSE], 2, object$rangeBounds[1], "+") |
This PR proposes following improvement: by adding new parameter,
rangeBounds
topreProcess()
we will be able to specify an explicit interval forrange
transformation, e.g.[-0.5, 0.5]
instead of[0, 1]
used by default.