nonconvexAG
<kai.yang2 "at" mail.mcgill.ca>
License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
GPG Public key Fingerprint: CC02CF153594774CF956691492B2600D18170329
This is an implementation of restarting accelerated gradient algorithm with strong rules for (high-dimensional) nonconvex sparse learning problems. The corresponding paper can be found at arXiv.
The available functions are:
-
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 itself *add_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. -
The package also offers implementation of certain features using memory mapping.
memmap_lambda_max_LMandmemmap_lambda_max_logisticcalculate the least values for \lambda to vanish all penalized coefficients.memmap_UAG_LM_SCAD_MCP,memmap_UAG_logisitc_SCAD_MCP, andmemmap_solution_path_LM,memmap_solution_path_LMwork similar to the non-memorymapping version of the function. For memory mapping versions of the functions, thedesign_matrixorXparameter should declare the path of the memorymapped file, and_dtype='float32'declares the data type,_orderdeclares the order of the memorymapped files ("F" for Fortran or "C" for C++). Multiprocess with memory mapping is also available asmemmap_lambda_max_LM_parallel,memmap_lambda_max_logistic_parallel,memmap_UAG_LM_SCAD_MCP_parallel,memmap_UAG_logistic_SCAD_MCP_parallel,memmap_solution_path_LM_parallel,memmap_solution_path_logistic_parallel-- for these functions, an extra argumentcore_numcan be used to declare the cores to be used -- if not decalred, it will use all the cores.
Metadata
Release files for nonconvexAG 1.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nonconvexAG-1.1.6.tar.gz | 51.8 kB | Without provenance | Details for nonconvexAG-1.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nonconvexAG-1.1.6-py3-none-any.whl | Python 3 | none | any | Details for nonconvexAG-1.1.6-py3-none-any.whl |
Total release size: 89.3 kB
Release files / nonconvexAG-1.1.6.tar.gz
| Download URL | nonconvexAG-1.1.6.tar.gz |
|---|---|
| Size | 51.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
064fc225eaf9560d016199a32e0a0a5fbf25135525f54606b55855245a03168a
|
|
BLAKE2b-256 checksum How to use checksums |
ea421cc45ada062d20869666d54ef7d34fd0c15747be963169b81f82d75646ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / nonconvexAG-1.1.6-py3-none-any.whl
| Download URL | nonconvexAG-1.1.6-py3-none-any.whl |
|---|---|
| Size | 37.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
541885928d79943fe6584fe0c8efe8045c9c32217d48d836e98f1cfd6ce9b018
|
|
BLAKE2b-256 checksum How to use checksums |
276d47fe851b0cb0c3f84e2dba2205f9c840033ecec578ea906bf79b27e36fef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Security for nonconvexAG 1.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.