Skip to main content

Python implementation of Arithmetic, quasi arithmetic and other aggregating functions

Project description

Means

Means, Aggregation functions...

Example 1:

# example data
data = [0.2, 0.6, 0.7]
# configure function parameters
func1 = A_amn(p=0.5)
# use aggregation funciton
print(func1(data))

# Combine two aggregations - arithmetic mean and minimum
func2 = Combine2Aggregations(A_ar(), min)
# use combination of aggregation funciton
print(func2(data))

Example2:

To get information about aggregation function you can use __str__() or 'repr()' methods.

func1 = A_amn(p=0.5)
print(func1)
>>>A_amn(0.5)

func2 = Combine2Aggregations(A_ar(), A_md())
print(func2)
>>>A_armd

func3 = Combine2Aggregations(A_ar(), A_pw(r=3))
print(func3.__repr__()) # function parameters are printed in order: func1, func2
>>>A_arpw(r=3)

exponential(y, r=1) is given by equation

$$ A_6^{(r)}(x_1,...,x_n)= \frac{1}{r}\ln \Big(\frac{1}{n} \sum \limits_{k=1}^{n} e^{rx_k}\Big), where r \in \mathbb{R}, r \neq 0 $$

A_ar - Arithmetic mean

A_qd - Quadratic mean

A_gm - Geometric mean

A_hm - Harmonic mean

A_pw - Power mean

A_ex, A_ex2, A_ex3 - Exponential mean

A_lm - Lehmer mean

A_amn - Arithmetic minimum mean

A_amx - Arithmetic maximum mean

A_md - Median - ordered weighted aggregation

A_ol - Olimpic aggregation

A_oln - Olimpic aggregation

We can specify how many greatest and smallest records remove

Combine2Aggregations - Combine aggregation functions

Amn, Amx, Aar , Aex , Amd, Aow1, Aow1

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

aggregationslib-0.0.253.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

aggregationslib-0.0.253-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file aggregationslib-0.0.253.tar.gz.

File metadata

  • Download URL: aggregationslib-0.0.253.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for aggregationslib-0.0.253.tar.gz
Algorithm Hash digest
SHA256 e2d14dde1a54b15d407e554935ef247835107e8ba9778c5397b62bf687f705c5
MD5 d61e3b130031cca0c7e2ce42c17d11c6
BLAKE2b-256 f9bfa7693dffb603b4188a1225cf49926182033c77842aa3d3d62a0f016ac394

See more details on using hashes here.

File details

Details for the file aggregationslib-0.0.253-py3-none-any.whl.

File metadata

File hashes

Hashes for aggregationslib-0.0.253-py3-none-any.whl
Algorithm Hash digest
SHA256 f7ad43e577fe6140c0e7826d7702d2b42ca753b99e9b0fc0617bf09e492c347b
MD5 9506ca41cda076a1917506ec22721acf
BLAKE2b-256 1585389a6176befcb7ecb3b94e0bf5bae5b49d88b5bd88982b53abba226a91d2

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