{"id":21357516,"url":"https://github.com/alexshtf/exp_prox_pt","last_synced_at":"2025-03-16T06:14:45.085Z","repository":{"id":263958892,"uuid":"891909807","full_name":"alexshtf/exp_prox_pt","owner":"alexshtf","description":"Proximal point with exponential losses","archived":false,"fork":false,"pushed_at":"2025-01-08T16:44:45.000Z","size":167,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-22T18:29:22.033Z","etag":null,"topics":["machine-learning","pytorch","scipy"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexshtf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-21T07:11:11.000Z","updated_at":"2025-01-08T16:44:49.000Z","dependencies_parsed_at":"2024-12-19T12:33:01.590Z","dependency_job_id":"b1ba5cc2-f88f-4a62-a7a7-3a5b3d02d055","html_url":"https://github.com/alexshtf/exp_prox_pt","commit_stats":null,"previous_names":["alexshtf/exp_prox_pt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexshtf%2Fexp_prox_pt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexshtf%2Fexp_prox_pt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexshtf%2Fexp_prox_pt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexshtf%2Fexp_prox_pt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexshtf","download_url":"https://codeload.github.com/alexshtf/exp_prox_pt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243830955,"owners_count":20354855,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["machine-learning","pytorch","scipy"],"created_at":"2024-11-22T05:07:26.629Z","updated_at":"2025-03-16T06:14:45.062Z","avatar_url":"https://github.com/alexshtf.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"A SciPy and PyTorch implementation of the proximal operator $\\mathrm{prox}_{\\eta f}(w)$ of functions of the form:\n```math\nf(w;\\theta, \\phi, b, \\alpha) = \\exp(\\langle \\theta, w \\rangle + b) + \\langle \\phi, w \\rangle + \\frac{\\alpha}{2} \\| w \\|_2^2\n```\nThis repository contains two modules, `exp_prox.np` and `exp_prox.torch`, both contain a function with the following signature:\n```python\ndef prox_op(w: Array, eta: Array, theta: Array, phi: Array, b: Union[Float, Array], alpha: Union[Float, Array]) -\u003e Array\n```\nThe functions support mini-batches, by treating all but the last dimension as mini-batch dimensions.\n\nFunctions of the above family appear, for example, as _regularized_ losses of Poisson regression. To that end, we also have a utility function specifically for incremental Poisson regression. For example, the snippet below implements incremental proximal-point algorithm for Poisson regression:\n```python\nfrom exp_prox import poisson_params\nfrom exp_proc.np import prox_op\n\nstep_size = 1e-3\nreg_coef = 1e-5\nw = np.zeros(num_features) # the learned model weights\nfor X, y in data_set:\n    w = prox_op(w, *poisson_params(step_size, X, y, reg_coef))\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexshtf%2Fexp_prox_pt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexshtf%2Fexp_prox_pt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexshtf%2Fexp_prox_pt/lists"}