| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Fuzzy.Sets.Cardinality
Contents
Synopsis
- sigmaCount :: FuzzySet set a l => set -> Double
- thresholdSigmaCount :: FuzzySet set a l => l -> set -> Double
- normalizedSigmaCount :: FuzzySet set a l => set -> l
- sigmaCountWithModifier :: FuzzySet set a l => (l -> l) -> set -> Double
- modifierFunction :: ResiduatedLattice l => Double -> Double -> Double -> l -> l
- sigmoidModifier :: ResiduatedLattice l => Double -> Double -> l -> l
- identityModifier :: ResiduatedLattice l => l -> l
- subDiagonalModifier :: ResiduatedLattice l => Double -> l -> l
- alphaCutModifier :: ResiduatedLattice l => Double -> l -> l
Documentation
sigmaCount :: FuzzySet set a l => set -> Double Source #
Most commonly used way to tell the size of a fuzzy set. The sigma count is the sum of membership values of all elements in the universe set. For fuzzy set a |A| = Σ A(u) for all u ∈ U
Examples
>>>let set = fromPairs [(1, 0.2), (2, 0.7), (3, 0.5)] :: LSet Int UILukasiewicz>>>sigmaCount set1.4
>>>let emptySet = mkEmptySet :: LSet Int UILukasiewicz>>>sigmaCount emptySet0.0
thresholdSigmaCount :: FuzzySet set a l => l -> set -> Double Source #
Sigma count with a threshold applied. Only membership values greater or equal than the threshold are summed.
Examples
>>>let set = fromPairs [(1, 0.2), (2, 0.7), (3, 0.5)] :: LSet Int UILukasiewicz>>>thresholdSigmaCount 0.5 set1.2
>>>thresholdSigmaCount 0.8 set0.0
normalizedSigmaCount :: FuzzySet set a l => set -> l Source #
Normalized sigma count is like the standard sigma count, but the value is normalized to be in the interval [0,1].
Examples
>>>let set = fromPairs [(1, 0.2), (2, 0.7), (3, 0.5)] :: LSet Int UILukasiewicz>>>normalizedSigmaCount set0.4666666666666667
>>>let emptySet = mkEmptySet :: LSet Int UILukasiewicz>>>normalizedSigmaCount emptySet0.0
sigmaCountWithModifier :: FuzzySet set a l => (l -> l) -> set -> Double Source #
Similar to sigmaCount, but applies a modifier function c to each membership value before summing.
For a fuzzy set A, |A| = Σ c(A(u)) for all u ∈ U
Examples
>>>let set = fromPairs [(1, 0.2), (2, 0.7), (3, 0.5)] :: LSet Int UILukasiewicz>>>let modifier = sigmoidModifier 2.0 0.5>>>sigmaCountWithModifier modifier set1.4
Modifier functions
modifierFunction :: ResiduatedLattice l => Double -> Double -> Double -> l -> l Source #
A general modifier function that can be used to create specific modifier functions.
The parameters p, r, and threshold control the behavior of the modifier.
Examples
>>>let modifier = modifierFunction 2 2 0.5 :: UILukasiewicz -> UILukasiewicz>>>modifier 0.30.18
>>>modifier 0.70.82
sigmoidModifier :: ResiduatedLattice l => Double -> Double -> l -> l Source #
A sigmoid modifier function, a specific case of modifierFunction where `p = r`.
Examples
>>>let modifier = sigmoidModifier 2 :: UILukasiewicz -> UILukasiewicz>>>modifier 0.30.36
>>>modifier 0.70.84
identityModifier :: ResiduatedLattice l => l -> l Source #
Identity modifier function, which leaves the membership values unchanged.
Examples
>>>let modifier = identityModifier :: UILukasiewicz -> UILukasiewicz>>>modifier 0.30.3
>>>modifier 0.70.7
subDiagonalModifier :: ResiduatedLattice l => Double -> l -> l Source #
Sub-diagonal modifier function, a specific case of modifierFunction where `r = 1`.
Examples
>>>let modifier = subDiagonalModifier 2 :: UILukasiewicz -> UILukasiewicz>>>modifier 0.39.0e-2
>>>modifier 0.70.489999999999
alphaCutModifier :: ResiduatedLattice l => Double -> l -> l Source #