-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactoring: Remove transforms (#38)
* Refactoring: Remove transforms * Update README
- Loading branch information
Showing
18 changed files
with
90 additions
and
492 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# ------------------------------------------------------------------ | ||
# Licensed under the MIT License. See LICENCE in the project root. | ||
# ------------------------------------------------------------------ | ||
|
||
include("logratio/alr.jl") | ||
include("logratio/clr.jl") | ||
include("logratio/ilr.jl") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# ------------------------------------------------------------------ | ||
# Licensed under the MIT License. See LICENCE in the project root. | ||
# ------------------------------------------------------------------ | ||
|
||
""" | ||
alr(c) | ||
Additive log-ratio transformation of composition `c`. | ||
""" | ||
function alr(c::Composition{D}) where {D} | ||
w = components(c) .+ eps() | ||
SVector(ntuple(i -> log(w[i] / w[D]), D - 1)) | ||
end | ||
|
||
""" | ||
alrinv(x) | ||
Inverse alr transformation of coordinates `x`. | ||
""" | ||
alrinv(x::SVector{D,T}) where {D,T<:Real} = Composition(𝒞([exp.(x); SVector(one(T))])) | ||
|
||
alrinv(x::AbstractVector) = alrinv(SVector{length(x)}(x)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.