pyls.structures.PLSInputs

class pyls.structures.PLSInputs(*args, **kwargs)[source]

PLS input information

X

Input data matrix, where S is observations and B is features.

Type

(S, B) array_like

Y

Behavioral matrix, where S is observations and T is features. If from behavioral_pls, this is the provided behavior matrix; if from meancentered_pls, this is a dummy-coded group/condition matrix.

Type

(S, T) array_like

groups

List with the number of subjects present in each of G groups. Input data should be organized as subjects within groups (i.e., groups should be vertically stacked). If there is only one group this can be left blank.

Type

(G,) list of int

n_cond

Number of conditions observed in data. Note that all subjects must have the same number of conditions. If both conditions and groups are present then the input data should be organized as subjects within conditions within groups (i.e., g1c1s[1-S], g1c2s[1-S], g2c1s[1-S], g2c2s[1-S]).

Type

int

mean_centering

Mean-centering method to use. This will determine how the mean-centered matrix is generated and what effects are “boosted” during the SVD. Default: 0

Type

{0, 1, 2}, optional

covariance

Whether to use the cross-covariance matrix instead of the cross- correlation during the decomposition. Only set if you are sure this is what you want as many of the results may become more difficult to interpret (i.e., behavcorr will no longer be intepretable as Pearson correlation values). Default: False

Type

bool, optional

n_perm
Number of permutations to use for testing significance of components.

Default: 5000

Type

int, optional

n_boot

Number of bootstraps to use for testing reliability of data features. Default: 5000

Type

int, optional

rotate

Whether to perform Procrustes rotations during permutation testing. Can inflate false-positive rates; see Kovacevic et al., (2013) for more information. Default: True

Type

bool, optional

ci

Confidence interval to use for assessing bootstrap results. This roughly corresponds to an alpha rate; e.g., the 95%ile CI is approximately equivalent to a two-tailed p <= 0.05. Default: 95

Type

[0, 100] float, optional

seed

Seed to use for random number generation. Helps ensure reproducibility of results. Default: None

Type

{int, numpy.random.RandomState, None}, optional

verbose

Whether to show progress bars as the analysis runs. Note that progress bars will not persist after the analysis is completed. Default: True

Type

bool, optional

n_proc

How many processes to use for parallelizing permutation testing and bootstrap resampling. If not specified will default to serialized processing (i.e., one processor). Can optionally specify ‘max’ to use all available processors. Default: None

Type

int, optional