{"id":50268518,"url":"https://github.com/dmeoli/optiml","last_synced_at":"2026-05-27T15:06:50.943Z","repository":{"id":57449401,"uuid":"228080377","full_name":"dmeoli/optiml","owner":"dmeoli","description":"Optimizers for/and sklearn compatible Machine Learning models","archived":false,"fork":false,"pushed_at":"2023-03-04T15:16:59.000Z","size":506620,"stargazers_count":10,"open_issues_count":0,"forks_count":4,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-04-24T14:30:25.212Z","etag":null,"topics":["artificial-intelligence","constrained-optimization","convex-optimization","deep-neural-networks","duality","lagrangian-relaxation","machine-learning","neural-network","nonlinear-optimization","nonsmooth-optimization","numerical-optimization","optimization","optimization-algorithms","optimizers","quadratic-programming","sklearn-compatible","svm","unconstrained-optimization"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dmeoli.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}},"created_at":"2019-12-14T19:53:55.000Z","updated_at":"2025-06-06T09:48:25.000Z","dependencies_parsed_at":"2022-09-14T10:51:48.771Z","dependency_job_id":null,"html_url":"https://github.com/dmeoli/optiml","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dmeoli/optiml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmeoli%2Foptiml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmeoli%2Foptiml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmeoli%2Foptiml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmeoli%2Foptiml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmeoli","download_url":"https://codeload.github.com/dmeoli/optiml/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmeoli%2Foptiml/sbom","scorecard":{"id":347752,"data":{"date":"2025-08-11","repo":{"name":"github.com/dmeoli/optiml","commit":"768a7ce677cce7815e86518baef60789a3eea545"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":0,"reason":"14 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2021-870 / GHSA-8rh6-h94m-vj54","Warn: Project is vulnerable to: PYSEC-2018-34 / GHSA-2fc2-6r4j-p65h","Warn: Project is vulnerable to: PYSEC-2021-856 / GHSA-5545-2q6w-2gh6","Warn: Project is vulnerable to: PYSEC-2019-108 / GHSA-9fq2-x9r6-wfmf","Warn: Project is vulnerable to: PYSEC-2018-33 / GHSA-cw6w-4rcx-xphc","Warn: Project is vulnerable to: PYSEC-2021-857 / GHSA-f7c7-j99h-c22f","Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm","Warn: Project is vulnerable to: PYSEC-2017-1 / GHSA-frgw-fgh6-9g52","Warn: Project is vulnerable to: PYSEC-2020-107 / GHSA-jjw5-xxj6-pcv5","Warn: Project is vulnerable to: PYSEC-2024-110 / GHSA-jw8x-6495-233v","Warn: Project is vulnerable to: PYSEC-2020-108","Warn: Project is vulnerable to: PYSEC-2019-156 / GHSA-xp76-357g-9wqq","Warn: Project is vulnerable to: PYSEC-2023-102","Warn: Project is vulnerable to: PYSEC-2023-114"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T07:32:35.800Z","repository_id":57449401,"created_at":"2025-08-18T07:32:35.800Z","updated_at":"2025-08-18T07:32:35.800Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33571081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-27T02:00:06.184Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["artificial-intelligence","constrained-optimization","convex-optimization","deep-neural-networks","duality","lagrangian-relaxation","machine-learning","neural-network","nonlinear-optimization","nonsmooth-optimization","numerical-optimization","optimization","optimization-algorithms","optimizers","quadratic-programming","sklearn-compatible","svm","unconstrained-optimization"],"created_at":"2026-05-27T15:06:49.961Z","updated_at":"2026-05-27T15:06:50.938Z","avatar_url":"https://github.com/dmeoli.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OptiML\n\n[![Build Status](https://api.travis-ci.com/dmeoli/optiml.svg?branch=master)](https://app.travis-ci.com/dmeoli/optiml)\n[![Coverage Status](https://coveralls.io/repos/github/dmeoli/optiml/badge.svg?branch=master)](https://coveralls.io/github/dmeoli/optiml?branch=master)\n[![Python Version](https://img.shields.io/badge/python-3.6%20%7C%203.7%20%7C%203.8%20%7C%203.9-blue)](https://img.shields.io/badge/python-3.6%20%7C%203.7%20%7C%203.8%20%7C%203.9-blue)\n[![PyPI Version](https://img.shields.io/pypi/v/optiml.svg?color=blue)](https://pypi.org/project/optiml/)\n[![PyPI Downloads](https://img.shields.io/pypi/dm/optiml.svg)](https://pypistats.org/packages/optiml)\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dmeoli/optiml/master)\n\nOptiML is a sklearn compatible implementation of *Support Vector Machines* and *Deep Neural Networks*, both with some of\nthe most successful features according to the state of the art.\n\nThis work was motivated by the possibility of being able to solve the optimization problem deriving from the\nmathematical formulation of these models through a wide range of optimization algorithms object of study and developed\nfor the Numerical Methods and Optimization course @ [Department of Computer Science](https://www.di.unipi.it/en/) @\n[University of Pisa](https://www.unipi.it/index.php/english) under the supervision of\nprof. [Antonio Frangioni](http://pages.di.unipi.it/frangio/).\n\n## Contents\n\n- Numerical Optimization\n    - Unconstrained Optimization\n        - Line Search Methods\n            - 1st Order Methods\n                - [x] Steepest Gradient Descent\n                - [x] Conjugate Gradient\n                    - [x] Fletcher–Reeves formula\n                    - [x] Polak–Ribière formula\n                    - [x] Hestenes-Stiefel formula\n                    - [x] Dai-Yuan formula\n            - 2nd Order Methods\n                - [x] Newton\n                - Quasi-Newton\n                    - [x] BFGS\n                    - [ ] L-BFGS\n        - Stochastic Methods\n            - [x] Stochastic Gradient Descent\n                - [x] Momentum\n                    - [x] Polyak\n                    - [x] Nesterov\n            - [x] Adam\n                - [x] Momentum\n                    - [x] Polyak\n                    - [x] Nesterov\n            - [x] AMSGrad\n                - [x] Momentum\n                    - [x] Polyak\n                    - [x] Nesterov\n            - [x] AdaMax\n                - [x] Momentum\n                    - [x] Polyak\n                    - [x] Nesterov\n            - [x] AdaGrad\n            - [x] AdaDelta\n            - [x] RMSProp\n                - [x] Momentum\n                    - [x] Polyak\n                    - [x] Nesterov\n            - [x] Schedules\n                - Step size\n                    - [x] Decaying\n                    - [x] Linear Annealing\n                    - [x] Repeater\n                - Momentum\n                    - [x] Sutskever Blend\n        - [x] Proximal Bundle with [cvxpy](https://github.com/cvxgrp/cvxpy) interface to\n          [ecos](https://github.com/embotech/ecos), [osqp](https://github.com/oxfordcontrol/osqp),\n          [scs](https://github.com/cvxgrp/scs),\n          [etc](https://www.cvxpy.org/tutorial/advanced/index.html#choosing-a-solver).\n    - Constrained Quadratic Optimization\n        - Box-Constrained Quadratic Methods\n            - [x] Projected Gradient\n            - [x] Frank-Wolfe or Conditional Gradient\n            - [x] Active Set\n            - [x] Interior Point\n        - [x] Lagrangian Dual\n        - [x] Augmented Lagrangian Dual\n\n- Machine Learning\n    - [x] Support Vector Machines\n        - Formulations\n            - Primal\n            - Wolfe Dual\n            - Lagrangian Dual\n        - [x] Support Vector Classifier\n            - Losses\n                - [x] Hinge (L1 Loss) ![l1_svc_loss](notebooks/optimization/tex/img/l1_svc_loss.png)\n                - [x] Squared Hinge (L2 Loss) ![l2_svc_loss](notebooks/optimization/tex/img/l2_svc_loss.png)\n        - [x] Support Vector Regression\n            - Losses\n                - [x] Epsilon-insensitive (L1 Loss) ![l1_svr_loss](notebooks/optimization/tex/img/l1_svr_loss.png)\n                - [x] Squared Epsilon-insensitive (L2 Loss) ![l2_svr_loss](notebooks/optimization/tex/img/l2_svr_loss.png)\n        - Kernels\n            - [x] Linear\n\n                |                                                SVC                                                 |                                                SVR                                                 |\n                |:--------------------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------------:|\n                | ![linear_dual_l1_svc_hyperplane](notebooks/optimization/tex/img/linear_dual_l1_svc_hyperplane.png) | ![linear_dual_l1_svc_hyperplane](notebooks/optimization/tex/img/linear_dual_l1_svr_hyperplane.png) |\n\n            - [x] Polynomial\n\n                |     SVC      | SVR          |\n                |    :----:    |    :----:    |\n                | ![poly_dual_l1_svc_hyperplane](notebooks/optimization/tex/img/poly_dual_l1_svc_hyperplane.png) | ![poly_dual_l1_svc_hyperplane](notebooks/optimization/tex/img/poly_dual_l1_svr_hyperplane.png) |              \n\n            - [x] Gaussian\n\n                |                                                  SVC                                                   |                                                  SVR                                                   |\n                |:------------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------:|\n                | ![gaussian_dual_l1_svc_hyperplane](notebooks/optimization/tex/img/gaussian_dual_l1_svc_hyperplane.png) | ![gaussian_dual_l1_svc_hyperplane](notebooks/optimization/tex/img/gaussian_dual_l1_svr_hyperplane.png) |\n\n            - [x] Laplacian\n\n                |                                                   SVC                                                    |                                                   SVR                                                    |\n                |:--------------------------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------------------:|\n                | ![laplacian_dual_l1_svc_hyperplane](notebooks/optimization/tex/img/laplacian_dual_l1_svc_hyperplane.png) | ![laplacian_dual_l1_svc_hyperplane](notebooks/optimization/tex/img/laplacian_dual_l1_svr_hyperplane.png) |\n\n            - [x] Sigmoid\n        - Optimizers (ad hoc)\n            - [x] Sequential Minimal Optimization (SMO)\n            - [x] QP solver with [qpsolvers](https://github.com/stephane-caron/qpsolvers) interface to\n              [cvxopt](https://github.com/cvxopt/cvxopt), [quadprog](https://github.com/rmcgibbo/quadprog),\n              [qpOASES](https://github.com/coin-or/qpOASES), [etc](https://github.com/stephane-caron/qpsolvers#solvers).\n    - [x] Neural Networks\n        - [x] Neural Network Classifier\n        - [x] Neural Network Regressor\n        - Losses\n            - [x] Mean Absolute Error (L1 Loss)\n            - [x] Mean Squared Error (L2 Loss)\n            - [x] Binary Cross Entropy\n            - [x] Categorical Cross Entropy\n            - [x] Sparse Categorical Cross Entropy\n        - Regularizers\n            - [x] L1 or Lasso\n            - [x] L2 or Ridge or Tikhonov\n        - Activations\n            - [x] Linear\n            - [x] Sigmoid\n            - [x] Tanh\n            - [x] ReLU\n            - [x] SoftMax\n        - Layers\n            - [x] Fully Connected\n        - Initializers\n            - [x] Xavier or Glorot (normal and uniform)\n            - [x] He (normal and uniform)\n\n## Install\n\n```\npip install optiml\n```\n\n## License [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nThis software is released under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmeoli%2Foptiml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmeoli%2Foptiml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmeoli%2Foptiml/lists"}