Represents a probability mass function (map from values to probabilities).
Function or value | Description |
Full Usage:
add equalBandwidthOrNominal histA histB
Parameters:
bool
-
Is the binwidth equal for both distributions? For nominal data set to true.
histA : Map<'a, ^value>
-
Empirical distribution A
histB : Map<'a, ^value>
-
Empirical distribution B
Returns: Map<'a, ^value>
New frequency map that results from merged maps histA and histB. Values from keys that are present in both maps are handled by f
Modifiers: inline |
Merges two maps into a single map. If a key exists in both maps, the value from mapB is added to the value of mapA. When applied to continuous data the bandwidths must be equal!This function is not commutative! (add a b) is not equal to (add b a)
|
Full Usage:
create bandwidth data
Parameters:
float
-
data : seq<float>
-
Returns: Map<float, float>
|
Creates probability mass function of the input sequence.
Example
|
Full Usage:
createNominal data
Parameters:
seq<'a>
-
Returns: Map<'a, float>
Modifiers: inline Type parameters: 'a |
Example
|
|
Creates probability mass function of the categories in the input sequence.
Example
|
Example
|
|
|
Example
|
|
Example
|
|
Example
|
Example
|
|
|
Example
|
Example
|
|
Full Usage:
merge equalBandwidthOrNominal histA histB
Parameters:
bool
-
Is the binwidth equal for both distributions? For nominal data set to true.
histA : Map<'a, 'value>
-
Empirical distribution A
histB : Map<'a, 'value>
-
Empirical distribution B
Returns: Map<'a, 'value>
New frequency map that results from merged maps histA and histB.
|
Merges two maps into a single map. If a key exists in both maps, the value in histA is superseded by the value in histB. When applied to continuous data the bandwidths must be equal!This function is not commutative! (merge a b) is not equal to (merge b a)
|
Full Usage:
mergeBy equalBandwidthOrNominal f histA histB
Parameters:
bool
-
Is the binwidth equal for both distributions? For nominal data set to true.
f : 'value -> 'value -> 'value
-
Function to transform values if key is present in both histograms. `histA-value → histB-value → newValue`
histA : Map<'a, 'value>
histB : Map<'a, 'value>
Returns: Map<'a, 'value>
New frequency map that results from merged maps mapA and mapB. Values from keys that are present in both maps are handled by f
|
Merges two maps into a single map. If a key exists in both maps, the value is determined by f with the first value being from mapA and the second originating from mapB. When applied to continuous data the bandwidths must be equal!This function is not commutative! (mergeBy f a b) is not equal to (mergeBy f b a)
|
|
Example
|
|
Example
|
|
Example
|
|
Normalizes this PMF so the sum of all probabilities equals 100 percent
Example
|
|
Example
|
|
Example
|
|
|
|
|
|
Example
|
Example
|
|
Example
|
|
|
Example
|