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
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:
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:
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: callback function
L: number of binary tree levels. Run time = O[(n-1)L]
Output parameters:
y = weightedf, double
Usage of WAn(double * x, double * w, int L, double(*F)( double, double))
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: umber of binary tree levels
F: callback function
Output parameters:
y = result of tree processing, double
Usage of weightedOWAQuantifierBuild( double p[], double w[], double temp[], int *T)
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
temp[]: working memory, keeps the spline knots and coefficients for later use in weightedOWAQuantifier. Should be at least 12(n+1) in length and the memory should be allocated by the calling program
T: = the number of knots in the monotone spline
Output parameters:
no output
Usage of weightedOWAQuantifier(double x[], double p[], double w[], double temp[], int T);
from wowa import weightedOWAQuantifier
Calculates the value of the WOWA, with quantifier function obtained in weightedOWAQuantifierBuild
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
temp[]: working memory, keeps the spline knots and coefficients for later use in weightedOWAQuantifier. Should be at least 12(n+1) in length and the memory should be allocated by the calling program
T: = the number of knots in the monotone spline
Input parameters:
Output parameters:
y = double
Usage of ImplicitWOWA(double x[], double p[], double 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 = double
Usage of WAM( n, x, w)
from wowa import WAM
Weighted arithmetic mean function
Parameters
Input 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 OWA( n, x, w)
from wowa import OWA
Ordered weighted averaging function
Parameters
Input 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
Test
To unit test type:
$ test/test.py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for wowa-0.83-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b0c2f54c19e7c09b64f7f426590065a6ba388e2d173c748498c836179fe323b |
|
MD5 | 171f4fccc7ee04f05a6871f3cbc57704 |
|
BLAKE2b-256 | 9644146893f68577b3c90cfd5156f1469e7a833e7b4a2ab5bd1b48d17ce4822a |