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

Error in trainModel(): all the ROC metric values are missing #16

Open
a-solovyev12 opened this issue Dec 10, 2020 · 2 comments
Open

Error in trainModel(): all the ROC metric values are missing #16

a-solovyev12 opened this issue Dec 10, 2020 · 2 comments

Comments

@a-solovyev12
Copy link

Hello @joseah ,

Thank you for developing scPred! We have tested the latest version (v1.9.0) and encountered the following issue when training the model:

●  Training models for each cell type...
Something is wrong; all the ROC metric values are missing:
      ROC           Sens          Spec    
 Min.   : NA   Min.   : NA   Min.   : NA  
 1st Qu.: NA   1st Qu.: NA   1st Qu.: NA  
 Median : NA   Median : NA   Median : NA  
 Mean   :NaN   Mean   :NaN   Mean   :NaN  
 3rd Qu.: NA   3rd Qu.: NA   3rd Qu.: NA  
 Max.   : NA   Max.   : NA   Max.   : NA  
 NA's   :9     NA's   :9     NA's   :9    


Error: Stopping
In addition: Warning message:
In nominalTrainWorkflow(x = x, y = y, wts = weights, info = trainInfo,  :
  There were missing values in resampled performance measures.
Execution halted

svmRadialWeights was used as a model. Could you recommend anything to overcome this?

Many thanks,
Andrey

@joseah
Copy link
Collaborator

joseah commented Dec 11, 2020

Hi @a-solovyev12,

It seems that there's a cell type with fewer cells than the number of resamples. By default, 5 cross-validations are performed so it's likely that some cross-validations are left without any cells to include for parameter tuning. If that's the case, I'd reevaluate the incorporation of that cell type to be classified given the low number of cells. Otherwise, you could reduce the number cross-validations using the number parameter in the trainModel() function.

Does this happen with other models (besides svmRadialEights)?

Cheers,
Jose

@a-solovyev12
Copy link
Author

Hi Jose,

Thanks for a quick reply.
Indeed, taking only cell types with a higher number of cells solves the problem. What minimum number of cells would you suggest for robust performance in the CV step (assuming we keep it 5-fold)?

Best,
Andrey

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

2 participants