OptiML
OptiML is a sklearn compatible implementation of Support Vector Machines and Deep Neural Networks, both with some of the most successful features according to the state of the art.
This work was motivated by the possibility of being able to solve the optimization problem deriving from the mathematical formulation of these models through a wide range of optimization algorithms object of study and developed for the Numerical Methods and Optimization course @ Department of Computer Science @ University of Pisa under the supervision of prof. Antonio Frangioni.
Contents
-
Numerical Optimization
- Unconstrained Optimization
- Line Search Methods
- 1st Order Methods
- Steepest Gradient Descent
- Conjugate Gradient
- Fletcher–Reeves formula
- Polak–Ribière formula
- Hestenes-Stiefel formula
- Dai-Yuan formula
- 2nd Order Methods
- Newton
- Quasi-Newton
- BFGS
- L-BFGS
- 1st Order Methods
- Stochastic Methods
- Stochastic Gradient Descent
- Momentum
- Polyak
- Nesterov
- Momentum
- Adam
- Momentum
- Polyak
- Nesterov
- Momentum
- AMSGrad
- Momentum
- Polyak
- Nesterov
- Momentum
- AdaMax
- Momentum
- Polyak
- Nesterov
- Momentum
- AdaGrad
- AdaDelta
- RMSProp
- Momentum
- Polyak
- Nesterov
- Momentum
- Schedules
- Step size
- Decaying
- Linear Annealing
- Repeater
- Momentum
- Sutskever Blend
- Step size
- Stochastic Gradient Descent
- Proximal Bundle with cvxpy interface to ecos, osqp, scs, etc.
- Line Search Methods
- Constrained Quadratic Optimization
- Box-Constrained Quadratic Methods
- Projected Gradient
- Frank-Wolfe or Conditional Gradient
- Active Set
- Interior Point
- Lagrangian Dual
- Augmented Lagrangian Dual
- Box-Constrained Quadratic Methods
- Unconstrained Optimization
-
Machine Learning
- Support Vector Machines
- Formulations
- Primal
- Wolfe Dual
- Lagrangian Dual
- Support Vector Classifier
- Losses
- Hinge (L1 Loss)
- Squared Hinge (L2 Loss)
- Hinge (L1 Loss)
- Losses
- Support Vector Regression
- Losses
- Epsilon-insensitive (L1 Loss)
- Squared Epsilon-insensitive (L2 Loss)
- Epsilon-insensitive (L1 Loss)
- Losses
- Kernels
-
Linear
SVC SVR -
Polynomial
SVC SVR -
Gaussian
SVC SVR -
Laplacian
SVC SVR -
Sigmoid
-
- Optimizers (ad hoc)
- Formulations
- Neural Networks
- Neural Network Classifier
- Neural Network Regressor
- Losses
- Mean Absolute Error (L1 Loss)
- Mean Squared Error (L2 Loss)
- Binary Cross Entropy
- Categorical Cross Entropy
- Sparse Categorical Cross Entropy
- Regularizers
- L1 or Lasso
- L2 or Ridge or Tikhonov
- Activations
- Linear
- Sigmoid
- Tanh
- ReLU
- SoftMax
- Layers
- Fully Connected
- Initializers
- Xavier or Glorot (normal and uniform)
- He (normal and uniform)
- Support Vector Machines
Install
pip install optiml
Documentation
The full API reference is available at dmeoli.github.io/optiml,
automatically built from the source docstrings and published to GitHub Pages on every push to master.
It can also be built locally with Sphinx:
pip install -r docs/requirements.txt
sphinx-build -b html docs docs/_build/html
License 
This software is released under the MIT License. See the LICENSE file for details.
Metadata
Release files for optiml 1.8
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 |
|---|---|---|---|---|
| optiml-1.8.tar.gz | 496.2 kB | With provenance | Details for optiml-1.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| optiml-1.8-py3-none-any.whl | Python 3 | none | any | Details for optiml-1.8-py3-none-any.whl |
Total release size: 1.0 MB
Release files / optiml-1.8.tar.gz
| Download URL | optiml-1.8.tar.gz |
|---|---|
| Size | 496.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0f4b4b9087674a38592c2c739bd9dcb3493f53bc1373f84b1008927bcd3941cf
|
|
BLAKE2b-256 checksum How to use checksums |
7fa4222a493378a5ad860e80a1f64780aaeff5623df4cef9f2109a9881c3bab3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 26, 2026.
Transparency logRelease files / optiml-1.8-py3-none-any.whl
| Download URL | optiml-1.8-py3-none-any.whl |
|---|---|
| Size | 542.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
142655fa542a7c1cd82cfc4c7c1643d501dd8d63d83a26b97a22959f0e918f55
|
|
BLAKE2b-256 checksum How to use checksums |
c13ad5e3b662bdaad833ef3876d4e76d0b57a3f929773f8f2dd8192f6d3259df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 26, 2026.
Transparency logSecurity for optiml 1.8
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for optiml-1.8.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 26, 2026.
Transparency logA 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.