knitr::opts_chunk$set(echo = TRUE,tidy.opts=list(width.cutoff=60),tidy=TRUE)

With 5% of the cells

source("~/Code/gene-expression/common/env-kh.R")
source("~/Code/gene-expression/common/generate-sample.R")
source("~/Code/gene-expression/kknn/kknn-functions.R")
allGenes <- kknnImputeAllGenes()

plotData <- data.frame(unlist(allGenes["optimalK",]), unlist(allGenes["optimalKernel",]))
names(plotData) <- c("optimalK", "optimalKernel")
ggplot(plotData, aes(x=optimalK)) + geom_bar() + ggtitle("Variation of number of neighbours for various genes")
ggplot(plotData, aes(x=optimalKernel)) + geom_bar() + coord_flip() + ggtitle("Distribution over optimal kernel for kknn")


hkumar6/gene.expression documentation built on May 17, 2019, 4:33 p.m.