😶🌫️
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
module TestInterface | |
using Random | |
using Test | |
function test_interface( | |
rng::AbstractRNG, lik, x::AbstractVector; functor_args=() | |
) | |
gp = GP(kernel) | |
lgp = LatentGP(gp, lik, 1e-5) |
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 Tullio | |
using Distances | |
using LinearAlgebra | |
using BenchmarkTools | |
using CUDA, CUDAKernels, KernelAbstractions | |
using Functors | |
using KernelFunctions | |
using Test | |
using Functors |
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
[deps] | |
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" | |
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" | |
CUDAKernels = "72cfdca4-0801-4ab0-bf6a-d52aa10adc57" | |
Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" | |
KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" | |
KernelFunctions = "ec8451be-7e33-11e9-00cf-bbf324bd1392" | |
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" | |
Tullio = "bc48ee85-29a4-5162-ae0b-a64e1601d4bc" |
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 CairoMakie | |
# using Animations | |
using Distributions | |
using Random | |
using AbstractTrees | |
CairoMakie.activate!() | |
mutable struct Partition | |
x | |
y |
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 StatsFuns | |
function h(x::AbstractVector, v::AbstractVector, y::AbstractVector, ν::AbstractVector, ϵ::Real, c) | |
dot(v, ν) - ϵ * logsumexp((v - c.(Ref(x), y)) ./ ϵ .+ log.(ν)) - ϵ | |
end | |
function h(x::AbstractVector, v::AbstractVector, y::AbstractVector, ν::AbstractVector, ϵ::Int, c) | |
ϵ == 0 || error("ϵ has to be 0") | |
dot(v,ν) + mininum(c.(Ref(x), y) .- v) | |
end |
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 Makie | |
using AbstractPlotting.MakieLayout | |
using OnlineStats | |
t = Node(0) | |
function foo() | |
scene, layout = layoutscene() | |
axis = layout[1,1] = LAxis(scene) | |
t = Node(0) | |
it = lift(t, init = MovingWindow(10, Float32)) do t |
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 BlockDiagonals | |
using StatsBase | |
using BenchmarkTools | |
using Test | |
D = 2000 | |
N = 100 | |
K = 20 | |
G = rand(D, N) | |
X = rand(D, N) | |
indices = vcat(1, sort(sample(2:D-1, K-1, replace = false)), D+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
using HTTP | |
using Dates | |
using Printf | |
using JSON | |
using DataFrames | |
using FileIO | |
using CSV | |
work_location = (52.516747,13.323553) |
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 Makie | |
using MakieLayout | |
using LinearAlgebra, Distances | |
using Distributions | |
α = MixtureModel([Normal(0.2, 0.05), Normal(0.6, 0.06), Normal(0.8, 0.04)], [0.3, 0.5, 0.2]) | |
# β = Normal(0.3, 0.09) | |
β = Laplace(0.5, 0.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
using Distributions | |
using Plots; pyplot() | |
using ForwardDiff | |
using LaTeXStrings | |
λ = 3.0 | |
μ = 2.0 | |
s = 0.8 | |
# α = Exponential(λ) # Measure alpha the starting point | |
α = Laplace(μ, s + 1.0) |
NewerOlder