Private API reference¶
generative_model¶
_mk_Sigmaxy(assemble_Sigmaxy, Sigmaxx, …) |
Generate the between-set covariance matrix \(\Sigma_{XY}\) (i.e. |
_find_latent_mode_vectors(assemble_Sigmaxy, …) |
Find between-set weight vectors. |
_find_latent_mode_vectors_qr(Sigmaxx, …) |
Finds random latent mode vectors using the QR algorithm. |
_find_latent_mode_vectors_opti(Sigmaxx, …) |
Find latent mode vectors using an optimization algorithm that maximizes the minimum eigenvalue of the proposed joint covariance matrix. |
_find_latent_mode_vectors_pc1(Sigmaxx, …) |
Selects the first principal component axes as weight vectors. |
_add_lowvariance_subspace_components(U, …) |
Add a component from the low-variance subspace to the weight vectors living in the dominant high-variance subspace. |
_generate_random_dominant_subspace_rotations(U, …) |
Generates random weight vectors in the dominant subspaces (of dimension qx and qy). |
_generate_dominant_subspace_rotations_from_opti(U, …) |
Generates weight vectors in the dominant subspaces (of dimension qx and qy) using a random entry in a list of predefined rotation matrices. |
_assemble_Sigmaxy_pls(Sigmaxx, Sigmayy, U_, …) |
Generates the between-set covariance matrix. |
_assemble_Sigmaxy_cca(Sigmaxx, Sigmayy, U_, …) |
Generates the between-set covariance matrix for CCA. |
_Sigmaxy_negative_min_eval(uvrot, …[, …]) |
Find the negative of the minimum eigenvalue of (the Schur complement of) the joint covariance matrix \(\Sigma\). |
_variance_explained_by_latent_modes(Sigmaxx, …) |
Calculates the amount of explained variance by the between-set associations and checks if they surpass a threshold. |
calc_schur_complement(A, B_or_px[, C, D, kind]) |
Calculate Schur complement of a matrix. |
_check_subspace_dimension(Sigmaxx, qx) |
Interpret arguments qx and qy in mk_Sigma_model(). |
metric¶
metrics.mk_betweenAssocRelError(ds) |
Evaluate the relative error of the between-set association strength. |
metrics.mk_betweenAssocRelError_cv(ds, cv_assoc) |
Evaluate the relative error of the cross-validated between-set association strength. |
metrics.mk_meanBetweenAssocRelError(ds, cv_assoc) |
Evaluate the relative error of the between-set association strength as the average of the in-sample and cross-validated value. |
metrics.mk_weightError(ds[, suffix]) |
Evaluate the weight error. |
metrics.mk_scoreError(ds) |
Evaluate the score error. |
metrics.mk_loadingError(ds) |
Evaluate the loading error. |
metrics.mk_crossloadingError(ds) |
Evaluate the cross-loading error. |
sample_size¶
interpolation.calc_n_required(metric, …[, …]) |
Calculate required sample sizes for a given metric. |
interpolation.calc_n_required_all_metrics(ds) |
Calculate n_required for 5 commonly used metrics, as well as maximum across metrics. |
interpolation.calc_max_n_required(*n_requireds) |
Finds the maximum sample size across datasets. |
linear_model.do_fit_lm(ds, n_reqs[, …]) |
Fits a linear model to outcome data. |
linear_model.prep_data_for_lm(ds, n_reqs, …) |
Prepare outcome data for use with linear model. |
linear_model.fit_linear_model(criterion, model) |
Fit a linear model to outcome data. |
linear_model.get_lm_coefs(model, criterion, …) |
Get linear model coefficients. |
linear_model._save_linear_model(model[, …]) |
Save linear model. |
data¶
loaders.load_metaanalysis_outcomes(px, py, n) |
Load previously generated outcomes for a specific parameter set. |
loaders.load_metaanalysis([data_home, fetch]) |
Load table of metaanalysis features. |
loaders._fetch_synthanad(fname, path) |
Retrieve file from remote repository. |
loaders._check_data_home(data_home[, subfolder]) |
Check data_home directory |
loaders._check_outcome_data_exists(fname, path) |
Check if a given outcome data file exists and possibly retrieve it if not. |
util¶
check_positive_definite(Sigma, noise_level) |
Check if a matrix is positive definite. |
align_weights(v, vtrue[, copy, return_sign]) |
Align vectors in rows of v such that they have a positive dot-product with vtrue. |
nPerFtr2n(nPerFtr[, py]) |
Convert a DataArray with elements representing “n_per_ftr” into “n” |