This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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) |
OlderNewer