Skip to content

Commit

Permalink
Merge pull request #68 from zenna/zt-prerelease
Browse files Browse the repository at this point in the history
Zt prerelease
  • Loading branch information
zenna committed Oct 5, 2018
2 parents 3d525c4 + a3b5a0a commit c92dba6
Show file tree
Hide file tree
Showing 41 changed files with 550 additions and 289 deletions.
8 changes: 0 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@ notifications:
email: false
env:
- DOCUMENTER_DEBUG="true" CONDA_JL_VERSION="2" PYTHON=""
script:
- julia -e 'using Pkg; Pkg.activate(pwd())'
- julia -e 'using Pkg; Pkg.update()'
- julia -e 'using Pkg; Pkg.resolve()'
- julia -e 'using Pkg; Pkg.build("Omega")'
- julia -e 'using Pkg; Pkg.add("Test")'
- julia -e 'using Pkg; Pkg.add("Pkg")'
- julia --depwarn=no -e 'using Pkg; Pkg.test("Omega", coverage=true)'
after_success:
- julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Codecov.submit(process_folder())'
- julia -e 'using Pkg; Pkg.add("Documenter"); include(joinpath("docs", "make.jl"))'
Expand Down
112 changes: 58 additions & 54 deletions Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ version = "0.3.1"

[[Arpack]]
deps = ["BinaryProvider", "Libdl", "LinearAlgebra", "Random", "SparseArrays", "Test"]
git-tree-sha1 = "ffc099065b47835213386df346e4a8b807c320cd"
git-tree-sha1 = "5b046410fb617d9cf2f8bc0edd5da05a2e5a2ad4"
uuid = "7d9fca2a-8960-54d3-9f78-7d1dccf2cb97"
version = "0.2.2"
version = "0.2.3"

