Skip to main content

Python bindings for the Ensmallen library.

Project description

pyensmallen: python bindings for the ensmallen library for numerical optimization

Minimal python bindings for ensmallen library. Currently supports

  • L-BFGS, with intended use for optimisation of smooth objectives for m-estimation
  • ADAM (and variants with different step-size routines) - makes use of ensmallen's templatization.
  • Frank-Wolfe, with intended use for constrained optimization of smooth losses
    • constraints are either lp-ball (lasso, ridge, elastic-net) or simplex

See ensmallen docs for details. The notebooks/ directory walks through several statistical examples.

speed

pyensmallen is very fast. A comprehensive set of benchmarks is available in the benchmarks directory. The benchmarks are run on an intel 12th gen framework laptop. Benchmarks vary data size (sample size and number of covariates) and parametric family (linear, logistic, poisson) and compare pyensmallen with scipy and statsmodels (I initially also tried to keep cvxpy in the comparison set but it was far too slow to be in the running). At large data sizes, pyensmallen is roughly an order of magnitude faster than scipy, which in turn is an order of magnitude faster than statsmodels. So, a single statsmodels run takes around as long as a pyensmallen run that naively uses the nonparametric bootstrap for inference. This makes the bootstrap a viable option for inference in large data settings.

Installation:

from pypi

pip install pyensmallen

from source

  1. Install armadillo and ensmallen for your system (build from source, or via conda-forge; I went with the latter)
  2. git clone this repository
  3. pip install -e .
  4. Profit? Or at least minimize loss?

from wheel

  • download the appropriate .whl for your system from the more recent release listed in Releases and run pip install ./pyensmallen... OR
  • copy the download url and run pip install https://github.com/apoorvalal/pyensmallen/releases/download/<version>/pyensmallen-<version>-<pyversion>-linux_x86_64.whl

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

pyensmallen-0.2.6.tar.gz (6.0 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pyensmallen-0.2.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

pyensmallen-0.2.6-cp312-cp312-macosx_11_0_arm64.whl (8.2 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

pyensmallen-0.2.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

pyensmallen-0.2.6-cp311-cp311-macosx_11_0_arm64.whl (8.2 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

pyensmallen-0.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

pyensmallen-0.2.6-cp310-cp310-macosx_11_0_arm64.whl (8.2 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file pyensmallen-0.2.6.tar.gz.

File metadata

  • Download URL: pyensmallen-0.2.6.tar.gz
  • Upload date:
  • Size: 6.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pyensmallen-0.2.6.tar.gz
Algorithm Hash digest
SHA256 6f6ac181a3ec7a11c6c7eee974b1d8fa6d5e71b07eccf995a29b7c6db7b48cc9
MD5 14825b02bf0c3c0838067a3593ed9c5b
BLAKE2b-256 a413e9dfb5c18b4a65492e93a305393497a8e3e97f358101905400249791fa0b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyensmallen-0.2.6.tar.gz:

Publisher: build.yml on apoorvalal/pyensmallen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyensmallen-0.2.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyensmallen-0.2.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0163397520020427922fa2189d5a4a1b4206925ea82b8201c06709d288942f4d
MD5 705aa08b63713273c06ae9792edabb58
BLAKE2b-256 a5b3d326f297553a6b8e43749ddfd301e23ccca4693ebea783a61126d794d6a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyensmallen-0.2.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: build.yml on apoorvalal/pyensmallen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyensmallen-0.2.6-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyensmallen-0.2.6-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e0f5cbfaa367607f7434aab3e8ff4fe06a46cf3bb085d4f67c0993bf5435c9bb
MD5 35b49c9379b7a3a8497396467bb218df
BLAKE2b-256 4290f229471ddc48a0668dd51c12ed99dd63808bb59c89333dd1bfd3ff21f10e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyensmallen-0.2.6-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: build.yml on apoorvalal/pyensmallen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyensmallen-0.2.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyensmallen-0.2.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6ecbaf43b538227d78d19fa52ea70634654ba40a1596774921920dc4df95ef11
MD5 ed2a1b4c8445b89aa1a0356cf13454a8
BLAKE2b-256 a4d967ba151fd57adfbb2c612a5cd30e937336dd073e68ad9bc665f79c43d3ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyensmallen-0.2.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: build.yml on apoorvalal/pyensmallen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyensmallen-0.2.6-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyensmallen-0.2.6-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 99ef4b03386a35d8d1d15fc66137f57e059acf5701a424704b96c1ca6ce9e78d
MD5 6b4e26cd3f66cca48b8dcfec02cc8ebb
BLAKE2b-256 f562d60cee51a3dc87ed2b65d12c3757ad8cd72bf367b8a655a87a537b184c39

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyensmallen-0.2.6-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: build.yml on apoorvalal/pyensmallen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyensmallen-0.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyensmallen-0.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1ce10e4e12f29c667529e2d51d2f2c564fc2fb1a543251db88045b6c536b2869
MD5 2906304c5cdb567806c8115ed936bfdc
BLAKE2b-256 b2ea32362eea79d8c53fbfa8d1af9019087cb3582f3218be10564a18fb4ff31c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyensmallen-0.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: build.yml on apoorvalal/pyensmallen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyensmallen-0.2.6-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyensmallen-0.2.6-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9552429856fb51093a8437d69104d2f608331014b4c61443ecbff279e3ce6db8
MD5 d05ea314266dc16b6df3e554ecd0c4cc
BLAKE2b-256 4762498c6a22ecd3b5679503367a05853443f2ecdc54f58547013bfb3e010553

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyensmallen-0.2.6-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: build.yml on apoorvalal/pyensmallen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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