Description Usage Arguments Value Author(s) See Also Examples
Run cross-validation on Dirichlet-Multinomial generative classifiers.
1 2 | cvdmngroup(ncv, count, k, z, ..., verbose = FALSE,
.lapply = parallel::mclapply)
|
ncv |
|
count |
|
k |
named |
z |
True group assignment. |
... |
Additional arguments, passed to |
verbose |
|
.lapply |
A function used to perform the outer cross-vaildation
loop, e.g., |
A data.frame
summarizing classifications of test samples in
cross-validation groups. Columns are:
group |
The cross-validation group in which the indivdual was used for testing. |
additional columns |
Named after classification groups, giving the posterior probability of assignment. |
Martin Morgan mailto:mtmorgan@fhcrc.org
dmn
, DirichletMultinomial-package,
vignette("DirichletMultinomial")
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | data(xval) ## result of following commands
head(xval)
## Not run:
## count matrix
fl <- system.file(package="DirichletMultinomial", "extdata",
"Twins.csv")
count <- t(as.matrix(read.csv(fl, row.names=1)))
## phenotype
fl <- system.file(package="DirichletMultinomial", "extdata",
"TwinStudy.t")
pheno0 <- scan(fl)
lvls <- c("Lean", "Obese", "Overwt")
pheno <- factor(lvls[pheno0 + 1], levels=lvls)
names(pheno) <- rownames(count)
## subset
keep <- c("Lean", "Obese")
count <- count[pheno
pheno <- factor(pheno[pheno
## cross-validation, single Dirichlet component for Lean, 3 for Obese
xval <- cvdmngroup(nrow(count), count, c(Lean=1, Obese=3), pheno,
verbose=TRUE, mc.preschedule=FALSE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.