Skip to content

Commit

Permalink
Fix package name
Browse files Browse the repository at this point in the history
  • Loading branch information
charleskawczynski committed Jan 8, 2020
1 parent 49828b2 commit 4ea7e3b
Show file tree
Hide file tree
Showing 11 changed files with 58 additions and 28 deletions.
17 changes: 6 additions & 11 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,26 +1,21 @@
name = "Solus"
uuid = "16b9c28e-565c-11e9-13a9-53e2645fa95d"
authors = ["Simon Byrne <simonbyrne@gmail.com>"]
name = "CES"
uuid = "57e54526-abb8-4cd3-a48f-48a815226fdb"
authors = ["Charles_Kawczynski <kawczynski.charles@gmail.com>"]
version = "0.1.0"

[deps]
ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63"
ConfParser = "88353bc9-fd38-507d-a820-d3b43837d6b9"
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
EllipsisNotation = "da5c29d0-fa7d-589e-88eb-ea29b0a81949"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
NPZ = "15e1cf62-19b3-5cfa-8e77-841668bca605"
Parameters = "d96e819e-fc66-5662-9728-84c9c7592b0a"
PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0"
PyPlot = "d330b81b-6aea-500a-939a-2ce795aea3ee"
ScikitLearn = "3646fa90-6ef7-5e7e-9f22-8aca16db6324"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"

[extras]
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
NPZ = "15e1cf62-19b3-5cfa-8e77-841668bca605"
Parameters = "d96e819e-fc66-5662-9728-84c9c7592b0a"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["DifferentialEquations", "NPZ", "Parameters", "Test"]
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Solus.jl
# CES.jl

[![Travis Build Status](https://travis-ci.org/climate-machine/Solus.jl.svg?branch=master)](https://travis-ci.org/climate-machine/Solus.jl)
[![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/uslnruyhehva7bbv/branch/master?svg=true)](https://ci.appveyor.com/project/climate-machine/solus-jl/branch/master)
| **Build Status** |
|:------------------------------------------------------------------------------|
| [![appveyor][appveyor-img]][appveyor-url] [![travis][travis-img]][travis-url] |

[travis-img]: https://travis-ci.org/climate-machine/CES.jl.svg?branch=master
[travis-url]: https://travis-ci.org/climate-machine/CES.jl

[appveyor-img]: https://ci.appveyor.com/api/projects/status/uslnruyhehva7bbv/branch/master?svg=true
[appveyor-url]: https://ci.appveyor.com/project/climate-machine/CES.jl/branch/master

28 changes: 28 additions & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Base.HOME_PROJECT[] = abspath(Base.HOME_PROJECT[]) # JuliaLang/julia/pull/28625

using CES, Documenter

makedocs(
sitename = "CES.jl",
doctest = false,
strict = false,
format = Documenter.HTML(
prettyurls = get(ENV, "CI", nothing) == "true",
mathengine = MathJax(Dict(
:TeX => Dict(
:equationNumbers => Dict(:autoNumber => "AMS"),
:Macros => Dict()
)
))
),
clean = false,
modules = [Documenter, CES],
pages = Any[
"Home" => "index.md",
],
)

deploydocs(
repo = "github.com/climate-machine/CES.jl.git",
target = "build",
)
2 changes: 1 addition & 1 deletion examples/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ git-tree-sha1 = "012661b70364840fcd380912d878d96f7bf95ff3"
uuid = "b85f4697-e234-5449-a836-ec8e2f98b302"
version = "1.0.10"

[[Solus]]
[[CES]]
deps = ["Distributions", "DocStringExtensions", "LinearAlgebra", "Statistics", "Test"]
path = ".."
uuid = "16b9c28e-565c-11e9-13a9-53e2645fa95d"
Expand Down
2 changes: 1 addition & 1 deletion examples/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Parameters = "d96e819e-fc66-5662-9728-84c9c7592b0a"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
PyPlot = "d330b81b-6aea-500a-939a-2ce795aea3ee"
Solus = "16b9c28e-565c-11e9-13a9-53e2645fa95d"
CES = "16b9c28e-565c-11e9-13a9-53e2645fa95d"
2 changes: 1 addition & 1 deletion src/Solus.jl → src/CES.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Solus
module CES

using Distributions, Statistics, LinearAlgebra, DocStringExtensions

Expand Down
2 changes: 1 addition & 1 deletion src/GPR.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module GPR
"""
For the time being, please use `include("src/GPR.jl")` and not `using Solus.GPR`
For the time being, please use `include("src/GPR.jl")` and not `using CES.GPR`
since there are precompile issues with the backend (scikit-learn)
"""

Expand Down
4 changes: 2 additions & 2 deletions src/neki.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
"""
neki_iter(prob::SolusProblem, θs, fθs)
neki_iter(prob::CESProblem, θs, fθs)
Peform an iteration of NEKI, returning a new set of proposed `θs`.
See eqs. (5.4a-b) from https://arxiv.org/abs/1903.08866.
"""
function neki_iter(prob::SolusProblem, θs, fθs)
function neki_iter(prob::CESProblem, θs, fθs)
covθ = cov(θs)
meanθ = mean(θs)

Expand Down
8 changes: 4 additions & 4 deletions src/problems.jl
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"""
SolusProblem
CESProblem
An uncertainty quantification problem.
# Fields
$(DocStringExtensions.FIELDS)
"""
struct SolusProblem{P,M,O,S<:HilbertSpace}
struct CESProblem{P,M,O,S<:HilbertSpace}
"""
The prior distribution for the parameters ``θ``. Currently only `MvNormal` objects are supported.
"""
Expand All @@ -28,15 +28,15 @@ struct SolusProblem{P,M,O,S<:HilbertSpace}
"""
space::S
end
SolusProblem(prior, forwardmodel, obs) = SolusProblem(prior, forwardmodel, obs, DefaultSpace())
CESProblem(prior, forwardmodel, obs) = CESProblem(prior, forwardmodel, obs, DefaultSpace())


struct FlatPrior
end

Distributions.logpdf(::FlatPrior, x) = 0.0

function neglogposteriordensity(s::SolusProblem, θ)
function neglogposteriordensity(s::CESProblem, θ)
-logpdf(s.prior, θ) + norm(s.forwardmodel(θ) - s.obs, s.space)
end

6 changes: 3 additions & 3 deletions test/neki.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Test
using Solus
using CES
using LinearAlgebra, Distributions

@testset "NEKI" begin
Expand All @@ -16,14 +16,14 @@ using LinearAlgebra, Distributions

Γ = 0.1*Matrix{Float64}(I,10,10)

prob = Solus.SolusProblem(prior, f, y_obs, Solus.CovarianceSpace(Γ))
prob = CES.CESProblem(prior, f, y_obs, CES.CovarianceSpace(Γ))

J = 50
θs = [rand(2) for i in 1:J]

for i = 1:20
fθs = map(f, θs)
θs = Solus.neki_iter(prob, θs, fθs)
θs = CES.neki_iter(prob, θs, fθs)
end

postΣ = inv(inv(Σ) + A'*inv(Γ)*A)
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Test
using Solus
using CES
ENV["JULIA_LOG_LEVEL"] = "WARN"

include("neki.jl")
Expand Down

0 comments on commit 4ea7e3b

Please sign in to comment.