Skip to content

Commit

Permalink
version 1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
johanngb authored and cran-robot committed Oct 30, 2018
1 parent 52463a8 commit b9c4685
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 13 deletions.
8 changes: 4 additions & 4 deletions DESCRIPTION
@@ -1,15 +1,15 @@
Package: cpt
Title: Classification Permutation Test
Description: Non-parametric test for equality of multivariate distributions. Trains a classifier to classify (multivariate) observations as coming from one of several distributions. If the classifier is able to classify the observations better than would be expected by chance (using permutation inference), then the null hypothesis that the distributions are equal is rejected.
Version: 1.0
Date: 2018-2-26
Version: 1.0.2
Date: 2018-10-30
Imports: MASS, nnet, randomForest, glmnet
Author: Johann Gagnon-Bartsch <johanngb@umich.edu>
Maintainer: Johann Gagnon-Bartsch <johanngb@umich.edu>
License: GPL
URL: http://dept.stat.lsa.umich.edu/~johanngb
LazyLoad: yes
NeedsCompilation: no
Packaged: 2018-02-27 18:59:14 UTC; johann
Packaged: 2018-10-30 16:55:38 UTC; johanngb
Repository: CRAN
Date/Publication: 2018-02-27 19:20:03 UTC
Date/Publication: 2018-10-30 17:40:03 UTC
10 changes: 5 additions & 5 deletions MD5
@@ -1,15 +1,15 @@
d29d8d81f29e25dca836e4f116ad6aac *DESCRIPTION
3b29645f6d4d31ff0f92773d3cce84d3 *DESCRIPTION
de0e7172cef2b50e23d2b4a58f96bd23 *NAMESPACE
ee246132368348b606def55cff7be0c5 *R/applyclassifiers.R
3a23a9a8d40ba0ee31b4b306c5126481 *R/cpt.R
107ca412f6fe9ca198340c3c0992e6ec *R/cpt.R
e8063fc42ba577005bdd919ead877071 *R/getcombmethod.R
7235781e1c25370cb4c23208fb885eab *R/getensemble.metric.R
b9d644400fc9a4ef70ffb1b9f9b21832 *R/getmetric.R
f589e97909049db0ac6f429ce239c1cd *R/getensemble.metric.R
a364d83d1d68c31684600da470a3e48b *R/getmetric.R
7437c39174c27c502cd17294475545a7 *R/gettestmethod.R
70f2ae6f2a683d5776ab392189bee83a *R/gettestmethods.R
32b30252abef51dc55ab31c6cfc68f3f *R/getteststat.R
9cbe378084ceb7abaa5f3d9f56c6d26e *R/gettrainmethod.R
ef2d130d68e57477a20eb762e0c00b53 *R/gettrainmethods.R
35014fd243d937533e3d2940766615fd *R/train.R
c1cf85e07ad2f2ad289c2a741031861d *man/cpt-package.Rd
59a2c9609ccf5feade2c67b83ff23f54 *man/cpt-package.Rd
e72967beb125f37eb1b0a6640516f045 *man/cpt.Rd
4 changes: 2 additions & 2 deletions R/cpt.R
Expand Up @@ -46,8 +46,8 @@ function (Z, T, leaveout = 0, class.methods = "forest", metric = "probability",
colnames(nullpvaldist) = names(pvals)
for (method.i in 1:ncol(nulldist)) {
pvals[method.i] = sum(nulldist[, method.i] >= teststat[method.i])/perm.N
nullpvaldist[, method.i] = rank(nulldist[, method.i],
ties.method = "max")/perm.N
nullpvaldist[, method.i] = 1 - (rank(nulldist[, method.i],
ties.method = "min") - 1)/perm.N
}
nullcombpvaldist = apply(nullpvaldist[, comb.methods, drop = FALSE],
1, comb.method)
Expand Down
7 changes: 7 additions & 0 deletions R/getensemble.metric.R
Expand Up @@ -20,6 +20,13 @@ function (ensemble.metric)
return(mean(meanprob[indexmat]))
}
}
if (ensemble.metric == "mean.log") {
rval = function(class.output, tstT) {
meanprob = apply(class.output, c(1, 3), mean)
indexmat = cbind(1:nrow(meanprob), tstT)
return(mean(log(meanprob[indexmat] + 1e-04)))
}
}
if (ensemble.metric == "mean.mse") {
rval = function(class.output, tstT) {
meanprob = apply(class.output, c(1, 3), mean)
Expand Down
6 changes: 6 additions & 0 deletions R/getmetric.R
Expand Up @@ -7,6 +7,12 @@ function (metric)
return(mean(prob[indexmat]))
}
}
if (metric == "logscore") {
rval = function(prob, tstT) {
indexmat = cbind(1:nrow(prob), tstT)
return(mean(log(prob[indexmat] + 1e-04)))
}
}
else if (metric == "rate") {
rval = function(prob, tstT) {
indexmat = cbind(1:nrow(prob), tstT)
Expand Down
4 changes: 2 additions & 2 deletions man/cpt-package.Rd
Expand Up @@ -14,8 +14,8 @@ Description: Non-parametric test for equality of multivariate distributions. Tr
\tabular{ll}{
Package: \tab cpt\cr
Type: \tab Package\cr
Version: \tab 1.0\cr
Date: \tab 2018-2-26\cr
Version: \tab 1.0.2\cr
Date: \tab 2018-10-30\cr
License: \tab GPL\cr
LazyLoad: \tab yes\cr
}
Expand Down

0 comments on commit b9c4685

Please sign in to comment.