Skip to content

Instantly share code, notes, and snippets.

Tor Erlend Fjelde torfjelde

Block or report user

Report or block torfjelde

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
torfjelde / FSSD_gof_pushforward.jl
Last active Sep 17, 2019
Example of applying the FSSD goodness-of-fit test to a ChiSq distribution using Log as as push-forward.
View FSSD_gof_pushforward.jl
julia> using Bijectors
julia> using KernelGoodnessOfFit
julia> using Random; Random.seed!(123);
julia> using ForwardDiff
julia> function Distributions.gradlogpdf(d::ContinuousUnivariateDistribution, x::Real)
ForwardDiff.derivative(z -> logpdf(d, z), x)
"cells": [
"cell_type": "markdown",
"metadata": {},
"source": [
torfjelde / bijectors_interface.jl
Created Jun 12, 2019
Possible Bijectors.jl interface
View bijectors_interface.jl
using Distributions, Bijectors
using ForwardDiff
using Tracker
using Turing
import Random: AbstractRNG
import Distributions: logpdf, rand, rand!, _rand!, _logpdf
torfjelde / turing_plot.jl
Created May 27, 2019
Simple parsing of Turing.Model into MetaGraph, allowing visualization of the probabilistic model.
View turing_plot.jl
using MacroTools
using Turing
using LightGraphs, MetaGraphs
# Expressions
ex1 = quote
m(x) = begin
# Assumptions
σ ~ InverseGamma(2,3)
torfjelde / advi.png
Last active May 17, 2019
An example of how one can implement Automatic Derivative Variational Inference (VI) for Turing.jl.
View prophet-using-Turing.jl
# Partial implementation of linear-trend model described in [1] using Turing.jl.
# # References
# [1] Taylor, S. J., & Letham, B., Forecasting at scale, PeerJ Preprints, 5(), 3190–2 (2017).
using DataFrames, CSV
using Turing
using MCMCChain, Plots, StatsPlots
You can’t perform that action at this time.