Skip to content

Commit

Permalink
Rename package to Associations.jl (#377)
Browse files Browse the repository at this point in the history
* package rename

* fix docs build
  • Loading branch information
kahaaga authored Jul 27, 2024
1 parent 2face07 commit e394f37
Show file tree
Hide file tree
Showing 77 changed files with 263 additions and 264 deletions.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The CausalityTools.jl package is licensed under the MIT "Expat" License:
The Associations.jl package (previously called CausalityTools.jl) is licensed under the MIT "Expat" License:

> Copyright (c) 2018: Kristian Agasøster Haaga.
>
Expand Down
8 changes: 4 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name = "CausalityTools"
uuid = "5520caf5-2dd7-5c5d-bfcb-a00e56ac49f7"
name = "Associations"
uuid = "614afb3a-e278-4863-8805-9959372b9ec2"
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 = "3.0.0"
repo = "https://github.com/kahaaga/Associations.jl.git"
version = "4.0.0"

[deps]
Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697"
Expand Down
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# CausalityTools
# Associations

[![CI](https://github.com/juliadynamics/CausalityTools.jl/workflows/CI/badge.svg)](https://github.com/JuliaDynamics/CausalityTools.jl/actions)
[![](https://img.shields.io/badge/docs-latest_tagged-blue.svg)](https://juliadynamics.github.io/CausalityTools.jl/stable/)
[![](https://img.shields.io/badge/docs-dev_(master)-blue.svg)](https://juliadynamics.github.io/CausalityTools.jl/dev/)
[![codecov](https://codecov.io/gh/JuliaDynamics/CausalityTools.jl/branch/master/graph/badge.svg?token=0b71n6x6AP)](https://codecov.io/gh/JuliaDynamics/CausalityTools.jl)
[![CI](https://github.com/juliadynamics/Associations.jl/workflows/CI/badge.svg)](https://github.com/JuliaDynamics/Associations.jl/actions)
[![](https://img.shields.io/badge/docs-latest_tagged-blue.svg)](https://juliadynamics.github.io/Associations.jl/stable/)
[![](https://img.shields.io/badge/docs-dev_(master)-blue.svg)](https://juliadynamics.github.io/Associations.jl/dev/)
[![codecov](https://codecov.io/gh/JuliaDynamics/Associations.jl/branch/master/graph/badge.svg?token=0b71n6x6AP)](https://codecov.io/gh/JuliaDynamics/Associations.jl)
[![DOI](https://zenodo.org/badge/135443027.svg)](https://zenodo.org/badge/latestdoi/135443027)

CausalityTools.jl is a package for quantifying associations, independence testing and causal inference.
Associations.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
[documentation](https://juliadynamics.github.io/Associations.jl/dev), which you can either
find online or build locally by running the `docs/make.jl` file.

## Key features
Expand All @@ -31,4 +31,6 @@ we also offer

## Installation

To install the package, run `import Pkg; Pkg.add("CausalityTools")`.
To install the package, run `import Pkg; Pkg.add("Associations")`.

*Previously, this package was called CausalityTools.jl*.
1 change: 0 additions & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[deps]
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
CausalityTools = "5520caf5-2dd7-5c5d-bfcb-a00e56ac49f7"
ComplexityMeasures = "ab4b797d-85ee-42ba-b621-05d793b346a2"
DelayEmbeddings = "5732040d-69e3-5649-938a-b6b4f237613f"
Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
Expand Down
6 changes: 3 additions & 3 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ using DocumenterInterLinks
import Downloads

# Packages used in the doc build.
using CausalityTools
using Associations
using ComplexityMeasures
using StateSpaceSets

pages = [
"CausalityTools.jl" => "index.md",
"Associations.jl" => "index.md",
"Core API reference" => [
"Association measures" => "associations.md",
"Independence" => "independence.md",
Expand Down Expand Up @@ -43,7 +43,7 @@ bibliography = CitationBibliography(
style=:authoryear
)

build_docs_with_style(pages, CausalityTools, ComplexityMeasures, StateSpaceSets;
build_docs_with_style(pages, Associations, ComplexityMeasures, StateSpaceSets;
expandfirst = ["index.md"],
bib = bibliography,
pages = pages,
Expand Down
20 changes: 12 additions & 8 deletions docs/src/api/counts_and_probabilities_api.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@

```@meta
CollapsedDocStrings = true
```

# [Multivariate counts and probabilities API](@id counts_and_probabilities_api)

For counting and probabilities, CausalityTools.jl extends the single-variable machinery
For counting and probabilities, Associations.jl extends the single-variable machinery
in ComplexityMeasures.jl to multiple variables.

```@docs
CausalityTools.Counts
CausalityTools.counts(::OutcomeSpace)
Associations.Counts
Associations.counts(::OutcomeSpace)
```

```@docs
CausalityTools.Probabilities
CausalityTools.probabilities(::OutcomeSpace)
Associations.Probabilities
Associations.probabilities(::OutcomeSpace)
```

The utility function [`marginal`](@ref) is also useful.
Expand All @@ -26,7 +30,7 @@ Estimating multivariate counts (contingency matrices) and PMFs is simple. If the
we can use [`UniqueElements`](@ref) to simply count the number of occurrences.

```@example counts_probs_tutorial
using CausalityTools
using Associations
n = 50 # the number of samples must be the same for each input variable
x = rand(["dog", "cat", "snake"], n)
y = rand(1:4, n)
Expand All @@ -46,7 +50,7 @@ For numerical data, we can estimate both counts and probabilities using [`Codify
with any count-based [`OutcomeSpace`](@ref).

```@example counts_probs_tutorial
using CausalityTools
using Associations
x, y = rand(100), rand(100)
discretization = CodifyVariables(BubbleSortSwaps(m = 4))
probabilities(discretization, x, y)
Expand All @@ -55,7 +59,7 @@ probabilities(discretization, x, y)
For more fine-grained control, we can use [`CodifyPoints`](@ref) with one or several [`Encoding`](@ref)s.

```@example counts_probs_tutorial
using CausalityTools
using Associations
x, y = StateSpaceSet(rand(1000, 2)), StateSpaceSet(rand(1000, 3))
# min/max of the `rand` call is 0 and 1
Expand Down
6 changes: 3 additions & 3 deletions docs/src/api/cross_map_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Let's reproduce figure 3A too, focusing only on [`ConvergentCrossMapping`](@ref)
For this example, they use a bidirectional system with asymmetrical coupling strength.

```@example MAIN_CCM
using CausalityTools
using Associations
using Statistics
using LabelledArrays
using StaticArrays
Expand Down Expand Up @@ -201,7 +201,7 @@ slightly different embedding.


```@example MAIN_CCM
using CausalityTools
using Associations
using Statistics
using LabelledArrays
using StaticArrays
Expand Down Expand Up @@ -267,7 +267,7 @@ variables ``X`` and ``Y``, where ``X`` drives ``Y``.
After we have computed the PAI in both directions, we define a measure of directionality as the difference between PAI in the ``X \to Y`` direction and in the ``Y \to X`` direction, so that if ``X`` drives ``Y``, then ``\Delta < 0``.

```@example MAIN_CCM
using CausalityTools
using Associations
using LabelledArrays
using StaticArrays
using DynamicalSystemsBase
Expand Down
12 changes: 6 additions & 6 deletions docs/src/api/discretization_counts_probs_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ When discretizing, what happens is that we "encode" input data into an intermedi
- Once a dataset has been encoded into integers, we can estimate [`Counts`](@ref) or [`Probabilities`](@ref) ([tutorial](@ref tutorial_probabilities)).
- Once probabilities have been estimated, one can use these to estimate [`MultivariateInformationMeasure`](@ref) ([tutorial](@ref tutorial_infomeasures)).

The following functions and types are used by CausalityTools.jl to perform discretization of input data.
The following functions and types are used by Associations.jl to perform discretization of input data.

```@docs
Discretization
Expand All @@ -21,7 +21,7 @@ CodifyPoints
codify
```

In summary, the two main ways of discretizing data in CausalityTools are as follows.
In summary, the two main ways of discretizing data in Associations are as follows.

- The [`CodifyPoints`](@ref) discretization scheme encodes input data on a point-by-point
basis by applying some [`Encoding`](@ref) to each point.
Expand Down Expand Up @@ -66,7 +66,7 @@ We'll here use the [`OrdinalPatternEncoding`](@ref) with differing parameter `m`
multiple [`StateSpaceSet`](@ref) of differing dimensions.

```@example example_encode_points
using CausalityTools
using Associations
using StateSpaceSets
using Random; rng = Xoshiro(1234)
Expand Down Expand Up @@ -128,7 +128,7 @@ Some [`OutcomeSpace`](@ref)s dictate a sliding window which has the width of one
when used with [`CodifyVariables`](@ref). [`ValueBinning`](@ref) is such an outcome space.

```@example example_encode_vars
using CausalityTools
using Associations
using Random; rng = Xoshiro(1234)
x = rand(rng, 100)
Expand All @@ -150,7 +150,7 @@ end of each input variable are lost. For example, with [`OrdinalPatterns`](@ref)
of encoded points decrease with the embedding parameter `m`.

```@example example_encode_vars
using CausalityTools
using Associations
using Random; rng = Xoshiro(1234)
x = rand(rng, 100)
Expand All @@ -163,7 +163,7 @@ the same outcome space, as long as the operation will result in the *same* numbe
data points for each column.

```@example example_encode_vars
using CausalityTools
using Associations
using Random; rng = Xoshiro(1234)
x = rand(rng, 100)
Expand Down
14 changes: 7 additions & 7 deletions docs/src/api/information_multivariate_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Amplitude
## [A small tutorial](@id tutorial_infomeasures)


CausalityTools.jl extends the single-variate information API in
Associations.jl extends the single-variate information API in
[ComplexityMeasures.jl](https://github.com/JuliaDynamics/ComplexityMeasures.jl)
to information measures of multiple variables.

Expand Down Expand Up @@ -115,7 +115,7 @@ expressed as a function of a joint pmf, we can use the [`JointProbabilities`](@r
estimator.

```@example INFO_TUTORIAL
using CausalityTools
using Associations
using Random; rng = MersenneTwister(1234)
x, y = rand(rng, 1000), rand(rng, 1000)
Expand Down Expand Up @@ -143,7 +143,7 @@ they are functions of a joint pmf, and can therefore also be estimated using the
with 3 bins along each dimension to discretize the data.

```@example INFO_TUTORIAL
using CausalityTools
using Associations
using Random; rng = Xoshiro(1234)
x, y = randn(rng, 1000), randn(rng, 1000)
Expand All @@ -161,7 +161,7 @@ entropies are functionals of a joint pmf, so we can still use the
based discretization.

```@example INFO_TUTORIAL
using CausalityTools
using Associations
using Random; rng = Xoshiro(1234)
x, y = randn(rng, 1000), randn(rng, 1000)
Expand All @@ -179,7 +179,7 @@ example, one can use dedicated [`MutualInformationEstimator`](@ref)s such as
[`KraskovStögbauerGrassberger2`](@ref) or [`GaussianMI`](@ref):

```@example INFO_TUTORIAL
using CausalityTools
using Associations
using StateSpaceSets
# We'll construct two state space sets, to illustrate how we can discretize
# multidimensional inputs using `CodifyPoints`.
Expand Down Expand Up @@ -228,7 +228,7 @@ with any count-based [`OutcomeSpace`](@ref). Here, we'll estimate [`MIShannon`](
one type of encoding for the first variable, and another type of encoding for the second variable.

```@example counts_probs_tutorial
using CausalityTools
using Associations
using Random; rng = Xoshiro(1234)
x, y = rand(rng, 100), rand(rng, 100)
Expand All @@ -248,7 +248,7 @@ For more fine-grained control than [`CodifyVariables`](@ref) can offer, we can u
data by discretizing each input variable in arbitrary ways.

```@example counts_probs_tutorial
using CausalityTools
using Associations
using Random; rng = Xoshiro(1234)
x, y = StateSpaceSet(rand(rng, 1000, 2)), StateSpaceSet(rand(rng, 1000, 3))
Expand Down
Binary file removed docs/src/assets/logo-dark.png
Binary file not shown.
Binary file removed docs/src/assets/logo-large.png
Binary file not shown.
Binary file removed docs/src/assets/logo.png
Binary file not shown.
6 changes: 3 additions & 3 deletions docs/src/associations.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ CollapsedDocStrings = true
# [Associations](@id association_measures)

## Association API
The most basic components of CausalityTools.jl are a collection of statistics that in some manner quantify the "association" between input datasets. Precisely what is meant by "association" depends on the measure, and precisely what is meant by "quantify" depends on the *estimator* of that measure. We formalize this notion below with the [`association`](@ref)
The most basic components of Associations.jl are a collection of statistics that in some manner quantify the "association" between input datasets. Precisely what is meant by "association" depends on the measure, and precisely what is meant by "quantify" depends on the *estimator* of that measure. We formalize this notion below with the [`association`](@ref)
function, which dispatches on [`AssociationMeasureEstimator`](@ref) and [`AssociationMeasure`](@ref).


Expand All @@ -18,7 +18,7 @@ AssociationMeasureEstimator
Here are some examples of how to use [`association`](@ref).

```@repl
using CausalityTools
using Associations
x, y, z = rand(1000), rand(1000), rand(1000);
association(LMeasure(), x, y)
association(DistanceCorrelation(), x, y)
Expand Down Expand Up @@ -123,7 +123,7 @@ concept of "cross mapping", which has appeared in many contexts in the literatur
and gained huge popularity with [Sugihara2012](@citet)'s on *convergent cross mapping*.

Since their paper, several cross mapping methods and frameworks have emerged in the
literature. In CausalityTools.jl, we provide a unified interface for using these cross
literature. In Associations.jl, we provide a unified interface for using these cross
mapping methods.

```@docs
Expand Down
Loading

2 comments on commit e394f37

@kahaaga
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/111867

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v4.0.0 -m "<description of version>" e394f374faa6b76ffe9b8416eadce4a9efa8b734
git push origin v4.0.0

Also, note the warning: This looks like a new registration that registers version 4.0.0.
Ideally, you should register an initial release with 0.0.1, 0.1.0 or 1.0.0 version numbers
This can be safely ignored. However, if you want to fix this you can do so. Call register() again after making the fix. This will update the Pull request.

Please sign in to comment.