1
1
import ComplexityMeasures: TransferOperator, invariantmeasure, InvariantMeasure, Probabilities
2
- using ComplexityMeasures . GroupSlices
2
+ using . . GroupSlices
3
3
export TransferOperator
4
4
5
5
using ComplexityMeasures: Probabilities
55
55
# transfer operator.
56
56
function h4_marginal_probs (
57
57
est:: EntropyDecomposition {
58
- <: TransferEntropy ,
59
- <: DiscreteInfoEstimator ,
60
- <: CodifyVariables{1, <:TransferOperator} ,
58
+ <: TransferEntropy ,
59
+ <: DiscreteInfoEstimator ,
60
+ <: CodifyVariables{1,<:TransferOperator} ,
61
61
<: RelativeAmount
62
62
},
63
- x...
64
- )
63
+ x...
64
+ )
65
65
# We never reach this point unless the outcome space is the same for all marginals,
66
66
# so we can safely pick the first outcome space.
67
67
d:: TransferOperator = first (est. discretization. outcome_spaces)
@@ -90,25 +90,25 @@ function h4_marginal_probs(
90
90
cols_STC = [vars. S; vars. T; vars. C]
91
91
cols_T⁺TC = [vars. Tf; vars. T; vars. C]
92
92
cols_TC = [vars. T; vars. C]
93
- pTC = marginal_probs_from_μ (cols_TC, positive_measure_bins, iv, inds_non0measure)
93
+ pTC = marginal_probs_from_μ (cols_TC, positive_measure_bins, iv, inds_non0measure)
94
94
pSTC = marginal_probs_from_μ (cols_STC, positive_measure_bins, iv, inds_non0measure)
95
95
pT⁺TC = marginal_probs_from_μ (cols_T⁺TC, positive_measure_bins, iv, inds_non0measure)
96
96
pST⁺TC = iv. ρ[inds_non0measure]
97
97
98
- return Probabilities (pTC),
99
- Probabilities (pSTC),
100
- Probabilities (pT⁺TC),
101
- Probabilities (pST⁺TC)
98
+ return Probabilities (pTC),
99
+ Probabilities (pSTC),
100
+ Probabilities (pT⁺TC),
101
+ Probabilities (pST⁺TC)
102
102
end
103
103
104
104
function association (
105
- est:: EntropyDecomposition {
106
- <: TransferEntropy ,
107
- <: DiscreteInfoEstimator ,
108
- <: CodifyVariables{1, <:TransferOperator} ,
109
- <: RelativeAmount
110
- },
111
- x... )
105
+ est:: EntropyDecomposition {
106
+ <: TransferEntropy ,
107
+ <: DiscreteInfoEstimator ,
108
+ <: CodifyVariables{1,<:TransferOperator} ,
109
+ <: RelativeAmount
110
+ },
111
+ x... )
112
112
# If a conditional input (x[3]) is not provided, then C is just a 0-dimensional
113
113
# StateSpaceSet. The horizontal concatenation of C with T then just returns T.
114
114
# We therefore don't need separate methods for the conditional and non-conditional
@@ -118,10 +118,10 @@ function association(
118
118
h_est = estimator_with_overridden_parameters (cmi_est. definition, cmi_est. est)
119
119
120
120
# Estimate by letting TE(s -> t | c) := I(t⁺; s⁻ | t⁻, c⁻).
121
- hSTC = information (h_est, pSTC)
121
+ hSTC = information (h_est, pSTC)
122
122
hT⁺TC = information (h_est, pT⁺TC)
123
123
hTC = information (h_est, pTC)
124
124
hST⁺TC = information (h_est, pST⁺TC)
125
125
te = hT⁺TC - hTC - hST⁺TC + hSTC
126
- return te
126
+ return te
127
127
end
0 commit comments