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.
Adjusted lines relating to nzr in
Check.entry.wrapper.mint.block()
function. If thenzr$Position
object had non-zero length, features would be removed if it wasn't aDA
framework AND if it was operating on the Y dataframe - ie. ifblock.(s)pls
Y dataframe. This means that it wasn't applied to X blocks inblock.(s)plsda
contexts. The nzv filtering should only NOT be applied to the Y dataframe inDA
frameworks.This was changed to checking if there were any nzr features - if not then block is skipped. If its a
DA
framework AND its the Y dataframe, the block is skipped. Otherwise, the filtering is applied.This introduced downstream issue in
predict()
called viaauroc()
. nzr filtering is applied tonewdata
, which by default is equal toobject$X
. If nzr is non-null for a block, the filtering is applied fornewdata
. This could result in filtering being applied twice with unadjusted indices, meaning high variance features may be removed accidentally.Hence, a check was implemented in
predict()
. The feature names of a block are checked against the feature names in thenzr
object. If thenzr
features are not found in block, filtration is NOT applied.Additional check at the end of
Check.entry.wrapper.mint.block()
added for safety. Ensures there are no zero variance features remaining. If so, function is stopped.