Skip to main content

Optimizers for/and sklearn compatible Machine Learning models

Project description

OptiML

Build Status Coverage Status Python Version PyPI Version PyPI Downloads Binder

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
      • Stochastic Methods
        • Stochastic Gradient Descent - [x] Momentum - [x] Polyak - [x] Nesterov
          • Adam
            • Momentum - [x] Polyak - [x] Nesterov
          • AMSGrad
            • Momentum - [x] Polyak - [x] Nesterov
          • AdaMax
            • Momentum - [x] Polyak - [x] Nesterov
          • AdaGrad
          • AdaDelta
          • RMSProp
            • Momentum - [x] Polyak - [x] Nesterov
          • Schedules
            • Step size
              • Decaying
                • Linear Annealing
                • Repeater
            • Momentum
              • Sutskever Blend
      • Proximal Bundle with cvxpy interface to ecos, osqp, scs, etc.
    • Constrained Quadratic Optimization
      • Box-Constrained Quadratic Methods
        • Projected Gradient
          • Frank-Wolfe or Conditional Gradient
          • Active Set
          • Interior Point
      • Lagrangian Dual
        • Augmented Lagrangian Dual
  • Machine Learning

    • Support Vector Machines - Formulations - Primal - Wolfe Dual - Lagrangian Dual - [x] Support Vector Classifier - Losses - [x] Hinge (L1 Loss) l1_svc_loss - [x] Squared Hinge (L2 Loss) l2_svc_loss - [x] Support Vector Regression - Losses - [x] Epsilon-insensitive (L1 Loss) l1_svr_loss - [x] Squared Epsilon-insensitive (L2 Loss) l2_svr_loss - Kernels - [x] Linear

              | SVC          | SVR          |
              |    :----:    |    :----:    |
              | ![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) |
              
          - [x] Polynomial
               
              | SVC          | SVR          |
              |    :----:    |    :----:    |
              | ![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) |              
              
          - [x] Gaussian
              
              | SVC          | SVR          |
              |    :----:    |    :----:    |
              | ![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) |
              
          - [x] Laplacian
            
              | SVC          | SVR          |
              |    :----:    |    :----:    |
              | ![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) |
          
          - [x] Sigmoid
      - Optimizers (ad hoc)
          - [x] Sequential Minimal Optimization (SMO)
          - [x] QP solver with [qpsolvers](https://github.com/stephane-caron/qpsolvers) interface to 
          [cvxopt](https://github.com/cvxopt/cvxopt), [quadprog](https://github.com/rmcgibbo/quadprog), 
          [qpOASES](https://github.com/coin-or/qpOASES), [etc](https://github.com/stephane-caron/qpsolvers#solvers).
      
      • 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)

Install

pip install optiml

License License: MIT

This software is released under the MIT License. See the LICENSE file for details.

Project details


Release history Release notifications | RSS feed

This version

1.5

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for optiml, version 1.5
Filename, size File type Python version Upload date Hashes
Filename, size optiml-1.5.tar.gz (61.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page