- New function
cmi, which computes conditional mutual information.
- Bug fix in
mutualinfofor naive estimators from Entropies.jl.
- Release process updated.
- Fixed typo in documentation
- Documentation improvements.
- Documentation improvements.
- Internal API changes. Not affecting end user.
- Documentation update.
- Completely new API. See documentation for details.
Added convenience methods to compute regular transfer entropy directly from time series. The following methods work:
-
transferentropy(source, driver; dim = 3, τ = 1, η = 1): compute transfer entropy fromsourcetotargetusing adim-dimensional delay reconstruction with prediction lagηand embedding lagτ, inferring appropriate bin sizes from time series length. Extra dimensions are assigned to theT_{pp}component of the delay reconstruction. Returns the result over those binsizes. -
transferentropy(source, driver, Union{::RectangularBinning, AbstractArray{::RectangularBinning}}, dim = 3, τ = 1, η = 1): compute transfer entropy fromsourcetotargetusing adim-dimensional delay reconstruction with prediction lagηand embedding lagτ, specifying the partition(s) explicitly. Extra dimensions are assigned to theT_{pp}component of the delay reconstruction. Returns one transfer entropy estimate per partition. -
transferentropy(source, driver, k::Int, l::Int, m::Int; τ = 1, η = 1): compute transfer entropy fromsourcetotargetusing adim-dimensional delay reconstruction withkbeing the dimension of theT_fcomponent,lthe dimension of theT_{pp}component andmthe dimension of theS_{pp}component, using prediction lagηand embedding lagτ, inferring appropriate bin sizes from time series length. Returns the result over those binsizes. -
transferentropy(source, driver, k::Int, l::Int, m::Int; τ = 1, η = 1): compute transfer entropy fromsourcetotargetusing adim-dimensional delay reconstruction withkbeing the dimension of theT_fcomponent,lthe dimension of theT_{pp}component andmthe dimension of theS_{pp}component, using prediction lagηand embedding lagτ, specifying the partition(s) explicitly. Returns one transfer entropy estimate per partition.
The same works for computing conditional transfer entropy with three time series, but an extra time series and embedding component must be added, i.e. transferentropy(source, driver, cond; dim = 4, τ = 1, η = 1) or transferentropy(source, driver, cond; k::Int, l::Int, m::Int, n::Int; τ = 1, η = 1, where m is the dimension of the C_{pp} component of the delay reconstruction.
An optional estimator keyword may be provided. The default is estimator = VisitationFrequency(), but estimator = TransferOperatorGrid() also works. For triangulation-based estimators, you still need to compute the invariant measure manually first, then compute transfer entropy as usual.
- Added
te_embedfunction that for regular and conditional transfer entropy analyses constructs appropriate delay reconstruction points and correspondingTEVarsinstances that instructs thetransferentropymethods how to compute the marginals.
- Update documentation with more examples.
- Fix bug in triangulation estimator where multiple points at the origin was used to sample
simplices. This bug only affected the new methods with updates syntax from v
0.4.0.
New syntax for the different estimators.
-
transferentropy(pts, v::TEVars, binning_scheme::RectangularBinning, VisitationFrequency())uses a regular visitation frequency estimator. -
transferentropy(pts, v::TEVars, binning_scheme::RectangularBinning, TransferOperatorGrid())uses the transfer operator grid estimator.
For computing transfer entropy from triangulations, first compute the invariant measure over the triangulation, then superimpose a rectangular grid and compute the transfer entropy over that grid. For a precomputed invariant meausre, the syntax is:
transferentropy(μ::AbstractTriangulationInvariantMeasure, vars::TEVars, binning_scheme::RectangularBinning; n::Int = 10000).
For example:
μapprox = invariantmeasure(pts, TriangulationBinning(), ApproximateIntersection())
μexact = invariantmeasure(pts, TriangulationBinning(), ExactIntersection())
# Compute transfer entropy at single bin size
transferentropy(μapprox, vars, RectangularBinning(0.2))
transferentropy(μexact, vars, RectangularBinning(0.2))
# Compute transfer entropy from the invariant measure over multiple
# bin sizes. This is fast, because the measure has been precomputed.
binsizes = [0.2, 0.3, 0.5, 0.7]
[transferentropy(μapprox, vars, RectangularBinning(bs)) for bs in binsizes]
[transferentropy(μexact, vars, RectangularBinning(bs)) for bs in binsizes]