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

Non-unique values when setting 'row.names' #17

Open
a-solovyev12 opened this issue Feb 1, 2021 · 3 comments
Open

Non-unique values when setting 'row.names' #17

a-solovyev12 opened this issue Feb 1, 2021 · 3 comments

Comments

@a-solovyev12
Copy link

Hello @joseah,

When training a model, I have encountered the following error:

Error in `.rowNamesDF<-`(x, value = value) : 
  duplicate 'row.names' are not allowed
Calls: print ... row.names<- -> row.names<-.data.frame -> .rowNamesDF<-

This comes after the training step has finished. However, I've double-checked and the row names (cell ids) are definitely not duplicated. Could you please have a look at that problem? Thanks a lot!

Best regards,
Andrey

@joseah
Copy link
Collaborator

joseah commented Feb 1, 2021

Hi Andrey,

this issue is probably related to the cross validation step. Are there cell types with a few cells? If that's the case, some the the folds may be empty when splitting the data for model assessment. A workaround could be reducing the number of resamples via the number parameter.

Cheers.

@ncalistri
Copy link

ncalistri commented Mar 10, 2022

I'm seeing a similar error, and went through the 'get probabilities' function step by step to find that the probabilities table for one of the classes is 1. Full of NAs and 2. Has duplicate barcodes:

Right before probs <- Reduce(function(x, y) merge(x, y, by = "barcode"), probs) is used these are the dimensions of my list of probability tables:

image

And looking at that singular entry with extra entries:

image

What's interesting is that the overall summary table with ROC/Specificity/Sensitivity reports that the model performs well for that class:

image

@ncalistri
Copy link

I solved this issue by using a different model (mda) instead of svmRadial, and the probability table no longer had multiple entries from the same barcode and I was able to retrieve the probability table as expected.

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

3 participants