Documentation ¶
Index ¶
- func K(focals ...string) functionKey
- type BeliefFunction
- type CommonalityFunction
- type Function
- type MassFunction
- func (mf *MassFunction) Belief() (bf *BeliefFunction)
- func (mf *MassFunction) Commonality() (cf *CommonalityFunction)
- func (mf *MassFunction) Entropy() float64
- func (mf *MassFunction) FocalKeys() (fks []functionKey)
- func (mf *MassFunction) Focals() (f *Function)
- func (mf *MassFunction) Pignistic() (nmf *MassFunction)
- func (mf *MassFunction) Plausibility() (pf *PlausibilityFunction)
- func (mf *MassFunction) String() string
- func (mf *MassFunction) Valid() bool
- type PlausibilityFunction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BeliefFunction ¶
type BeliefFunction struct {
Function
}
A BeliefFunction is a mapping of possibilities to levels of support/belief.
func (*BeliefFunction) Valid ¶
func (bf *BeliefFunction) Valid() bool
Valid verifies that a given BeliefFunction meets the defined requirements for one. All probabilities must be in the range 0.0 >= p >= 1.0.
type CommonalityFunction ¶
type CommonalityFunction struct {
Function
}
A CommonalityFunction is a mapping of possibilities to levels of commonality.
func (*CommonalityFunction) Valid ¶
func (pf *CommonalityFunction) Valid() bool
Valid verifies that a given CommonalityFunction meets the defined requirements for one. All probabilities must be in the range 0.0 >= p >= 1.0.
type Function ¶
type Function struct {
// contains filtered or unexported fields
}
A Function is a mapping of possibilities to values in the 0.0 to 1.0 range, usually probabilities.
func (*Function) Possibilities ¶
func (f *Function) Possibilities() (fks []functionKey)
Possibilities returns a lexically sorted slice of possibilities
func (*Function) Powerset ¶
func (f *Function) Powerset() (fks []functionKey)
Powerset returns all combinations of function keys for this Function.
type MassFunction ¶
type MassFunction struct {
Function
}
A MassFunction is a mapping of possibilities to probabilities.
func CombineConjunctive ¶
func CombineConjunctive(mfns ...*MassFunction) *MassFunction
CombineConjunctive takes two or more MassFunctions and returns a new MassFunction according to Dempster's rule of combination. Returns nil if no MassFunctions are provided.
func CombineDisjunctive ¶
func CombineDisjunctive(mfns ...*MassFunction) (cf *MassFunction)
CombineDisjunctive takes two or more MassFunctions and returns a new MassFunction according to the disjunctive rule of combination. Returns nil if no MassFunctions are provided.
func CombineMurphyAverage ¶
func CombineMurphyAverage(mfns ...*MassFunction) (cf *MassFunction)
CombineMurphyAverage takes two or more MassFunctions and returns a new MassFunction according to Murphy's rule of combination, first averaging the masses and then performing a conjunctive combination. Returns nil if no MassFunctions are provided.
func (*MassFunction) Belief ¶
func (mf *MassFunction) Belief() (bf *BeliefFunction)
Belief converts a MassFunction into a BeliefFunction
func (*MassFunction) Commonality ¶
func (mf *MassFunction) Commonality() (cf *CommonalityFunction)
Commonality converts a MassFunction into a CommonalityFunction
func (*MassFunction) Entropy ¶
func (mf *MassFunction) Entropy() float64
Entropy returns the Deng entropy for the MassFunction.
func (*MassFunction) FocalKeys ¶
func (mf *MassFunction) FocalKeys() (fks []functionKey)
FocalKeys returns a slice containing just the focal keys
func (*MassFunction) Focals ¶
func (mf *MassFunction) Focals() (f *Function)
Focals returns a function containing just the focal set
func (*MassFunction) Pignistic ¶
func (mf *MassFunction) Pignistic() (nmf *MassFunction)
Pignistic returns a new MassFunction after application of the pignistic transformation containing only singletons.
func (*MassFunction) Plausibility ¶
func (mf *MassFunction) Plausibility() (pf *PlausibilityFunction)
Plausibility converts a MassFunction into a PlausibilityFunction
func (*MassFunction) String ¶
func (mf *MassFunction) String() string
func (*MassFunction) Valid ¶
func (mf *MassFunction) Valid() bool
Valid verifies that a given MassFunction meets the defined requirements for one. All probabilities must be in the range 0.0 >= p >= 1.0, and all probabilities must ultimately sum to 1.0.
type PlausibilityFunction ¶
type PlausibilityFunction struct {
Function
}
A PlausibilityFunction is a mapping of possibilities to levels of plausibility.
func (*PlausibilityFunction) Valid ¶
func (pf *PlausibilityFunction) Valid() bool
Valid verifies that a given PlausibilityFunction meets the defined requirements for one. All probabilities must be in the range 0.0 >= p >= 1.0.