Single
dstz.evpiece.single
contour_transformation(ev)
Transforms a belief distribution into a contour function.
This transformation calculates the plausibility of each individual (singleton) element in the Frame of Discernment. The resulting distribution assigns each singleton element a mass equal to its plausibility value.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ev
|
Evidence
|
The evidence distribution. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Evidence |
A new |
Source code in dstz/evpiece/single.py
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | |
get_fod(ev)
Computes the Frame of Discernment (FoD) for an evidence object.
The Frame of Discernment is the set of all possible outcomes, which is constructed here by collecting all unique singleton elements from all focal sets within the given evidence.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ev
|
Evidence
|
The evidence object. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
set |
A set containing all unique singleton elements in the evidence. |
Source code in dstz/evpiece/single.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | |
pignistic_probability_transformation(ev)
Transforms a belief distribution into a pignistic probability distribution.
This transformation, often called BetP, converts a belief mass assignment into a classical probability distribution. It does this by distributing the mass of each focal element equally among all the individual (singleton) elements it contains.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ev
|
Evidence
|
An evidence distribution (mass function). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Evidence |
A new |
Source code in dstz/evpiece/single.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | |
shafer_discounting(ev, alpha, fod=None)
Applies Shafer's discounting to an evidence object.
Shafer discounting models partial reliability of an information source by transferring a portion of belief mass from each focal element to the entire Frame of Discernment (representing uncertainty).
Where alpha represents the degree of trust (1 = fully trusted, 0 = not trusted at all).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ev
|
Evidence
|
The evidence object to be discounted. |
required |
alpha
|
float
|
The discount factor, a value between 0 and 1 representing the degree of trust in the evidence source. |
required |
fod
|
set
|
Precomputed frame of discernment. If None, will be computed. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
Evidence |
A new, discounted |
Source code in dstz/evpiece/single.py
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | |
temperature_transformation(ev, t)
Apply temperature-based transformation to evidence values.
This function performs a temperature scaling operation on evidence values.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ev
|
Evidence
|
Input evidence object containing key-value pairs where values represent belief masses for corresponding keys. |
required |
t
|
float
|
Temperature parameter. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Evidence |
A new Evidence object with temperature-transformed and normalized values. |
Source code in dstz/evpiece/single.py
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | |