Skip to content

Commit

Permalink
Fix missing = and a few doc typos. (#317)
Browse files Browse the repository at this point in the history
  • Loading branch information
RomeoV authored Aug 24, 2023
1 parent f1bc2b7 commit ec4e882
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/methods/infomeasures/mutualinfo/estimators/GaussianMI.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ standard deviation. If `normalize == false`, then the algorithm proceeds without
normalization.
Next, the `C_{XY}`, the correlation matrix for the (normalized) joint data `XY` is
computed. The mutual information estimate
`GaussianMI` assumes the input variables are distributed according to normal
computed. The mutual information estimate `GaussianMI` assumes the input variables are distributed according to normal
distributions with zero means and unit standard deviations.
Therefore, given ``d_x``-dimensional and ``d_y``-dimensional input data `X` and `Y`,
`GaussianMI` first constructs the joint [`StateSpaceSet`](@ref) `XY`, then transforms each
Expand All @@ -38,16 +36,16 @@ The mutual information estimated (for `normalize == false`) is then estimated as
where we ``\\Sigma_X`` and ``\\Sigma_Y`` appear in ``\\Sigma`` as
```math
\\Sigma = \\begin{matrix}
\\Sigma = \\begin{bmatrix}
\\Sigma_{X} & \\Sigma^{'}\\\\
\\Sigma^{'} & \\Sigma_{Y}
\\end{matrix}.
\\end{bmatrix}.
```
If `normalize == true`, then the mutual information is estimated as
```math
\\hat{I}^S_{Gaussian}(X; Y) = -\\dfrac{1}{2} \\sum{i = 1}^{d_x + d_y} \\sigma_i,
\\hat{I}^S_{Gaussian}(X; Y) = -\\dfrac{1}{2} \\sum_{i = 1}^{d_x + d_y} \\sigma_i,
```
where ``\\sigma_i`` are the eigenvalues for ``\\Sigma``.
Expand All @@ -70,7 +68,7 @@ function estimate(measure::MIShannon, est::GaussianMI, x, y)
if est.normalize
Σ = fastcor(standardize(XY))
σ = eigvals(Σ)
mi -0.5 * sum(log(σᵢ) for σᵢ in σ)
mi = -0.5 * sum(log(σᵢ) for σᵢ in σ)
else
Σ = fastcor(XY)
Σx = Σ[1:DX, 1:DX]
Expand Down

0 comments on commit ec4e882

Please sign in to comment.