Package: wowa
wowaThis package calculates weighted OWA functions and extending bivariate means" Functions are:py_WAM: WOWATree callback function if sorting is needed in generalpy_OWA: WOWATree callback function if no sorting is needed when used in the treeWOWATree: symmetric base aggregatorWAn: processes the treeweightedOWAQuantifierBuild: calculates spline knots and coefficients for later use in weightedOWAQuantifierweightedOWAQuantifier: Calculates the value of the WOWA, with quantifier function obtained in weightedOWAQuantifierBuildImplicitWOWA: Calculates implicit Weighted OWA functionWAM: weighted arithmetic mean functionOWA: ordered weighted averaging functionDocumentationUser ManualInstallationTo install type:$pipinstallwowaUsage of py_OWA( n, x, w)fromwowaimportpy_OWAWOWATree callback function if sorting is needed in generalParametersInput parameters:n: size of arraysx[]: NumPy array of size n, floatw[]: NumPy array of size n, floatOutput parameters:double y: aggregated sumUsage of py_WAM( n, x, w)fromwowaimportpy_WAMWOWATree callback function if no sorting is needed when used in the treeParametersInput parameters:n: size of arraysx[]: NumPy array of size n, floatw[]: NumPy array of size n, floatOutput parameters:double y: aggregated sumUsage of WOWATree( x, p, w, cb, L)fromwowaimportWOWATreeSymmetric base aggregator. The weights must add to one and be non-negative.ParametersInput parameters:x[]: NumPy array of inputs, size n, floatp[]: NumPy array of weights of inputs x[], size n, floatw[]: NumPy array of weights for OWA, size n, floatcb: 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, doubleUsage of WAn( x, w, L, F)fromwowaimportWAnParametersInput parameters:x[]: NumPy array of inputs, size n, floatw[]: NumPy array of weights for OWA, size n, floatL: Number of binary tree levelsF: User defined callback function of type float(*F)( float, float)Output parameters:y: result of tree processing, doubleUsage of weightedOWAQuantifierBuild( p, w)fromwowaimportweightedOWAQuantifierBuildParametersInput parameters:p[]: NumPy array of weights of inputs x[], size n, floatw[]: NumPy array of weights for OWA, size n, floatOutput parameters:spline: the spline knots and coefficients for later use in weightedOWAQuantifierT: the number of knots in the monotone splineUsage of weightedOWAQuantifier( x, p, w, spline, T);fromwowaimportweightedOWAQuantifierCalculates the value of the WOWA, with quantifier function obtained in weightedOWAQuantifierBuildParametersInput parameters:x[]: NumPy array of inputs, size n, floatp[]: NumPy array of weights of inputs x[], size n, floatw[]: NumPy array of weights for OWA, size n, floatspline[]: keeps the spline knots and coefficients. Output from weightedOWAQuantifierBuildT: the number of knots in the monotone splineOutput parameters:y: doubleUsage of ImplicitWOWA x, p, w)fromwowaimportImplicitWOWACalculates implicit Weighted OWA functionParametersInput parameters:x[]: NumPy array of inputs, size n, floatp[]: NumPy array of weights of inputs x[], size n, floatw[]: NumPy array of weights for OWA, size n, floatOutput parameters:y: floatUsage of WAM( n, x, w)fromwowaimportWAMWeighted arithmetic mean functionParametersInput parameters:n: size of arraysx[]: NumPy array of size n, floatw[]: NumPy array of size n, floatOutput parameters:y: aggregated sum, floatUsage of OWA( n, x, w)fromwowaimportOWAOrdered weighted averaging functionParametersInput parameters:n: size of arraysx[]: NumPy array of size n, floatw[]: NumPy array of size n, floatOutput parameters:y: aggregated sum, floatTestTo unit test type:$test/test.py