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
# -*- coding: utf-8 -*- | |
""" | |
@author: Tim Hargreaves | |
""" | |
# see write-up at www.ttested.com/coding-up-christmas/ for more detail | |
from random import uniform | |
import matplotlib.animation as ani |
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
#!/usr/bin/env python | |
"""schedule.py: Meeting scheduler based on Ford–Fulkerson algorithm. | |
A tool to generate or prove the lack of existance of a schedule for one-on-one | |
meetings given the availabilities of attendees for different time slots. | |
The solution is based on a modification of the Ford-Fulkerson algorithm in | |
which edge capacities are binary. By converting the the availability matrix | |
into a bipartite graph with edges of capacity one and introducing source and |
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
library(janeaustenr) | |
library(tidytext) | |
library(tidyverse) | |
theme_set(theme_bw()) | |
cleaned_words <- austen_books() |> | |
unnest_tokens(word, text) |> | |
# Remove roman numerals | |
filter(!str_detect(word, "[IVXLCDM]+")) |> |
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
""" | |
This script contains a combined proposal for multiple enhancements to the existing | |
SSMProblems.jl interface that we have discussed over the past few months. The main | |
features are: | |
- Separation of latent dynamics and observation processes | |
- Introduction of control variables | |
- Unified interface for defining linear Gaussian models | |
- Interface for forward simulation and conditioning | |
- Hierarchical (conditional) latent dynamics | |
- Rao-Blackwellised filtering |
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 FillArrays | |
using LinearAlgebra | |
using LogExpFunctions | |
using Plots | |
using ProgressMeter | |
using Random | |
using StatsBase | |
using LevyProcesses |