Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Pyfmtools provides various tools for handling fuzzy measures, calculating various indices, Choquet and Sugeno integrals, as well as fitting fuzzy measures to empirical data. This package is designed for Python , but it also includes the C++ source files and a user manual. Chapter 2 of the user manual provides some background on fuzzy measures. A more detailed overview can be found in [4, 5, 12, 16] and references therein. Chapter 3 of the user manual outlines computational methods used to fit fuzzy measures to empirical data. The description of the programming library pyfmtools is given in Chapter 4. Examples of its usage are provided in Section 4.6. To cite pyfmtools package, use references [2–6,21–24].
Random generation of fuzzy measures of different types, including k-additive, k-interactive, supermodular and submodular, sparse representation of k- additive fuzzy measures.
We added the concept of K-interactive fuzzy measures, and 4 methods of fitting K-interactive fuzzy measures from data based on linear program- ming. K-interactive fuzzy measures significantly reduce the computational complexity. We also added fitting fuzzy measures in marginal contribution representation and using maximal chains method, which fits only the values directly identifiable from the data. This method is useful for small data sets.
Fitting fuzzy measures in marginal contribution representation allows simple sub and supermodularity constraints, which can now be enforced.
See functions fittingKinteractive, fittingKinteractiveAuto, fittingKinter- activeMC, fittingKinteractiveMarginal, fittingKinteractiveMarginalMC.
We added calculation of new non-additivity and bipartition interaction indices. See functions Bipartition, BipartitionBanzhaf, NonadditivityIndex, NonadditivityIndexMob.
We added fitting K-maxitive and K-tolerant fuzzy measures, based on linear and mixed integer programming. See functions fittingktolerant and fittingK- maxitive.
We added a method for fitting sub-modular fuzzy measures reported in [3]. Supermodular fuzzy measure can also be fit by using duality: construct dual data set, fit a sub-modular fuzzy measure and then compute its dual. See function FuzzyMeasureFitLP.
We added an extra requirement of preservation of output ordering. See function FuzzyMeasureFitLP.
Fixed many warnings in the lpsolve code.
To install type:
$ pip install pyfmtools
import pyfmtools as pyfm
Follow these steps in your Python code to use the library:
n=3<br>
env = pyfm.fm_init( n)<br>
pyfm.fm_free( env)<br>
To implement a function follow these steps:
import pyfmtools as pyfm
n=3
env = pyfm.fm_init( n)
k = 2
Mob =[0.0,0.3,0.5,-0.2,0.4,0.1,-0.2,0.1]
pnm = pyfm.NonmodularityIndexMobkadditive(Mob, k, env)
print( "k: ", k)
print( "Mob: ", Mob)
print( "nonmodularity indices: ", pnm)
pyfm.fm_free( env)
See input parameter list in user manual
See output parameter list in user manual
To unit test type:
$ test/test_wrapper.py
from _pyfmtools import flib, lib
Follow these steps in your Python code to use the library:
n=3
env=ffi.new( "struct fm_env *")
fm.py_fm_init( n, env)
fm.py_fm_free( env)<br>
To implement a function follow these steps:
See input parameter list in user manual
See output parameter list in user manual
import numpy as np
from _pyfmtools import ffi,lib as fm
n=4
fm.py_fm_init(n, env);
ti=1
v = np.zeros(env.m,float);
pv = ffi.cast("double *", v.ctypes.data);
vb = np.zeros(env.m,float);
pvb = ffi.cast("double *", vb.ctypes.data);
size = fm.py_generate_fm_2additive_concave(ti,n,pv)
print( "2-additive concave FM in Mobius and its length (n=4)")
print( v)
print( "has ", size, " nonzero parameters ")
fm.py_fm_free( env);
To unit test type:
$ test/test_no_wrapper.py
FAQs
Library for handling and fitting fuzzy measures
We found that pyfmtools demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.