Skip to main content

Calculate weighted OWA functions and extending bivariate means

Project description

wowa

This package calculates weighted OWA functions and extending bivariate means" Functions are:

  • py_WAM: WOWATree callback function if sorting is needed in general
  • py_OWA: WOWATree callback function if no sorting is needed when used in the tree
  • WOWATree: symmetric base aggregator
  • WAn: processes the tree
  • weightedOWAQuantifierBuild: calculates spline knots and coefficients for later use in weightedOWAQuantifier
  • weightedOWAQuantifier: Calculates the value of the WOWA, with quantifier function obtained in weightedOWAQuantifierBuild
  • ImplicitWOWA: Calculates implicit Weighted OWA function
  • WAM: weighted arithmetic mean function
  • OWA: ordered weighted averaging function

Documentation

User Manual

Installation

To install type:

$ pip install wowa

Usage of py_OWA( n, x, w)

from wowa import py_OWA

WOWATree callback function if sorting is needed in general

Parameters

Input parameters:

n: size of arrays
x[]: NumPy array of size n, float
w[]: NumPy array of size n, float

Output parameters:

double y: aggregated sum

Usage of py_WAM( n, x, w)

from wowa import py_WAM

WOWATree callback function if no sorting is needed when used in the tree

Parameters

Input parameters:

n: size of arrays
x[]: NumPy array of size n, float
w[]: NumPy array of size n, float

Output parameters:

double y: aggregated sum

Usage of WOWATree( x, p, w, cb, L)

from wowa import WOWATree

Symmetric base aggregator. The weights must add to one and be non-negative.

Parameters

Input parameters:

x[]: NumPy array of inputs, size n, float
p[]: NumPy array of weights of inputs x[], size n, float
w[]: NumPy array of weights for OWA, size n, float
cb: Nallback function. Either pre-defined py_OWA() or py_WAM() or user defined of type float(ch*)(int, float[], float[], int)
L: Number of binary tree levels. Run time = O[(n-1)L]

Output parameters:

y: weightedf, double

Usage of WAn( x, w, L, F)

from wowa import WAn

Parameters

Input parameters:

x[]: NumPy array of inputs, size n, float
w[]: NumPy array of weights for OWA, size n, float
L: Number of binary tree levels
F: User defined callback function of type float(*F)( float, float)

Output parameters:

y: result of tree processing, double

Usage of weightedOWAQuantifierBuild( p, w)

from wowa import weightedOWAQuantifierBuild

Parameters

Input parameters:

p[]: NumPy array of weights of inputs x[], size n, float
w[]: NumPy array of weights for OWA, size n, float

Output parameters:

spline: the spline knots and coefficients for later use in weightedOWAQuantifier
T: the number of knots in the monotone spline

Usage of weightedOWAQuantifier( x, p, w, spline, T);

from wowa import weightedOWAQuantifier

Calculates the value of the WOWA, with quantifier function obtained in weightedOWAQuantifierBuild

Parameters

Input parameters:

x[]: NumPy array of inputs, size n, float
p[]: NumPy array of weights of inputs x[], size n, float
w[]: NumPy array of weights for OWA, size n, float
spline[]: keeps the spline knots and coefficients. Output from weightedOWAQuantifierBuild
T: the number of knots in the monotone spline

Output parameters:

y: double

Usage of ImplicitWOWA x, p, w)

from wowa import ImplicitWOWA

Calculates implicit Weighted OWA function

Parameters

Input parameters:

x[]: NumPy array of inputs, size n, float
p[]: NumPy array of weights of inputs x[], size n, float
w[]: NumPy array of weights for OWA, size n, float

Output parameters:

y: float

Usage of WAM( n, x, w)

from wowa import WAM

Weighted arithmetic mean function

Parameters

Input parameters:

n: size of arrays
x[]: NumPy array of size n, float
w[]: NumPy array of size n, float

Output parameters:

y: aggregated sum, float

Usage of OWA( n, x, w)

from wowa import OWA

Ordered weighted averaging function

Parameters

Input parameters:

n: size of arrays
x[]: NumPy array of size n, float
w[]: NumPy array of size n, float

Output parameters:

y: aggregated sum, float

Test

To unit test type:

$ test/test.py

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

wowa-1.12.tar.gz (409.3 kB view details)

Uploaded Source

Built Distribution

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

wowa-1.12-cp39-cp39-macosx_10_9_x86_64.whl (19.3 kB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

File details

Details for the file wowa-1.12.tar.gz.

File metadata

  • Download URL: wowa-1.12.tar.gz
  • Upload date:
  • Size: 409.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.8.1 keyring/23.1.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

File hashes

Hashes for wowa-1.12.tar.gz
Algorithm Hash digest
SHA256 78b3dcd7456d2235198a4093712da2465545e8bea841a88a5cdf56ddcbdf1b3e
MD5 4926a4326e9f9dac240cebcac61bfbf6
BLAKE2b-256 3a7449d0d13113d143ddf4d015f44f383127cebe3497bce3a27beb1c3902c402

See more details on using hashes here.

File details

Details for the file wowa-1.12-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: wowa-1.12-cp39-cp39-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 19.3 kB
  • Tags: CPython 3.9, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.8.1 keyring/23.1.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

File hashes

Hashes for wowa-1.12-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d2c51e49d6ccc42002895f0e0c5cd3010bee03aca5e58d9003924cc14d9e4f58
MD5 fc378664d867cd44df6ee5c2b440bbc5
BLAKE2b-256 cf70edac0d6bf73bc2d94af4b2f84d5baf1ebd9a8200faf6bb800c37951f52ff

See more details on using hashes here.

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