Skip to content

Commit a3cf9ce

Browse files
committed
use package-internal groupslices
1 parent 7849b9d commit a3cf9ce

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

src/methods/information/definitions/transferentropy/transferoperator.jl

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import ComplexityMeasures: TransferOperator, invariantmeasure, InvariantMeasure, Probabilities
2-
using ComplexityMeasures.GroupSlices
2+
using ..GroupSlices
33
export TransferOperator
44

55
using ComplexityMeasures: Probabilities
@@ -55,13 +55,13 @@ end
5555
# transfer operator.
5656
function h4_marginal_probs(
5757
est::EntropyDecomposition{
58-
<:TransferEntropy,
59-
<:DiscreteInfoEstimator,
60-
<:CodifyVariables{1, <:TransferOperator},
58+
<:TransferEntropy,
59+
<:DiscreteInfoEstimator,
60+
<:CodifyVariables{1,<:TransferOperator},
6161
<:RelativeAmount
6262
},
63-
x...
64-
)
63+
x...
64+
)
6565
# We never reach this point unless the outcome space is the same for all marginals,
6666
# so we can safely pick the first outcome space.
6767
d::TransferOperator = first(est.discretization.outcome_spaces)
@@ -90,25 +90,25 @@ function h4_marginal_probs(
9090
cols_STC = [vars.S; vars.T; vars.C]
9191
cols_T⁺TC = [vars.Tf; vars.T; vars.C]
9292
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)
9494
pSTC = marginal_probs_from_μ(cols_STC, positive_measure_bins, iv, inds_non0measure)
9595
pT⁺TC = marginal_probs_from_μ(cols_T⁺TC, positive_measure_bins, iv, inds_non0measure)
9696
pST⁺TC = iv.ρ[inds_non0measure]
9797

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)
102102
end
103103

104104
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...)
112112
# If a conditional input (x[3]) is not provided, then C is just a 0-dimensional
113113
# StateSpaceSet. The horizontal concatenation of C with T then just returns T.
114114
# We therefore don't need separate methods for the conditional and non-conditional
@@ -118,10 +118,10 @@ function association(
118118
h_est = estimator_with_overridden_parameters(cmi_est.definition, cmi_est.est)
119119

120120
# Estimate by letting TE(s -> t | c) := I(t⁺; s⁻ | t⁻, c⁻).
121-
hSTC = information(h_est, pSTC)
121+
hSTC = information(h_est, pSTC)
122122
hT⁺TC = information(h_est, pT⁺TC)
123123
hTC = information(h_est, pTC)
124124
hST⁺TC = information(h_est, pST⁺TC)
125125
te = hT⁺TC - hTC - hST⁺TC + hSTC
126-
return te
126+
return te
127127
end

0 commit comments

Comments
 (0)