{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/yaglm-a-python-package-for-fitting-and-tuning","title":"yaglm: a Python package for fitting and tuning generalized linear models that supports structured, adaptive and non-convex penalties","arxiv_id":"2110.05567","date":"2021-10-11","proceeding":null,"authors":["Iain Carmichael","Thomas Keefe","Naomi Giertych","Jonathan P Williams"],"abstract":"The yaglm package aims to make the broader ecosystem of modern generalized linear models accessible to data analysts and researchers. This ecosystem encompasses a range of loss functions (e.g. linear, logistic, quantile regression), constraints (e.g. positive, isotonic) and penalties. Beyond the basic lasso/ridge, the package supports structured penalties such as the nuclear norm as well as the group, exclusive, fused, and generalized lasso. It also supports more accurate adaptive and non-convex (e.g. SCAD) versions of these penalties that often come with strong statistical guarantees at limited additional computational expense. yaglm comes with a variety of tuning parameter selection methods including: cross-validation, information criteria that have favorable model selection properties, and degrees of freedom estimators. While several solvers are built in (e.g. FISTA), a key design choice allows users to employ their favorite state of the art optimization algorithms. Designed to be user friendly, the package automatically creates tuning parameter grids, supports tuning with fast path algorithms along with parallelization, and follows a unified scikit-learn compatible API.","url_abs":"https://arxiv.org/abs/2110.05567v1","url_pdf":"https://arxiv.org/pdf/2110.05567v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"links_only","authors_date_abstract":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license), from the Kaggle arXiv metadata snapshot of 2026-09-12"},"code_links":[{"paper_slug":"yaglm-a-python-package-for-fitting-and-tuning","repo_url":"https://github.com/yaglm/yaglm","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2110.05567","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2110.05567"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/yaglm/yaglm","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":12},"by_repo_kind":{"official":{"samples":12,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"4b657c337fb9311b","entry":"basic_y_formatting","repo":"yaglm/yaglm","repo_kind":"official","path":"yaglm/LossMixin.py","file_url":"https://github.com/yaglm/yaglm/blob/HEAD/yaglm/LossMixin.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4b657c337fb9311b"}},{"code_sha256_prefix":"2f1f41031793f0d8","entry":"euclid_norm","repo":"yaglm/yaglm","repo_kind":"official","path":"yaglm/linalg_utils.py","file_url":"https://github.com/yaglm/yaglm/blob/HEAD/yaglm/linalg_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2f1f41031793f0d8"}},{"code_sha256_prefix":"35d3701146faa3d3","entry":"get_adaptive_weights","repo":"yaglm/yaglm","repo_kind":"official","path":"yaglm/adaptive.py","file_url":"https://github.com/yaglm/yaglm/blob/HEAD/yaglm/adaptive.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"35d3701146faa3d3"}},{"code_sha256_prefix":"a131d93489504ffe","entry":"l2_reg_loss","repo":"yaglm/yaglm","repo_kind":"official","path":"yaglm/cvxpy/glm_loss.py","file_url":"https://github.com/yaglm/yaglm/blob/HEAD/yaglm/cvxpy/glm_loss.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a131d93489504ffe"}},{"code_sha256_prefix":"7e89b96204b766b9","entry":"leading_sval","repo":"yaglm/yaglm","repo_kind":"official","path":"yaglm/linalg_utils.py","file_url":"https://github.com/yaglm/yaglm/blob/HEAD/yaglm/linalg_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7e89b96204b766b9"}},{"code_sha256_prefix":"e26ec52c6c355686","entry":"lin_reg_loss","repo":"yaglm/yaglm","repo_kind":"official","path":"yaglm/cvxpy/glm_loss.py","file_url":"https://github.com/yaglm/yaglm/blob/HEAD/yaglm/cvxpy/glm_loss.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e26ec52c6c355686"}},{"code_sha256_prefix":"a6c1f962fa3edaf1","entry":"log_binom","repo":"yaglm/yaglm","repo_kind":"official","path":"yaglm/extmath.py","file_url":"https://github.com/yaglm/yaglm/blob/HEAD/yaglm/extmath.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a6c1f962fa3edaf1"}},{"code_sha256_prefix":"a62f39f64624f0fd","entry":"log_reg_loss","repo":"yaglm/yaglm","repo_kind":"official","path":"yaglm/cvxpy/glm_loss.py","file_url":"https://github.com/yaglm/yaglm/blob/HEAD/yaglm/cvxpy/glm_loss.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a62f39f64624f0fd"}},{"code_sha256_prefix":"912c81972b1008a9","entry":"process_y_lin_reg","repo":"yaglm/yaglm","repo_kind":"official","path":"yaglm/LossMixin.py","file_url":"https://github.com/yaglm/yaglm/blob/HEAD/yaglm/LossMixin.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"912c81972b1008a9"}},{"code_sha256_prefix":"49f435b0a913d442","entry":"process_y_log_reg","repo":"yaglm/yaglm","repo_kind":"official","path":"yaglm/LossMixin.py","file_url":"https://github.com/yaglm/yaglm/blob/HEAD/yaglm/LossMixin.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"49f435b0a913d442"}},{"code_sha256_prefix":"c0953d0fce3b5044","entry":"smallest_sval","repo":"yaglm/yaglm","repo_kind":"official","path":"yaglm/linalg_utils.py","file_url":"https://github.com/yaglm/yaglm/blob/HEAD/yaglm/linalg_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c0953d0fce3b5044"}},{"code_sha256_prefix":"d7fe9f56f21e66e7","entry":"weighted_mean_std","repo":"yaglm/yaglm","repo_kind":"official","path":"yaglm/extmath.py","file_url":"https://github.com/yaglm/yaglm/blob/HEAD/yaglm/extmath.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d7fe9f56f21e66e7"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}