Skip to content

Commit

Permalink
Ready for v1.4.0, Documentation building should be fixed now
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelArutjunjan committed Feb 12, 2021
1 parent 709fef0 commit d887e2c
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ makedocs(
"Tutorial" => Any[ "Providing Data and Models" => "datamodels.md",
"Confidence Regions" => "confidence-regions.md",
"Kullback-Leibler Divergences" => "kullback-leibler.md"],
# Advanced Tutorial: Confidence Bands, Geodesics, Profile Likelihood, DataSetExact, Plotting, ODE Examples
"Contributing" => "todo.md",
],
)
Expand All @@ -22,7 +23,7 @@ makedocs(
# for more information.
deploydocs(
repo = "github.com/RafaelArutjunjan/InformationGeometry.jl.git",
# julia = "1.3",
# julia = "1.5",
# osname = "linux",
# target = "build",
)
2 changes: 1 addition & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This is the documentation of [**InformationGeometry.jl**](https://github.com/Raf

| **Build Status** |
|:----------------:|
| [![travis](https://travis-ci.com/RafaelArutjunjan/InformationGeometry.jl.svg?branch=master)](https://travis-ci.com/RafaelArutjunjan/InformationGeometry.jl) [![appveyor](https://ci.appveyor.com/api/projects/status/github/RafaelArutjunjan/InformationGeometry.jl?svg=true)](https://ci.appveyor.com/project/RafaelArutjunjan/InformationGeometry-jl) [![codecov](https://codecov.io/gh/RafaelArutjunjan/InformationGeometry.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/RafaelArutjunjan/InformationGeometry.jl) |
| [![appveyor](https://ci.appveyor.com/api/projects/status/github/RafaelArutjunjan/InformationGeometry.jl?svg=true)](https://ci.appveyor.com/project/RafaelArutjunjan/InformationGeometry-jl) [![codecov](https://codecov.io/gh/RafaelArutjunjan/InformationGeometry.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/RafaelArutjunjan/InformationGeometry.jl) |


## Main Uses
Expand Down
6 changes: 3 additions & 3 deletions src/ConfidenceRegions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ loglikelihood(DM::AbstractDataModel, θ::AbstractVector{<:Number}; kwargs...) =

@inline function loglikelihood(DS::AbstractDataSet, model::ModelOrFunction, θ::AbstractVector{<:Number}; kwargs...)
Y = ydata(DS) - EmbeddingMap(DS, model, θ; kwargs...)
-0.5*(DataspaceDim(DS)*log(2pi) - logdetInvCov(DS) + transpose(Y) * InvCov(DS) * Y)
-0.5*(DataspaceDim(DS)*log(2π) - logdetInvCov(DS) + transpose(Y) * InvCov(DS) * Y)
end


Expand Down Expand Up @@ -107,7 +107,7 @@ end
# Ftest(DM::DataModel, θ::Vector, MLE::Vector, Conf=ConfVol(1))::Bool = FtestPrepared(DM,θ,sum((ydata(DM) .- map(x->DM.model(x,MLE),xdata(DM))).^2),Conf)

# equivalent to ResidualSquares(DM,MLE(DM))
RS_MLE(DM::AbstractDataModel) = logdetInvCov(DM) - Npoints(DM)*ydim(DM)*log(2pi) - 2LogLikeMLE(DM)
RS_MLE(DM::AbstractDataModel) = logdetInvCov(DM) - Npoints(DM)*ydim(DM)*log(2π) - 2LogLikeMLE(DM)
ResidualSquares(DM::AbstractDataModel, θ::AbstractVector{<:Number}) = ResidualSquares(Data(DM), Predictor(DM), θ)
function ResidualSquares(DS::AbstractDataSet, model::ModelOrFunction, θ::AbstractVector{<:Number})
Y = ydata(DS) - EmbeddingMap(DS,model,θ)
Expand Down Expand Up @@ -821,7 +821,7 @@ Returns `HyperCube` which bounds the linearized confidence region of level `Conf
"""
function LinearCuboid(DM::AbstractDataModel, Confnum::Real=1.; Padding::Number=1/30, N::Int=200)
L = sqrt(InvChisqCDF(pdim(DM),ConfVol(Confnum))) .* cholesky(inv(Symmetric(FisherMetric(DM,MLE(DM))))).L
C = [ConstructCube(Unpack([L * RotatedVector(α,dims[1],dims[2],pdim(DM)) for α in range(0,2pi,length=N)]);Padding=Padding) for dims in permutations(1:pdim(DM),2)]
C = [ConstructCube(Unpack([L * RotatedVector(α,dims[1],dims[2],pdim(DM)) for α in range(0,2π,length=N)]);Padding=Padding) for dims in permutations(1:pdim(DM),2)]
TranslateCube(Union(C), MLE(DM))
end

Expand Down
4 changes: 2 additions & 2 deletions src/Geodesics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ end

# ADAPT FOR PLANES
function ConstLengthGeodesics(DM::AbstractDataModel,Metric::Function,MLE::Vector,Conf::Real=ConfVol(1), N::Int=100; tol::Real=6e-11)
angles = [2*pi*n/N for n in 1:N]
angles = [2π*n/N for n in 1:N]
Initials = [ [MLE...,cos(alpha),sin(alpha)] for alpha in angles]
solving = 0
function Constructor(Initial)
Expand Down Expand Up @@ -174,7 +174,7 @@ end

function ConstParamGeodesics(Metric::Function,MLE::Vector,Endtime::Number=10.,N::Int=100;
Boundaries::Union{Function,Nothing}=nothing, tol::Real=1e-13, parallel::Bool=false)
Initials = [ [cos(alpha),sin(alpha)] for alpha in range(0,2pi,length=N)]; solving = 0
Initials = [ [cos(alpha),sin(alpha)] for alpha in range(0,2π;length=N)]; solving = 0
Map = parallel ? pmap : map
function Constructor(Initial)
solving += 1
Expand Down
2 changes: 1 addition & 1 deletion src/Plotting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ PlotMatrix(inv(FisherMetric(DM,MLE)),MLE)
"""
function PlotMatrix(Mat::AbstractMatrix, MLE::AbstractVector{<:Number}=zeros(size(Mat,1)); dims::Tuple{Int,Int}=(1,2), N::Int=400, plot::Bool=true, kwargs...)
!(length(MLE) == size(Mat,1) == size(Mat,2)) && throw("PlotMatrix: Dimensional mismatch.")
C = sqrt(quantile(Chisq(length(MLE)),ConfVol(1))) .* cholesky(Symmetric(Mat)).L; angles = range(0,2pi,length=N)
C = sqrt(quantile(Chisq(length(MLE)),ConfVol(1))) .* cholesky(Symmetric(Mat)).L; angles = range(0,2π;length=N)
F::Number) = MLE + C * RotatedVector(α,dims[1],dims[2],length(MLE))
Data = Unpack(F.(angles))
if plot display(Plots.plot!(ToCols(Data)...;label="Matrix", kwargs...)) end
Expand Down
2 changes: 1 addition & 1 deletion src/Subspaces.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Shift(PlaneBegin::Plane, PlaneEnd::Plane) = TranslatePlane(PlaneEnd, PlaneEnd.st

IsOnPlane(PL::Plane, x::AbstractVector, ProjectionOp::AbstractMatrix=ProjectionOperator(PL))::Bool = DistanceToPlane(PL, x, ProjectionOp) < 4e-15
TranslatePlane(PL::Plane, v::AbstractVector) = Plane(PL.stütz + v, PL.Vx, PL.Vy)
RotatePlane(PL::Plane, rads::Real=pi/2) = Plane(PL.stütz,cos(rads)*PL.Vx + sin(rads)*PL.Vy, cos(rads)*PL.Vy - sin(rads)*PL.Vx)
RotatePlane(PL::Plane, rads::Real=π/2) = Plane(PL.stütz,cos(rads)*PL.Vx + sin(rads)*PL.Vy, cos(rads)*PL.Vy - sin(rads)*PL.Vx)
function RotationMatrix(PL::Plane, rads::Real)
V = PL.Vx*transpose(PL.Vx) + PL.Vy*transpose(PL.Vy)
W = PL.Vx*transpose(PL.Vy) - PL.Vy*transpose(PL.Vx)
Expand Down

2 comments on commit d887e2c

@RafaelArutjunjan
Copy link
Owner Author

Choose a reason for hiding this comment

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

@JuliaRegistrator register()

@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/29938

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 v1.4.0 -m "<description of version>" d887e2c85769bd02c3335e68e11ae2b508ad40e2
git push origin v1.4.0

Please sign in to comment.