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 reproduce results #9

Open
mohit1997 opened this issue Apr 6, 2020 · 0 comments
Open

Unable to reproduce results #9

mohit1997 opened this issue Apr 6, 2020 · 0 comments

Comments

@mohit1997
Copy link

I have installed scPred and been following the article Intro and executed this code

library("scPred")
library("tidyverse")

download.file("https://scrnaseq-public-datasets.s3.amazonaws.com/scater-objects/pollen.rds", destfile = "~/Downloads/pollen.rds")
require("SingleCellExperiment")
pollen <- readRDS("~/Downloads/pollen.rds")

pollen_counts <- normcounts(pollen)
pollen_cpm  <- apply(pollen_counts, 2, function(x) (x/sum(x))*1000000)
pollen_metadata <- as.data.frame(colData(pollen))

set.seed(1234)
i <- createDataPartition(pollen_metadata$cell_type2, p = 0.70, list = FALSE)
train_data <- pollen_cpm[, i]
test_data <- pollen_cpm[, -i]

train_info <- pollen_metadata[i, , drop = FALSE]
test_info <- pollen_metadata[-i, , drop = FALSE]

set.seed(1234)
scp <- eigenDecompose(train_data, n = 20)

scPred::metadata(scp) <- train_info
scp <- getFeatureSpace(scp, pVar = "cell_type2")

plotEigen(scp, group = "cell_type2")
scp <- trainModel(scp, seed = 66)

Then the results I obtained are different from the ones mentioned in the article, I get the following AUC scores

Training information
      Model: Support Vector Machines with Class Weights
            AUC   Precision Recall F    
blood       0.938 1         0.988  0.994
dermal      0.929 1         1      1    
neural      0.891 1         0.869  0.926
pluripotent 0.7   1         1      1 
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