Skip to main content

polyhorner

This package will:

  • build univariate polynomials using an optimized Horner's method and fast numba loops
  • build multivariate polynomials using a somewhat optimized Horner's method and fast numba loops

univariate polynomial example

Suppose you have x, and y data, and you want to model y = a0 + a1 x + a2 x^2 + a3 x^3 + a4 x^4 Let Mat be a numpy matrix of size (N,1), where N is the number of data points. X = polyhorner.horner(Mat, 4) will build your X matrix ready for the regression (optimized using Horner's method)

multivaraite polynomial example

Suppose you have x, y, and z data, and you want to model using apolynomial of order 3 in x, and 2 in y, with cross-products z = a0 + a1 x + a2 x^2 + a3 x^3 + a4 y + a5 y^2 + a6 xy + a7 x^2y + a8 x^3y + a9 xy^2 + a10 x^2y^2 + a11 x^3y^2 let Mat be a numpy matrix of size (N,2), where N is the number of data points. let Expo be a numpy matrix of size (2,1) = (3,2) X = polyhorner.horner(Mat, Expo) will build your X matrix ready for the regression (semi-optimized using Horner's method)

I use some functions distributed under the GNU LGPL license from https://people.sc.fsu.edu/~jburkardt/py_src/monomial

Thanks to Pssolanki for helping fix issues

Metadata

Release files for polyhorner 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for polyhorner 1.1.0
File Size Uploaded
polyhorner-1.1.0.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for polyhorner 1.1.0
File Interpreter ABI Platform
polyhorner-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.7 kB

Release files / polyhorner-1.1.0.tar.gz

Download URL polyhorner-1.1.0.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
95cadc5a4c1eeb64e9958e6bdf682c217cbe7081572f1c179b11146d28906a1b
BLAKE2b-256 checksum
How to use checksums
44dc16e3ab7c767a6681d15c369dd2918caa17b96db413d461091eaacafc756b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.11.3 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.63.0 CPython/3.9.7

Release files / polyhorner-1.1.0-py3-none-any.whl

Download URL polyhorner-1.1.0-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9be2404565302a316a0d1fcaa4b6a8cce64951b9e4b7d8104c2757837d840923
BLAKE2b-256 checksum
How to use checksums
566a5e1e00c4c7071f88116e10f8ed705041af925b471237275da859731bb387
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.11.3 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.63.0 CPython/3.9.7

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.3.5

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.2.4

2 release files

0.2.3

1 release file

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page