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
using MKL | |
using BSON | |
using Distributions, DistributionsAD | |
using Flux | |
using Images | |
using LinearAlgebra | |
using MLDatasets |
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
# P(dots == n) for k dice | |
dkdice <- function(n, k=2) { | |
if (k == 1) { | |
if (n >= 1 && n <= 6) { | |
return(1/6) | |
} else { | |
return(0); | |
} | |
} else if (k < 1) { |
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
### A Pluto.jl notebook ### | |
# v0.19.9 | |
using Markdown | |
using InteractiveUtils | |
# ╔═╡ 41a2c7d6-f995-11ec-07f9-c7ee6f2063b4 | |
using Plots, FFTW | |
# ╔═╡ e751caf1-810c-4c74-9dd0-4d749ad04660 |
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
using Plots | |
using Distributions | |
"""Continuous ground truth.""" | |
function generate_ground_truth(rng::Tuple{Integer, Integer}, n=14) | |
(rand(Int, n) .% (rng[2]-rng[1]+1) .+ rng[1]) | |
end | |
"""Bernoulli ground truth.""" | |
function generate_ground_truth(prob1::Real, n=14) |
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
using MKL | |
using CUDA | |
import Base | |
import Flux | |
import BSON | |
import Zygote # for BSON | |
import Dates: now | |
function modelfile() |
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
using MKL | |
using CUDA | |
using Flux | |
using Printf | |
import Base | |
import BSON | |
import Zygote | |
import MLDatasets as MLD | |
import Dates |
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
### A Pluto.jl notebook ### | |
# v0.18.1 | |
using Markdown | |
using InteractiveUtils | |
# ╔═╡ f1405f06-5606-11ec-1959-e3943fdb4a2c | |
begin | |
import Plots | |
import Random |
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
### A Pluto.jl notebook ### | |
# v0.18.1 | |
using Markdown | |
using InteractiveUtils | |
# ╔═╡ 4bdb73f8-a2c2-11ec-078d-27a1269db616 | |
begin | |
import JuMP as J | |
import Plots |
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
using MKL | |
using CUDA | |
import Flux | |
import Plots | |
import BSON | |
import Zygote # for BSON | |
import Dates: now | |
import Random | |
import Distributions as D |
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
### A Pluto.jl notebook ### | |
# v0.18.1 | |
using Markdown | |
using InteractiveUtils | |
# ╔═╡ a49da1ae-3f4a-11ec-1504-eb883d8604e2 | |
begin | |
import Plots | |
using Distributions |