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

issue in tune.spca #161

Closed
marinamartinezalvaro opened this issue Jan 4, 2022 · 4 comments
Closed

issue in tune.spca #161

marinamartinezalvaro opened this issue Jan 4, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@marinamartinezalvaro
Copy link

Hi!

I am finding a problem when selecting the optimum number of variables to select in sPCA using tune.spca function (I am just following the tutorial of your new book)

My database Looks as:
MI.Chamber..kg.d. CH4..g.d. CH4..g.kgDMI. CH4.CO2.molar.ratio acppn
1 10.62 224.0852 21.10030 0.05591692 664.7998
2 12.78 281.3863 22.01771 0.06767347 659.2013
3 14.06 320.3933 22.78758 0.07525992 617.3418
4 10.77 152.8363 14.19093 0.04136067 620.0376
5 6.64 NA NA NA 628.9639

I do not find any problem when running tune.pca to determine the number of components. But i am getting an issue with tune.spca to determine the optimum number of variables to select:

grid.keepX<-c(seq(5,30,5))
tune.spca.result<-tune.spca(X, ncomp=3, folds=4, test.keepX=grid.keepX, nrepeat=10)
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

It works until nrepeat=2 but fails when nrepeat is bigger.
Any assistance would be very helpful
Many thanks!
Marina


🤔 Expected behavior:


💡 Possible solution:

@marinamartinezalvaro marinamartinezalvaro added the bug Something isn't working label Jan 4, 2022
@aljabadi
Copy link
Collaborator

aljabadi commented Jan 7, 2022

Hi @marinamartinezalvaro,

Thanks for submitting this issue.

Did you have only 5 variables in the dataset? I can see that you're trying to tune up to 30 variables.

If all checks, can you please send us a confidential email with the dataset and code that leads to this behaviour?
You can click on this text to send us an email.
Alternatively, you can right-click on the above text and choose ‘Copy Email Address’

Cheers

Al

@marinamartinezalvaro
Copy link
Author

Dear Al,

Thanks for your response. I have 48 variables with 72 records for each variable (with some missing values.
I am sending an email now!
Many thanks!
BW
Marina

@marinamartinezalvaro
Copy link
Author

Dear Al,
please could you confirm you recieved my email?
Many thanks
Marina

Max-Bladen added a commit that referenced this issue Mar 7, 2022
@Max-Bladen Max-Bladen added this to Backlog in bladen-devel-bugs Mar 9, 2022
@Max-Bladen Max-Bladen moved this from Backlog to PR Successful on Branch in bladen-devel-bugs Mar 9, 2022
@Max-Bladen Max-Bladen linked a pull request Mar 9, 2022 that will close this issue
@Max-Bladen Max-Bladen added this to PR Successful on Branch in mixOmics-development Mar 29, 2022
@Max-Bladen Max-Bladen added the ready-to-review for all PRs that are ready to be reviewed. including complex, larger commits label Sep 7, 2022
@Max-Bladen
Copy link
Collaborator

Solution implemented via PR #276

@Max-Bladen Max-Bladen removed the ready-to-review for all PRs that are ready to be reviewed. including complex, larger commits label Dec 8, 2022
@Max-Bladen Max-Bladen assigned Max-Bladen and unassigned aljabadi Dec 8, 2022
@Max-Bladen Max-Bladen moved this from Ready to Review to Merged in mixOmics-development Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
bladen-devel-bugs
PR Successful on Branch
Development

Successfully merging a pull request may close this issue.

3 participants