knitr::opts_chunk$set(echo = TRUE,tidy.opts=list(width.cutoff=60),tidy=TRUE)
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.