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

Clearer error/warnings messages in tune.spca() #275

Closed
Max-Bladen opened this issue Dec 5, 2022 · 0 comments · Fixed by #276
Closed

Clearer error/warnings messages in tune.spca() #275

Max-Bladen opened this issue Dec 5, 2022 · 0 comments · Fixed by #276
Assignees
Labels
enhancement-request New feature or request

Comments

@Max-Bladen
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
Users are repeatedly encountering the following error:

Error: Unexpected error while trying to choose the optimum number of components. Please check the inputs and if problem persists submit an issue to https://github.com/mixOmicsTeam/mixOmics/issues

This is really not helpful at all as it is so ambiguous. One user in particular encountered this when applying tune.spca() on a dataset with a few NAs.

Describe the solution you'd like
A clearer warning/error message detailing exactly what's caused the function to stop.

Describe alternatives you've considered
Two primary alternatives:

  • Stop function is any NAs present
  • Impute missing values and notify user of imputation via warning

Will likely go for the second option as it allows NAs to be handled, but users will be made aware of the risks associated with this.

@Max-Bladen Max-Bladen added enhancement-request New feature or request wip work-in-progress labels Dec 5, 2022
@Max-Bladen Max-Bladen self-assigned this Dec 5, 2022
Max-Bladen added a commit that referenced this issue Dec 5, 2022
refactor: adjusted order of processes to increase efficiency in `repeat_cv_j()` within `tune.spca()`
Max-Bladen added a commit that referenced this issue Dec 5, 2022
enhance: added safety catch for NAs provided to `tune.spca()`.

It replaces NAs with 0 and notifies user of the change
Max-Bladen added a commit that referenced this issue Dec 5, 2022
test: added new test file for `tune.spca()`
@Max-Bladen Max-Bladen linked a pull request Dec 5, 2022 that will close this issue
Max-Bladen added a commit that referenced this issue Dec 6, 2022
test: move `set.seed()` to see if it resolves issue
Max-Bladen added a commit that referenced this issue Dec 6, 2022
test: updated ground truths
Max-Bladen added a commit that referenced this issue Dec 6, 2022
refactor: adjusted order of processes to increase efficiency in `repeat_cv_j()` within `tune.spca()`

enhance: added safety catch for NAs provided to `tune.spca()`. It replaces NAs with 0 and notifies user of the change

test: added new test file for `tune.spca()`
@Max-Bladen Max-Bladen removed the wip work-in-progress label Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement-request New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant