Skip to main content

Lockout: Sparse Regularization of Neural Networks

Project description

Lockout

Sparse Regularization of Neural Networks

Install

pip install lockout

Usage

PyTorch installation required.

1. Import Lockout (and PyTorch)

import torch
from lockout import Lockout

2. Define Neural Network Architecture

Paper

https://arxiv.org/abs/2107.07160

Abstract: Regularized regression and classification procedures attempt to fit a function f(x,ω) of multiple predictor variables x, to data {xi,yi}1N, based on some loss criterion L(y,f) but adding a constraint P(ω) ≤ t on the joint values of the parameters ω to improve accuracy. While there are efficient methods for finding solutions for all values of t ≥ 0 with some constraints P in the special case that f is a linear function, none exist for non linear functions such as Neural Networks (NN). Here we present a fast algorithm that provides all such solutions for any differentiable function f and loss L, and any constraint P that is an increasing monotone function of the absolute value of each parameter. Applications involving sparsity inducing regularization of arbitrary neural networks are discussed. Empirical results indicate that these sparse solutions are usually superior to their dense counterparts in both accuracy and interpretability. This improvement in accuracy can often make neural networks competitive with, and some times superior to, state of the art methods in the analysis of tabular data.

Project details


Download files

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

Source Distribution

lockout-0.1.1.tar.gz (14.1 MB view details)

Uploaded Source

Built Distribution

lockout-0.1.1-py2.py3-none-any.whl (13.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file lockout-0.1.1.tar.gz.

File metadata

  • Download URL: lockout-0.1.1.tar.gz
  • Upload date:
  • Size: 14.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.26.0

File hashes

Hashes for lockout-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1824495fed583dc18bd86c32b3fdbafae0b58c0a9bcdf87e9d79d063b4fd08cc
MD5 44d2808fd3d4786b74729f14fa258823
BLAKE2b-256 141b4691768c75236e031e928e5ff5751cd23d967d429c9ccbb697a374b4578a

See more details on using hashes here.

File details

Details for the file lockout-0.1.1-py2.py3-none-any.whl.

File metadata

  • Download URL: lockout-0.1.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.26.0

File hashes

Hashes for lockout-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 405c07d1bac146e5244a0b7a20e19e268663be11265e7949b492ef2aa69b8d8b
MD5 791bdbf1df8e48293aadf2104d2b1206
BLAKE2b-256 501204b64d145de6fc57fe0bf75a259c69f5db11a821dd8e6812662ca9aee825

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page