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

Unable to run cross validation step for learning lasso model #6

Open
GeraldineKong opened this issue Mar 13, 2019 · 0 comments
Open

Comments

@GeraldineKong
Copy link

Hi there, I was trying to run MUSiCC on my data and I run into a strange problem. Below is the command line I used:
$ run_musicc.py ko_tp12_musicc_TSS.tsv -o ko_tp12_musicc_norm.tsv -n -c learn_model -perf -v

And even though it previously said it could detect 18 samples, the process failed in the end saying that my number of samples = 0.

Running MUSiCC...
Input: ko_tp12_musicc_TSS.tsv
Output: ko_tp12_musicc_norm.tsv
Normalize: True
Correct: learn_model
Compute scores: True
Loading data using pandas module...
18 samples and 208 genes
Done.
Performing MUSiCC Correction...
Learning sample-specific models
.Traceback (most recent call last):
File "/home/geraldine/miniconda3/bin/run_musicc.py", line 26, in
correct_and_normalize(vars(given_args))
File "/home/geraldine/miniconda3/lib/python3.6/site-packages/musicc/core.py", line 344, in correct_and_normalize
final_model, all_samples_mean_scores[s] = learn_lasso_model(final_covariates, final_response)
File "/home/geraldine/miniconda3/lib/python3.6/site-packages/musicc/core.py", line 35, in learn_lasso_model
k_fold = cross_validation.KFold(len(res_train), n_folds=num_cv, shuffle=True)
File "/home/geraldine/miniconda3/lib/python3.6/site-packages/sklearn/cross_validation.py", line 337, in init
super(KFold, self).init(n, n_folds, shuffle, random_state)
File "/home/geraldine/miniconda3/lib/python3.6/site-packages/sklearn/cross_validation.py", line 262, in init
" than the number of samples: {1}.").format(n_folds, n))
ValueError: Cannot have number of folds n_folds=5 greater than the number of samples: 0.

Thanks for your time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant