Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V3: complete overhaul #372

Merged
merged 410 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
410 commits
Select commit Hold shift + click to select a range
7d361fe
Remove redundant definitions
kahaaga Oct 14, 2023
55e40b3
Use new syntax for CMI examples
kahaaga Oct 14, 2023
c846ae5
Documentation examples
kahaaga Oct 14, 2023
72ebe68
Docs...
kahaaga Oct 14, 2023
abaaa8e
References from ComplexityMeasures.jl
kahaaga Oct 14, 2023
fcae04d
Rearrange docs
kahaaga Oct 14, 2023
4ead8e0
More docs
kahaaga Oct 14, 2023
9b81662
Discretization using `CosineSimilarityBinning`
kahaaga Oct 14, 2023
080c59d
Delete example system docs
kahaaga Oct 14, 2023
229eb84
Docs for core
kahaaga Oct 14, 2023
6c740d1
Migrate conditional entropy examples
kahaaga Oct 14, 2023
7d4cfab
Missing @docs tag
kahaaga Oct 14, 2023
5c55d50
More docs
kahaaga Oct 14, 2023
c10b053
Docs
kahaaga Oct 14, 2023
142beb1
Remove some text
kahaaga Oct 14, 2023
77118ed
Fix `SurrogateAssociationTest` for transfer entropy
kahaaga Oct 14, 2023
66a2ee0
Fix various transfer entropy related issues and docs
kahaaga Oct 14, 2023
202fc0a
Add compatible `OutcomeSpace`s to docstring
kahaaga Oct 14, 2023
87ab675
More transfer entropy tests
kahaaga Oct 14, 2023
92f710e
Test `Lindner`
kahaaga Oct 14, 2023
05c48cb
New API
kahaaga Oct 14, 2023
c2b8d14
New API for cross mappings (estimators contain measure)
kahaaga Oct 15, 2023
e6dc19c
More docs
kahaaga Oct 15, 2023
d9ce4d8
New syntax
kahaaga Oct 15, 2023
34d0255
Include closeness and cross mapping files
kahaaga Oct 15, 2023
61406f5
Some doc restructuring
kahaaga Oct 15, 2023
8fe3461
Include relevant deprecations
kahaaga Oct 15, 2023
1be31c5
correct field name
kahaaga Oct 15, 2023
9bf4402
Fix crossmap doc example
kahaaga Oct 15, 2023
af23e43
Add explicit error messages
kahaaga Oct 15, 2023
5e79fcf
Changelog for cross mappings
kahaaga Oct 15, 2023
0375f72
More "deprecations"
kahaaga Oct 15, 2023
a2d308b
update changelog
kahaaga Oct 15, 2023
c27b51a
Move utility method to relevant file
kahaaga Oct 15, 2023
a7dd816
Remove obsolete tests
kahaaga Oct 15, 2023
b92e031
Remove duplicated header
kahaaga Oct 15, 2023
46961ee
Explicit imports
kahaaga Oct 16, 2023
2bf8b79
Make formal API
kahaaga Oct 16, 2023
54a81c2
Add note on measures defines also in Distances.jl
kahaaga Oct 16, 2023
8b5ac79
Reintroduce correlation measures
kahaaga Oct 16, 2023
2d1247e
Correlation API
kahaaga Oct 16, 2023
8f32510
Move counting and discretization to information measures
kahaaga Oct 16, 2023
02a263d
Crossmap API
kahaaga Oct 16, 2023
187e930
Correlation examples
kahaaga Oct 16, 2023
99901d0
Reintroduce closeness measures
kahaaga Oct 16, 2023
6cd699a
Reintroduce JointDistanceDistributionTest
kahaaga Oct 16, 2023
4263cff
Adhere to latest ComplexityMeasures api
kahaaga Jan 2, 2024
a89c4c5
WIP
kahaaga Jan 20, 2024
1fee598
Don't run compathelper so often
kahaaga Jan 20, 2024
1fb6617
Fix some missing refs
kahaaga Jan 20, 2024
e979810
Temporarily use local `build_docs_with_style`
kahaaga Jan 20, 2024
0e8145b
Start reorganizing docs mirroring ComplexityMeasures.jl
kahaaga Jun 6, 2024
5eefddd
docs
kahaaga Jun 6, 2024
9c860f3
Move crossmap api
kahaaga Jun 7, 2024
e39e68a
Aim for 1.11 while developing (tests/docs build faster)
kahaaga Jul 5, 2024
5e0dbf0
WIP: docs...
kahaaga Jul 5, 2024
f6b7a41
wip: Unify syntax, better docs, etc..
kahaaga Jul 6, 2024
780b3b9
Update docs
kahaaga Jul 6, 2024
50aa0c1
WIP...
kahaaga Jul 6, 2024
5e91f70
Preserve axis information when taking marginals
kahaaga Jul 7, 2024
7dba3f8
Add coverage files to gitignore
kahaaga Jul 14, 2024
76b9d30
deprecations
kahaaga Jul 14, 2024
e04f599
deprecations
kahaaga Jul 14, 2024
c6f24c8
Multidimensional surrogates
kahaaga Jul 14, 2024
f64e6ca
Fix import
kahaaga Jul 14, 2024
21450da
Headers
kahaaga Jul 14, 2024
2b0311a
Add reference
kahaaga Jul 14, 2024
baecae8
Refer to abstract types
kahaaga Jul 14, 2024
a386e36
deprecations
kahaaga Jul 14, 2024
f32dcd6
WIP...
kahaaga Jul 14, 2024
593d41f
organize a bit better
kahaaga Jul 21, 2024
2b5d895
update const name
kahaaga Jul 21, 2024
0817bf6
move to utils
kahaaga Jul 21, 2024
cab1270
Use cov/cor from StateSpaceSets 1.5
kahaaga Jul 21, 2024
bf44de2
Update package versions, add StyledStrings and set julia to 1.10
kahaaga Jul 21, 2024
5d9da48
Remove redundant tests
kahaaga Jul 21, 2024
8756d22
fix tests...
kahaaga Jul 21, 2024
1251ca1
fix tests
kahaaga Jul 21, 2024
c14c81c
fix tests
kahaaga Jul 21, 2024
2632bff
Typo
kahaaga Jul 21, 2024
31a58d8
Convenience union
kahaaga Jul 21, 2024
f556658
Remove unnecessary print
kahaaga Jul 21, 2024
f6aae61
Fix syntax
kahaaga Jul 21, 2024
4976d61
Update changelog
kahaaga Jul 21, 2024
fd55795
Fix tests
kahaaga Jul 21, 2024
1e2c9c9
faster tests with fewer sample
kahaaga Jul 21, 2024
2fc89c6
fix tests
kahaaga Jul 21, 2024
391f04f
cosmetics
kahaaga Jul 21, 2024
5b0d847
input validation
kahaaga Jul 21, 2024
709c5c9
cosmetics
kahaaga Jul 21, 2024
a99b522
remove integration
kahaaga Jul 21, 2024
8dafd9c
remove redundant ContingencyMatrix
kahaaga Jul 21, 2024
46d51a1
Add test dep
kahaaga Jul 21, 2024
f32b7a5
Test systems
kahaaga Jul 21, 2024
c2aee74
update deps
kahaaga Jul 21, 2024
7329f42
clean up main file
kahaaga Jul 21, 2024
179434a
remove redundant test
kahaaga Jul 21, 2024
bc9e04a
test cross mapping independence tests
kahaaga Jul 21, 2024
df1e447
Fix tests
kahaaga Jul 21, 2024
ad358d7
remove redundant file
kahaaga Jul 21, 2024
b5ae44a
Faster tests using fewer samples
kahaaga Jul 21, 2024
034114b
Fewer samples -> faster tests
kahaaga Jul 21, 2024
210ea65
input checks for all information measures
kahaaga Jul 21, 2024
8cd5ef0
fix tests and faster tests
kahaaga Jul 21, 2024
2fe1b14
faster tests
kahaaga Jul 21, 2024
872e060
Fix reference
kahaaga Jul 21, 2024
b33ab01
Part mutual information tests
kahaaga Jul 21, 2024
877eace
fix discretization for 1d state space sets
kahaaga Jul 21, 2024
c71b741
pmi tests and fix implementation
kahaaga Jul 21, 2024
afc635d
more tests
kahaaga Jul 21, 2024
b9c0e68
remove dev deps from project
kahaaga Jul 21, 2024
5ff5633
fewer samples, faster tests
kahaaga Jul 21, 2024
64b64af
Remove unnecessary deps from doc build
kahaaga Jul 21, 2024
276ec1c
LabelledArrays is needed
kahaaga Jul 21, 2024
46c8657
Fix example
kahaaga Jul 21, 2024
6e0bfbb
Fix OCE and PC
kahaaga Jul 21, 2024
b167c67
Consistent syntax
kahaaga Jul 21, 2024
9ac7773
Necessary imports
kahaaga Jul 21, 2024
a3e21b1
consistent syntax
kahaaga Jul 21, 2024
00196ea
Reintroduce network graph tests
kahaaga Jul 21, 2024
5bce760
Reintroduce example for graphs
kahaaga Jul 21, 2024
1441fe6
improve figures
kahaaga Jul 22, 2024
1c2bad2
update docs
kahaaga Jul 22, 2024
b75f6d3
fix tests and remove outdated syntax
kahaaga Jul 22, 2024
64ec888
less samples, faster tests
kahaaga Jul 22, 2024
f2672a3
actually test recurrence-based methods
kahaaga Jul 22, 2024
acc5f8a
more crossmap tests
kahaaga Jul 22, 2024
dec74cb
use rng
kahaaga Jul 22, 2024
2255c89
correct syntax
kahaaga Jul 22, 2024
253fe08
use rng
kahaaga Jul 22, 2024
35edf51
EntropyDecomposition tests
kahaaga Jul 22, 2024
a86ba77
Fix tests
kahaaga Jul 22, 2024
7f30705
Un-support `TransferOperator` estimation of transfer entropy
kahaaga Jul 22, 2024
9199b60
type parameterize outcome spaces, so we can dispatch properly
kahaaga Jul 22, 2024
bb539f1
Fix transfer entropy estimation using TransferOperator
kahaaga Jul 22, 2024
66ba58a
Generic dispatch for codifying marginals
kahaaga Jul 22, 2024
786e29d
node labels
kahaaga Jul 22, 2024
aafd3e1
Examples
kahaaga Jul 22, 2024
cc59ece
Add estimator to docstring
kahaaga Jul 22, 2024
7a5760a
more examples
kahaaga Jul 22, 2024
bc34438
fix test
kahaaga Jul 22, 2024
2a8abd2
remove reference to convenience func
kahaaga Jul 22, 2024
b3768cb
More examples
kahaaga Jul 22, 2024
6dd562f
More examples
kahaaga Jul 22, 2024
a1e1b09
examples for joint entropy
kahaaga Jul 22, 2024
0aa4b73
Add more examples
kahaaga Jul 22, 2024
876c509
Update docs and test
kahaaga Jul 22, 2024
d4f3c17
Update tests
kahaaga Jul 22, 2024
7c6fc6a
Keep important info in docstrings
kahaaga Jul 23, 2024
2e408a9
Clean-up
kahaaga Jul 23, 2024
b5f8c26
Add tests
kahaaga Jul 23, 2024
eef54e0
Add comments for clarity
kahaaga Jul 23, 2024
634e94e
Clean up docs
kahaaga Jul 23, 2024
b69ab4c
Clean up docs
kahaaga Jul 23, 2024
09f0172
Polish cross-map docs
kahaaga Jul 23, 2024
1ef37af
fix references
kahaaga Jul 23, 2024
07d907d
typo
kahaaga Jul 23, 2024
86947bc
Clean cross mapping stuff
kahaaga Jul 23, 2024
93b3f94
rng
kahaaga Jul 23, 2024
0b17c6e
Cross map docs
kahaaga Jul 23, 2024
8f82917
ccm docs
kahaaga Jul 23, 2024
4664a12
missing references
kahaaga Jul 23, 2024
81bdcfb
Clean up cross map stuff
kahaaga Jul 23, 2024
3987a5a
Clean up index.md
kahaaga Jul 23, 2024
bcb0a1b
cross map stuff
kahaaga Jul 23, 2024
945d6cc
add missing reference
kahaaga Jul 23, 2024
8f38360
fix codify method
kahaaga Jul 23, 2024
ee2cb90
add conversion method
kahaaga Jul 23, 2024
6ead9bd
add method for JointProbabilities
kahaaga Jul 23, 2024
e330b81
Add Hilbert
kahaaga Jul 23, 2024
21b85c2
add tests
kahaaga Jul 23, 2024
c0f4aec
docs..
kahaaga Jul 23, 2024
3485ccc
test coverage for MCR and RMCD
kahaaga Jul 23, 2024
dc4774e
remove redundant code
kahaaga Jul 23, 2024
0aa071a
remove redundant docstring
kahaaga Jul 23, 2024
66e26ac
Add hilbert rerference in docs
kahaaga Jul 23, 2024
8e0c910
Example and docs for recurrence measures
kahaaga Jul 23, 2024
f5123c5
Remove redundant docs
kahaaga Jul 23, 2024
9fb6389
Rename
kahaaga Jul 23, 2024
85b899e
docs
kahaaga Jul 23, 2024
4d50400
fix tutorial
kahaaga Jul 23, 2024
bb8482f
Fix examples
kahaaga Jul 23, 2024
5633447
SymbolicTransferEntropy convenience
kahaaga Jul 23, 2024
3e71a35
Fix docs
kahaaga Jul 23, 2024
d8bb999
Better example
kahaaga Jul 23, 2024
d145c27
typo
kahaaga Jul 23, 2024
8ab12e0
Test `SymbolicTransferEntropy`
kahaaga Jul 23, 2024
98d7841
test coverage
kahaaga Jul 23, 2024
6293daf
more tests
kahaaga Jul 23, 2024
046262d
More tests
kahaaga Jul 23, 2024
199b0af
tests
kahaaga Jul 24, 2024
66678bf
remove reference to deleted file
kahaaga Jul 24, 2024
3c6cfba
tests...
kahaaga Jul 24, 2024
93460f6
more tests
kahaaga Jul 24, 2024
a21c8d9
todo
kahaaga Jul 24, 2024
c92e8f6
bbnue.. wip
kahaaga Jul 24, 2024
4cee75f
wip..
kahaaga Jul 24, 2024
f0c9574
outer constructor
kahaaga Jul 24, 2024
2993d73
remove deprecations
kahaaga Jul 24, 2024
c7adecc
remove methods not finished yet
kahaaga Jul 24, 2024
b1fb204
fewer samples, faster tests
kahaaga Jul 24, 2024
180825f
Remove not finished bbnue
kahaaga Jul 24, 2024
f3fb599
remove unfinished code
kahaaga Jul 24, 2024
c000ab9
duplicate call
kahaaga Jul 24, 2024
0b6813e
remove unfinished code
kahaaga Jul 24, 2024
c9cd901
add tests
kahaaga Jul 24, 2024
81a5751
remove unused methods
kahaaga Jul 24, 2024
a83fb32
more tests
kahaaga Jul 24, 2024
0176b55
remove unfinished code
kahaaga Jul 24, 2024
2efac19
Alias
kahaaga Jul 24, 2024
d423d9e
include forgotten test file
kahaaga Jul 24, 2024
c60309a
remove unfinished code
kahaaga Jul 24, 2024
58511c9
Remember to export
kahaaga Jul 24, 2024
52e3eeb
more tests
kahaaga Jul 24, 2024
d01b905
remove redundant code
kahaaga Jul 24, 2024
1b32193
explicit access
kahaaga Jul 24, 2024
84ba1d4
remember to export
kahaaga Jul 24, 2024
f2c5906
more efficient TE tests for independence
kahaaga Jul 24, 2024
78884cf
Don't use deprecated syntax
kahaaga Jul 24, 2024
358d311
Error throwing handled at higher level
kahaaga Jul 24, 2024
aa5fc1a
More test coverage
kahaaga Jul 24, 2024
9455c46
More tests
kahaaga Jul 24, 2024
0fe1f12
fix test
kahaaga Jul 24, 2024
ed56e2a
add rng to test
kahaaga Jul 24, 2024
91fd983
Remove redundant code
kahaaga Jul 24, 2024
a222731
remove redundant utils
kahaaga Jul 24, 2024
fb750f9
more tests
kahaaga Jul 24, 2024
19dea5c
pretty printing
kahaaga Jul 24, 2024
fcb83ea
better printing of decomposition estimators
kahaaga Jul 24, 2024
ea54868
short-form printing
kahaaga Jul 24, 2024
9ba3987
typo
kahaaga Jul 24, 2024
110835f
more tests
kahaaga Jul 24, 2024
c81fe26
clean up @show statements
kahaaga Jul 24, 2024
5b37b42
remove redundant code
kahaaga Jul 24, 2024
25575d3
more tests
kahaaga Jul 24, 2024
2276a95
more tests
kahaaga Jul 24, 2024
4e3a635
Reorganize
kahaaga Jul 24, 2024
d97ebcc
Docs.
kahaaga Jul 24, 2024
2813494
docs...
kahaaga Jul 24, 2024
4c0fb87
doc fixes...
kahaaga Jul 24, 2024
547b8f6
Fix doc warnings..
kahaaga Jul 25, 2024
cc9ca35
Eliminate documentation warnings
kahaaga Jul 25, 2024
1fa5f94
Add DocumenterInterLinks
kahaaga Jul 25, 2024
d865bd9
docs..
kahaaga Jul 25, 2024
164b476
finalize docs
kahaaga Jul 25, 2024
a80972b
codify for multiple outcome spaces
kahaaga Jul 25, 2024
e55e65c
Add note
kahaaga Jul 25, 2024
8c8dd18
enable breaking docs on fails again
kahaaga Jul 26, 2024
3d9f575
fix broken link
kahaaga Jul 26, 2024
8d1bde8
remove empty file
kahaaga Jul 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CompatHelper

on:
schedule:
- cron: '00 * * * *'
- cron: '00 8 * * *'

jobs:
CompatHelper:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ Manifest.toml
*.scss
*.css
vscode/*
*.cov
34 changes: 15 additions & 19 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = "CausalityTools"
uuid = "5520caf5-2dd7-5c5d-bfcb-a00e56ac49f7"
authors = ["Kristian Agasøster Haaga <[email protected]>", "Tor Einar Møller <[email protected]>", "George Datseris <[email protected]>"]
repo = "https://github.com/kahaaga/CausalityTools.jl.git"
version = "2.10.1"
version = "3.0.0"

[deps]
Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697"
Expand All @@ -12,10 +12,9 @@ DSP = "717857b8-e6f2-59f4-9121-6e50c889abd2"
DelayEmbeddings = "5732040d-69e3-5649-938a-b6b4f237613f"
Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
DynamicalSystemsBase = "6e36e845-645a-534a-86f2-f5d4aa5a06b4"
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
HypothesisTests = "09f84164-cd44-5f33-b23f-e6b0d136a0d5"
LabelledArrays = "2ee39098-c373-598a-b85f-a56591580800"
LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
NearestNeighbors = "b8a86587-4115-5ab1-83bc-aa920d37bbce"
Neighborhood = "645ca80c-8b79-4109-87ea-e1f58159d116"
Expand All @@ -24,37 +23,34 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
RecurrenceAnalysis = "639c3291-70d9-5ea2-8c5b-839eba1ee399"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
Scratch = "6c6a2e73-6563-6170-7368-637461726353"
SimpleDiffEq = "05bca326-078c-5bf0-a5bf-ce7c7982d7fd"
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
StateSpaceSets = "40b095a5-5852-4c12-98c7-d43bf788e795"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
StyledStrings = "f489334b-da3d-4c2e-b8f0-e476e12c162b"
TimeseriesSurrogates = "c804724b-8c18-5caa-8579-6025a0767c70"

[compat]
Accessors = "^0.1.28"
Combinatorics = "1"
ComplexityMeasures = "2 - 2.8"
DSP = "0.7"
ComplexityMeasures = "3.6.5"
DSP = "^0.7"
DelayEmbeddings = "2.7"
Distances = "^0.10"
Distributions = "^0.24, 0.25"
DynamicalSystemsBase = "3"
Distributions = "^0.25"
Graphs = "^1.8"
HypothesisTests = "0.8, 1, 0.10, 0.11"
LabelledArrays = "1.6.7"
NearestNeighbors = "0.4"
Neighborhood = "0.2.2"
HypothesisTests = "^0.11"
NearestNeighbors = "^0.4"
Neighborhood = "^0.2.4"
ProgressMeter = "1.7"
RecurrenceAnalysis = "2"
Reexport = "0.2, 1"
Reexport = "1"
Scratch = "1"
SimpleDiffEq = "^1"
SpecialFunctions = "2"
StateSpaceSets = "^1.4"
StateSpaceSets = "^1.5"
StaticArrays = "^1"
StatsBase = "^0.33, 0.34"
TimeseriesSurrogates = "2.5"
julia = "^1.6"
StatsBase = "^0.34"
StyledStrings = "1"
TimeseriesSurrogates = "2.6"
julia = "^1.10"
27 changes: 15 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,28 @@
[![codecov](https://codecov.io/gh/JuliaDynamics/CausalityTools.jl/branch/master/graph/badge.svg?token=0b71n6x6AP)](https://codecov.io/gh/JuliaDynamics/CausalityTools.jl)
[![DOI](https://zenodo.org/badge/135443027.svg)](https://zenodo.org/badge/latestdoi/135443027)

CausalityTools.jl is a package for quantifying associations and dynamical coupling
between datasets, independence testing and causal inference.
CausalityTools.jl is a package for quantifying associations, independence testing and causal inference.

All further information is provided in the
[documentation](https://juliadynamics.github.io/CausalityTools.jl/dev), which you can either
find online or build locally by running the `docs/make.jl` file.

## Key features

- Association measures from conventional statistics, information theory and dynamical
systems theory, for example distance correlation, mutual information, transfer entropy,
convergent cross mapping and a lot more!
- A dedicated API for independence testing, which comes with automatic compatibility with
every measure-estimator combination you can think of. For example, we offer the generic
`SurrogateTest`, which is fully compatible with
[TimeseriesSurrogates.jl](https://github.com/JuliaDynamics/TimeseriesSurrogates.jl),
and the `LocalPermutationTest` for conditional indepencence testing.
- A dedicated API for causal network inference based on these measures and independence
tests.
- **Association API**: includes measures and their estimators for pairwise, conditional and other forms of
association from conventional statistics, from dynamical systems theory, and from information theory: partial correlation, distance correlation, (conditional) mutual information, transfer entropy, convergent cross mapping and a lot more!
- **Independence testing API**, which is automatically compatible with
every association measure estimator implemented in the package.
- **Causal (network) inference API** integrating the association measures and independence testing framework.

## Addititional features

Extending on features from [ComplexityMeasures.jl](https://github.com/JuliaDynamics/ComplexityMeasures.jl),
we also offer

- Discretization API for multiple (multivariate) input datasets.
- Multivariate counting and probability estimation API.
- Multivariate information measure API

## Installation

Expand Down
67 changes: 66 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,70 @@
# Changelog

## 3.0 (new major release)

This release contains several breaking changes. Any code from before v3.0 will need
updating to continue working with v3.0.

The main reason for these breaking changes is that estimators now store the
definitions they estimate. This way, we reduce the amount of code we have to write
maintain, document and test. At the same time, we hope it is a bit more user-friendly
to only relate to "one way of thinking" about estimating association measures.

### Breaking changes

#### Association measures

- The function `association(measure_or_est, input_data...)` is the central function that computes
all association measures. The first argument is either a measure definition (if it has no
estimator), or an estimator. This means that if `input_data` consists of two input datasets,
then a pairwise association is estimated. If `input_data` consists of three input datasets, then typically a conditional association is estimated (but exceptions are possible).

#### Independence testing

- `SurrogateTest` is now `SurrogateAssociationTest`
- `SurrogateTestResult` is now `SurrogateAssociationTestResult`

#### Example systems

- All example systems are removed.

#### Crossmap API

The crossmap API has been overhauled.

- `CrossmapEstimator`s now take the `CrossmapMeasure` definition as their first argument.
For example, you'll have to do `ExpandingSegment(CCM(); libsizes = 10:10:50)` instead
of `ExpandingSegment(; libsizes = 10:10:50)`.

#### Information API

The information API has been overhauled.

- Multivariate information measures now store their parameters explicitly, instead
of using `ComplexityMeasures.EntropyDefinition` to do so. For example, to
define Shannon-type conditional mutual information, one should do
`CMIShannon(base = 2)` instead of `CMIShannon(Shannon(base = 2))`.
- New generic discrete estimator `JointDistribution` for estimating multivariate
information measures. This estimators explicitly computes the joint distribution
based on the given discretization, and can be applied to any measure which is
defined as a function of a joint distribution.
- New generic decomposition-based estimator `EntropyDecomposition`. This estimator
computes some multivariate information measure by rewriting the measure definition
as a combination of some lower-level measure. For example, `CMIShannon` can be
rewritten as a sum of `Shannon` entropies. Each of these terms can then
be estimated using some differential entropy estimator, e.g. `ZhuSingh` or `Kraskov`.
- New generic decomposition-based estimator `MIDecomposition`. This estimator
computes some multivariate information measure by rewriting the measure definition
as a combination of some mutual information measure.
- New generic decomposition-based estimator `CMIDecomposition`. This estimator
computes some multivariate information measure by rewriting the measure definition
as a combination of some conditional mutual information measure.

### Bux fixes

- There was an error in the implementation of `PartMutualInformation`. It is now fixed using explicit loops for computing the measures from a probability distribution.


## 2.10

- Progress bars in some independence tests (surrogate, local permutation) can be
Expand Down Expand Up @@ -78,7 +143,7 @@ indices).
- Bugfix for `OCE` for certain conditional variable cases.
- Improve docstring for `OCE`.
- Updated readme.
- Fixed bug related to `DifferentialEntropyEstimator` "unit" conversion.
- Fixed bug related to `DifferentialInfoEstimator` "unit" conversion.

## 2.0

Expand Down
3 changes: 2 additions & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[deps]
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
CausalityTools = "5520caf5-2dd7-5c5d-bfcb-a00e56ac49f7"
ComplexityMeasures = "ab4b797d-85ee-42ba-b621-05d793b346a2"
Expand All @@ -8,6 +7,7 @@ Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244"
DocumenterInterLinks = "d12716ef-a0f6-4df4-a9f1-a5a34e75c656"
DocumenterTools = "35a29f4d-8980-5a13-9543-d66fff28ecb8"
DynamicalSystemsBase = "6e36e845-645a-534a-86f2-f5d4aa5a06b4"
GraphMakie = "1ecd5474-83a3-4783-bb4f-06765db800d2"
Expand All @@ -18,6 +18,7 @@ LabelledArrays = "2ee39098-c373-598a-b85f-a56591580800"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Revise = "295af30f-e4ad-537b-8983-00126c2a3abe"
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
StateSpaceSets = "40b095a5-5852-4c12-98c7-d43bf788e795"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Expand Down
94 changes: 94 additions & 0 deletions docs/build_docs_with_style.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
CI = get(ENV, "CI", nothing) == "true" || get(ENV, "GITHUB_TOKEN", nothing) !== nothing

import Pkg
Pkg.pkg"add Documenter@1"

# Load documenter
using Documenter
using DocumenterTools: Themes
ENV["JULIA_DEBUG"] = "Documenter"

# For easier debugging when downloading from a specific branch.
github_user = "JuliaDynamics"
branch = "master"
download_path = "https://raw.githubusercontent.com/$github_user/doctheme/$branch"

import Downloads
for file in ("juliadynamics-lightdefs.scss", "juliadynamics-darkdefs.scss", "juliadynamics-style.scss")
Downloads.download("$download_path/$file", joinpath(@__DIR__, file))
end

# create the themes
for w in ("light", "dark")
header = read(joinpath(@__DIR__, "juliadynamics-style.scss"), String)
theme = read(joinpath(@__DIR__, "juliadynamics-$(w)defs.scss"), String)
write(joinpath(@__DIR__, "juliadynamics-$(w).scss"), header*"\n"*theme)
end

# compile the themes
Themes.compile(joinpath(@__DIR__, "juliadynamics-light.scss"), joinpath(@__DIR__, "src/assets/themes/documenter-light.css"))
Themes.compile(joinpath(@__DIR__, "juliadynamics-dark.scss"), joinpath(@__DIR__, "src/assets/themes/documenter-dark.css"))

# Download and apply CairoMakie plotting style
using CairoMakie
Downloads.download("$download_path/style.jl", joinpath(@__DIR__, "style.jl"))
include("style.jl")

using DocumenterInterLinks

links = InterLinks(
"ComplexityMeasures" => (
"https://juliadynamics.github.io/DynamicalSystemsDocs.jl/complexitymeasures/stable/",
"https://juliadynamics.github.io/DynamicalSystemsDocs.jl/complexitymeasures/stable/objects.inv",
joinpath(@__DIR__, "inventories", "Documenter.toml")
),
"StateSpaceSets" => (
"https://juliadynamics.github.io/DynamicalSystemsDocs.jl/statespacesets/stable/",
"https://juliadynamics.github.io/DynamicalSystemsDocs.jl/statespacesets/stable/objects.inv",
joinpath(@__DIR__, "inventories", "Documenter.toml")
),
);

function build_docs_with_style(pages, modules...; bib = nothing, authors = "George Datseris", draft = false, kwargs...)
settings = (
modules = [modules...],
format = Documenter.HTML(
prettyurls = CI,
assets = [
asset("https://fonts.googleapis.com/css?family=Montserrat|Source+Code+Pro&display=swap", class=:css),
],
collapselevel = 3,
size_threshold = 1250 * 2^10,
size_threshold_warn = 750 * 2^10,
example_size_threshold = 100 * 2^10,
size_threshold_ignore = [
"examples/examples_associations.md",
"examples/examples_independence.md",
"examples/examples_infer_graphs.md",
]
),
sitename = "$(modules[1]).jl",
authors,
pages,
draft,
doctest = false,
warnonly = false,
checkdocs = :exported,
kwargs...
)

if isnothing(bib)
makedocs(; settings...)
else
makedocs(; plugins=[bib, links], settings...)
end

if CI
deploydocs(
repo = "github.com/JuliaDynamics/$(modules[1]).jl.git",
target = "build",
push_preview = true
)
end

end
35 changes: 23 additions & 12 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ cd(@__DIR__)
# Doc-specific (remaining packages are imported in `build_docs_with_style.jl`, which is
# downloaded)
using DocumenterCitations
using DocumenterInterLinks
import Downloads

# Packages used in the doc build.
Expand All @@ -10,21 +11,31 @@ using ComplexityMeasures
using StateSpaceSets

pages = [
"Overview" => "index.md",
"Association measures" => "measures.md",
"Independence testing" => "independence.md",
"Causal graphs" => "causal_graphs.md",
"APIs and estimators" => "api.md",
"Examples" => "examples.md",
"Predefined systems" => "coupled_systems.md",
"Experimental" => "experimental.md",
"CausalityTools.jl" => "index.md",
"Core API reference" => [
"Association measures" => "associations.md",
"Independence" => "independence.md",
"Network/graph inference" => "causal_graphs.md",
],
"Extended API reference" => [
"api/discretization_counts_probs_api.md",
"api/counts_and_probabilities_api.md",
"api/information_single_variable_api.md",
"api/information_multivariate_api.md",
"api/cross_map_api.md",
],
"Examples" => [
"Associations" => "examples/examples_associations.md",
"Independence testing" => "examples/examples_independence.md",
"Causal graph inference" => "examples/examples_infer_graphs.md",
],
"References" => "references.md",
]

Downloads.download(
"https://raw.githubusercontent.com/JuliaDynamics/doctheme/master/build_docs_with_style.jl",
joinpath(@__DIR__, "build_docs_with_style.jl")
)
# Downloads.download(
# "https://raw.githubusercontent.com/JuliaDynamics/doctheme/master/build_docs_with_style.jl",
# joinpath(@__DIR__, "build_docs_with_style.jl")
# )
include("build_docs_with_style.jl")

bibliography = CitationBibliography(
Expand Down
Loading
Loading