[[Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
Expand All @@ -27,27 +27,33 @@ version = "0.8.10"

[[BinaryProvider]]
deps = ["Libdl", "Pkg", "SHA", "Test"]
git-tree-sha1 = "ffbf89cc49b073cffdb91381b7ee60557a03ec96"
git-tree-sha1 = "38be61810f280c3c478f5c38aaf387f8f9199275"
uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
version = "0.4.1"
version = "0.5.1"

[[Cassette]]
deps = ["InteractiveUtils", "LinearAlgebra", "Test"]
git-tree-sha1 = "97abd9e245237814b02d24e8e57c3bcbc2f59ac0"
git-tree-sha1 = "26fee677e5047978ad52d25f3f00fc86cecd1297"
uuid = "7057c7e9-c182-5462-911a-8362d720325c"
version = "0.1.1"
version = "0.1.2"

[[CodecZlib]]
deps = ["BinaryProvider", "Libdl", "Pkg", "Test", "TranscodingStreams"]
git-tree-sha1 = "83cb3d65c37ea1364c2d5bf7bcea41843ba645dc"
uuid = "944b1d66-785c-5afd-91f1-9de20f533193"
version = "0.5.0"

[[ColorTypes]]
deps = ["FixedPointNumbers", "Random", "Test"]
git-tree-sha1 = "0e3209ba7418aed732e5c3818076b4400ee36c08"
git-tree-sha1 = "f73b0e10f2a5756de7019818a41654686da06b09"
uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f"
version = "0.7.4"
version = "0.7.5"

[[Colors]]
deps = ["ColorTypes", "FixedPointNumbers", "InteractiveUtils", "Pkg", "Printf", "Reexport", "Test"]
git-tree-sha1 = "26f24e97782dd19d52cf97073c316897ac4d0e30"
git-tree-sha1 = "8c89e0a9a583954eae3efcf6a531e51c02b38cee"
uuid = "5ae59095-9a9b-59fe-a467-6f913c188581"
version = "0.9.3"
version = "0.9.4"

[[CommonSubexpressions]]
deps = ["Test"]
Expand All @@ -57,15 +63,15 @@ version = "0.2.0"

[[Compat]]
deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"]
git-tree-sha1 = "277d3807440d9793421354b6680911fc95d91a84"
git-tree-sha1 = "ff2595695fc4f14427358ce2593f867085c45dcb"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "1.0.1"
version = "1.2.0"

[[DataStructures]]
deps = ["InteractiveUtils", "REPL", "Random", "Serialization", "Test"]
git-tree-sha1 = "6e72a9098f5774601c8c8d6a4511a68270594910"
deps = ["InteractiveUtils", "OrderedCollections", "REPL", "Random", "Serialization", "Test"]
git-tree-sha1 = "8fc6e166e24fda04b2b648d4260cdad241788c54"
uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
version = "0.11.0"
version = "0.14.0"

[[Dates]]
deps = ["Printf"]
Expand All @@ -92,44 +98,38 @@ deps = ["LinearAlgebra", "Random", "Serialization", "Sockets"]
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"

[[Distributions]]
deps = ["Distributed", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns", "Test"]
git-tree-sha1 = "c43dc10a52598ad76d61f8907b3b30f159ca146f"
deps = ["Distributed", "LinearAlgebra", "PDMats", "Pkg", "Printf", "QuadGK", "Random", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns", "Test"]
git-tree-sha1 = "c24e9b6500c037673f0241a2783472b8c3d080c7"
uuid = "31c24e10-a181-5473-b8eb-7969acd0382f"
version = "0.16.2"
version = "0.16.4"

[[FixedPointNumbers]]
deps = ["Pkg", "Test"]
git-tree-sha1 = "31cbf24d537a217475b37274df05de09882b53f1"
git-tree-sha1 = "b8045033701c3b10bf2324d7203404be7aef88ba"
uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93"
version = "0.5.2"
version = "0.5.3"

[[Flux]]
deps = ["AbstractTrees", "Adapt", "Colors", "DiffRules", "ForwardDiff", "GZip", "Juno", "LinearAlgebra", "MacroTools", "NNlib", "NaNMath", "Printf", "Random", "Reexport", "Requires", "SpecialFunctions", "Statistics", "StatsBase", "Test", "ZipFile"]
git-tree-sha1 = "7cb08b05904dcb869a2a3bd35d97ad6eb77ce20f"
deps = ["AbstractTrees", "Adapt", "CodecZlib", "Colors", "DiffRules", "ForwardDiff", "Juno", "LinearAlgebra", "MacroTools", "NNlib", "NaNMath", "Pkg", "Printf", "Random", "Reexport", "Requires", "SpecialFunctions", "Statistics", "StatsBase", "Test", "ZipFile"]
git-tree-sha1 = "b9fc47f3eeb8062c9dac3a74bca9fd83f7e0fbf5"
uuid = "587475ba-b771-5e3f-ad9e-33799f191a9c"
version = "0.6.3"
version = "0.6.7"

[[ForwardDiff]]
deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "InteractiveUtils", "LinearAlgebra", "NaNMath", "Pkg", "Random", "SparseArrays", "SpecialFunctions", "StaticArrays", "Test"]
git-tree-sha1 = "0dd11038da4efce9ce457b1cf47a52eaf6251bd3"
git-tree-sha1 = "8425a7d4e060bc2ded32d090bce910a187d6cce7"
uuid = "f6369f11-7733-5829-9624-2563aa707210"
version = "0.8.5"

[[GZip]]
deps = ["Libdl", "Pkg", "Test"]
git-tree-sha1 = "ee443ef166b29282301468d8af403e1ed8f5412e"
uuid = "92fee26a-97fe-5a0c-ad85-20a5f3185b63"
version = "0.5.0"
version = "0.9.0"

[[InteractiveUtils]]
deps = ["LinearAlgebra", "Markdown"]
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"

[[Juno]]
deps = ["Base64", "Logging", "Media", "Profile", "Test"]
git-tree-sha1 = "f2d553719755f00f602cb226689c0bcfee023a1d"
git-tree-sha1 = "3c29a199713e7ec62cfdc11f44d7760219d5f658"
uuid = "e5e0dc1b-0480-54bc-9374-aad01c23163d"
version = "0.5.2"
version = "0.5.3"

[[LibGit2]]
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"
Expand Down Expand Up @@ -162,30 +162,36 @@ version = "0.4.1"

[[Missings]]
deps = ["Dates", "InteractiveUtils", "SparseArrays", "Test"]
git-tree-sha1 = "196528fa1df03df435025f52f9c1ff8356f94738"
git-tree-sha1 = "adc26d2ee85a49c413464110d922cf21efc9d233"
uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28"
version = "0.3.0"
version = "0.3.1"

[[Mmap]]
uuid = "a63ad114-7e13-5084-954f-fe012c677804"

[[NNlib]]
deps = ["Libdl", "LinearAlgebra", "MacroTools", "Requires", "Test"]
git-tree-sha1 = "1375b53e79080b37705a4040c97f1ded4e332cac"
git-tree-sha1 = "d7f65ad9734adea3c5a4c473bc65b365f8afbb2b"
uuid = "872c559c-99b0-510c-b3b7-b6c96a88d5cd"
version = "0.4.1"
version = "0.4.2"

[[NaNMath]]
deps = ["Compat"]
git-tree-sha1 = "ce3b85e484a5d4c71dd5316215069311135fa9f2"
uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3"
version = "0.3.2"

[[OrderedCollections]]
deps = ["Pkg", "Random", "Serialization", "Test"]
git-tree-sha1 = "85619a3f3e17bb4761fe1b1fd47f0e979f964d5b"
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
version = "1.0.2"

[[PDMats]]
deps = ["Arpack", "LinearAlgebra", "SparseArrays", "SuiteSparse", "Test"]
git-tree-sha1 = "484f7fbb6c382ab6bcfff4d134f9b51fa29ee562"
git-tree-sha1 = "9e3e7a5c9b8cfdba8c01a1bcae38fe0144936fda"
uuid = "90014a1f-27ba-587c-ab20-58faa44d9150"
version = "0.9.4"
version = "0.9.5"

[[Pkg]]
deps = ["Dates", "LibGit2", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
Expand All @@ -207,9 +213,9 @@ version = "0.6.0"

[[QuadGK]]
deps = ["DataStructures", "LinearAlgebra", "Test"]
git-tree-sha1 = "7d61ca207f021be6574b365a1a077bea04935f19"
git-tree-sha1 = "7e8dff9c205f36eceaf6e62a43ff851637ca45fc"
uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc"
version = "2.0.1"
version = "2.0.2"

[[REPL]]
deps = ["InteractiveUtils", "Markdown", "Sockets"]
Expand Down Expand Up @@ -262,17 +268,17 @@ uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

[[Spec]]
deps = ["Cassette"]
git-tree-sha1 = "3d74b2848fa5c7a4313d04b79314853f328af292"
git-tree-sha1 = "275d533031b8c97b6ca38b83395a435524a3dc46"
repo-rev = "master"
repo-url = "https://github.com/zenna/Spec.jl"
uuid = "526a04b8-654b-11e8-1588-db2a414f95b5"
version = "0.1.0"
version = "0.1.3"

[[SpecialFunctions]]
deps = ["BinDeps", "BinaryProvider", "Compat", "Libdl"]
git-tree-sha1 = "d12f8917be3782f4b800ba16003b8d0d4858c2e5"
deps = ["BinDeps", "BinaryProvider", "Libdl", "Test"]
git-tree-sha1 = "c35c9c76008babf4d658060fc64aeb369a41e7bd"
uuid = "276daf66-3868-5448-9aa4-cd146d93841b"
version = "0.7.0"
version = "0.7.1"

[[StaticArrays]]
deps = ["InteractiveUtils", "LinearAlgebra", "Random", "Statistics", "Test"]
Expand Down Expand Up @@ -304,6 +310,12 @@ uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9"
deps = ["Distributed", "InteractiveUtils", "Logging", "Random"]
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[[TranscodingStreams]]
deps = ["DelimitedFiles", "Pkg", "Random", "Test"]
git-tree-sha1 = "a34a2d588e2d2825602bf14a24216d5c8b0921ec"
uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa"
version = "0.8.1"

[[URIParser]]
deps = ["Test", "Unicode"]
git-tree-sha1 = "6ddf8244220dfda2f17539fa8c9de20d6c575b69"
Expand All @@ -323,14 +335,6 @@ git-tree-sha1 = "d26d1e85fb7e9d432a7bb0cd6e421e8a82928604"
uuid = "b8865327-cd53-5732-bb35-84acbb429228"
version = "0.3.1"

[[ZenUtils]]
deps = ["Spec"]
git-tree-sha1 = "491d56ddfe16356a2b2a35f6238093884cf12925"
repo-rev = "master"
repo-url = "https://github.com/zenna/ZenUtils.jl"
uuid = "8c7a6496-654a-11e8-0e4c-c7dc3dc823b6"
version = "0.1.0"

[[ZipFile]]
deps = ["Printf", "Test"]
git-tree-sha1 = "c191e56c849b1784cacbf7cd5e52cc672f1ae2db"
Expand Down
10 changes: 8 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ authors = ["Zenna Tavares <zennatavares@gmail.com>"]
version = "0.1.0"

[deps]
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Flux = "587475ba-b771-5e3f-ad9e-33799f191a9c"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
Expand All @@ -14,4 +13,11 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Spec = "526a04b8-654b-11e8-1588-db2a414f95b5"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
UnicodePlots = "b8865327-cd53-5732-bb35-84acbb429228"
ZenUtils = "8c7a6496-654a-11e8-0e4c-c7dc3dc823b6"

[extras]
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test", "InteractiveUtils", "Pkg"]
7 changes: 5 additions & 2 deletions REQUIRE
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
julia 0.6
julia 0.7
Flux
Distributions
PDMats
ProgressMeter
Spec
Spec

# Will probably remove
UnicodePlots
4 changes: 3 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ makedocs(
"Causal Inference" => "causal.md",
"Higher Order Inference" => "higher.md",
"Built-in Distributions" => "distributions.md",
"Omega" => "omega.md",
"Cheat Sheet" => "cheatsheet.md",
"Internals" => ["Overview" => "internalsoverview.md",
"Ω" => "omega.md",
"RandVar" => "randvar.md"],
"Contribution Guide" => "contrib.md",
]
)
Expand Down
9 changes: 7 additions & 2 deletions docs/src/cheatsheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ The major functions that you will use in Omega are:
- [rid(x, θ)]() : distribution interventional distribution of `x` given `θ`
- [rcd(x, θ) or x ∥ θ]() : random conditional distribution of `x` given `θ`

## FAQ

- How to sample from a joint distribution (more than one random variable at a time)?
Pass a tuple of random variables, e.g: `rand((x, y, z))`.

## Built-in Distributions

[bernoulli(w)](distributions.md#Omega.bernoulli) [boolbernoulli(w)](distributions.md#Omega.boolbernoulli)
Expand All @@ -19,7 +24,7 @@ categorical
constant
exponential
gammarv
inversegamma
invgamma
kumaraswamy
logistic
poisson
Expand All @@ -32,6 +37,6 @@ rademacher
RejectionSample
MI
SSMH
SSMHDrift
HMC
SGHMC
HMCFAST
8 changes: 4 additions & 4 deletions docs/src/conditionalindependence.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

Previously we saw that we could use `ciid` to turn a function rng into a `RandVar`.

## Independent Random Variables

Use `iid(x)` to create a random variable that is identical in distribution to `x` but but independent.

## Conditionally Independent Random Variables

Use `ciid(x)` to create a random variable that is identical in distribution to `x` but conditionally independent given its parents.
Expand All @@ -15,4 +11,8 @@ Use `ciid(x)` to create a random variable that is identical in distribution to `
y1 = normal(μ, 1.0)
y2 = ciid(y1)
rand((y1, y2))
```

```@docs
ciid
```
14 changes: 11 additions & 3 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@ It was developed by [Zenna Tavares](http://zenna.org) with help from Javier Burr

## Quick Start

Omega is built in Julia 0.7 but not yet in the official Julia Package repository. You can still easily install it from a Julia repl with:
Omega is built in Julia 1.0 but not yet in the official Julia Package repository. You can still easily install it from a Julia repl with:

```julia
(v0.7) pkg> add https://github.com/zenna/Omega.jl.git
(v1.0) pkg> add https://github.com/zenna/Omega.jl.git
```

Note: You will likely manually add the following dependencies, but if you use Omega from its environment, these will be downloaded automatically:
- https://github.com/zenna/Spec.jl
- https://github.com/zenna/ZenUtils.jl

Check Omega is working and gives reasonable results with:

```julia
Expand All @@ -27,7 +31,11 @@ With that, see the [Tutorial](basictutorial.md) for a run through of the main fe
We want your contributions!

- Probabilistic models
- Contribute an inference procedure
Please add probabilistic models and model families to https://github.com/zenna/OmegaModels.jl

- Inference procedures




## Citation
Expand Down

0 comments on commit c92dba6

Please sign in to comment.