MI_AG
This packages uses mutual information and accelerated gradient method to screen for SNPs and optimize the nonconvex sparse learning problem on large genetic data based on bed/bim/fam files. The corresponding paper by Yang et al. is coming soon...
The available functions are:
-
continuous_filtercaculates the mutual information between a continuous outcome and a bialletic SNP using FFT. Missing data is acceptable and will be removed. The arguments are:bed_file,bim_file,fam_fileare the location of the plink1 files;outcome,outcome_iidare the outcome values and the iids for the outcome. For genetic data, it is usual that the order of SNP iid and the outcome iid don't match. While SNP iid can be obtained from the plink1 files, outcome iid here is to be declared separately.outcome_iidshould be a list of strings or a one-dimensional numpy string array.a_min,a_maxare the minimum and maximum of the continous outcome used to evaluate the support;N=500is the default values for grid size for FFT.
-
binary_filterworks similarly, execpt thata_min, a_max, Nare not available obviously. -
continuous_filter_parallelandbinary_filter_parallelare the multiprocessing version of the above two functions, withcore_numcan be used to declare the number of cores to be used for multiprocessing. -
UAG_LM_SCAD_MCP,UAG_logistic_SCAD_MCP: these functions find a local minizer for the SCAD/MCP penalized linear models/logistic models. The arguments are:design_matrix: the design matrix input, should be a two-dimensional numpy array;outcome: the outcome, should be one dimensional numpy array, continuous for linear model, binary for logistic model;beta_0: starting value; optional, if not declared, it will be calculated based on the Gauss-Markov theory estimators of $\beta$;tol: tolerance parameter; the tolerance parameter is set to be the uniform norm of two iterations;maxit: maximum number of iteratios allowed;_lambda: _lambda value;penalty: could be"SCAD"or"MCP";a=3.7,gamma=2:afor SCAD andgammafor MCP; it is recommended forato be set as $3.7$;L_convex: the L-smoothness constant for the convex component, if not declared, it will be calculated by itselfadd_intercept_column: boolean, should the fucntion add an intercept column?
-
solution_path_LM,solution_path_logistic: calculate the solution path for linear/logistic models; the only difference from above is thatlambda_is now a one-dimensional numpy array for the values of $\lambda$ to be used. -
UAG_LM_SCAD_MCP_strongrule,UAG_logistic_SCAD_MCP_strongrulework just likeUAG_LM_SCAD_MCP,UAG_logistic_SCAD_MCP-- except they use strong rule to filter out many covariates before carrying out the optimization step. Same forsolution_path_LM_strongruleandsolution_path_logistic_strongrule. Strong rule increases the computational speed dramatically. -
SNP_UAG_LM_SCAD_MCPandSNP_UAG_logistic_SCAD_MCPwork similar toUAG_LM_SCAD_MCPandUAG_logistic_SCAD_MCP; andSNP_solution_path_LMandSNP_solution_path_logisticwork similar tosolution_path_LM,solution_path_logistic-- except that it takes plink1 files so it will be more memory-efficient. Since PCA adjustment is usually used to adjust for population structure, PCA can be given forpcaas a 2-d array -- each column should be one principal component. The pca version isSNP_UAG_LM_SCAD_MCP_PCAandSNP_UAG_logistic_SCAD_MCP_PCA.
Metadata
Release files for MI-AG 0.9.5.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| MI_AG-0.9.5.9.tar.gz | 53.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| MI_AG-0.9.5.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 94.2 kB
Release files / MI_AG-0.9.5.9.tar.gz
| Download URL | MI_AG-0.9.5.9.tar.gz |
|---|---|
| Size | 53.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dafb3efbff3884994db092b52182541e766669363f017c253cc0faae106ccee3
|
|
BLAKE2b-256 checksum How to use checksums |
245c4713dd840bc1f61b8780f51099af7096bb4dde7756da17abcef660c8fa28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / MI_AG-0.9.5.9-py3-none-any.whl
| Download URL | MI_AG-0.9.5.9-py3-none-any.whl |
|---|---|
| Size | 40.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
52dd6a6610d5a9c8aadc7997aa9bb9805980873a6210b51082f56875026fc7e1
|
|
BLAKE2b-256 checksum How to use checksums |
fa1fdc5b3a5bde18755934263988e5185a4d666381dede665e8e43819fcbf966
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|