discr.test.one_sample {mgc} | R Documentation |
Discriminability One Sample Permutation Test
Description
A function that performs a one-sample test for whether the discriminability differs from random chance.
Usage
discr.test.one_sample(
X,
Y,
is.dist = FALSE,
dist.xfm = mgc.distance,
dist.params = list(method = "euclidean"),
dist.return = NULL,
remove.isolates = TRUE,
nperm = 500,
no_cores = 1
)
Arguments
X |
is interpreted as:
|
Y |
|
is.dist |
a boolean indicating whether your |
dist.xfm |
if |
dist.params |
a list of trailing arguments to pass to the distance function specified in |
dist.return |
the return argument for the specified
|
remove.isolates |
remove isolated samples from the dataset. Isolated samples are samples with only
one instance of their class appearing in the |
nperm |
the number of permutations to perform. Defaults to |
no_cores |
the number of cores to use for permutation test. Defaults to |
Value
A list containing the following:
stat |
the discriminability of the data. |
null |
the discriminability scores under the null, computed via permutation. |
p.value |
the pvalue associated with the permutation test. |
Details
Performs a test of whether an observed discriminability is significantly different from chance, as described in Bridgeford et al. (2019).
With \hat D_X
the sample discriminability of X
:
H_0: D_X = D_0
and:
H_A: D_X > D_0
where D_0
is the discriminability that would be observed by random chance.
Author(s)
Eric Bridgeford
References
Eric W. Bridgeford, et al. "Optimal Decisions for Reference Pipelines and Datasets: Applications in Connectomics." Bioarxiv (2019).
Examples
## Not run:
require(mgc)
n = 100; d=5
# simulation with a large difference between the classes
# meaning they are more discriminable
sim <- discr.sims.linear(n=n, d=d, K=2, signal.lshift=10)
X <- sim$X; Y <- sim$Y
# p-value is small
discr.test.one_sample(X, Y)$p.value
## End(Not run)