Last Update: May 13, 2019
Offline Version
## Source for math political compass klein bottle meme by @KimPLab on Twitter | |
## Tweet: https://twitter.com/KimPLab/status/1381621398636949511 | |
## Inspired by the math political compass torus meme by @jessebett | |
## https://twitter.com/jessebett/status/1379162611414138885 | |
## @jessebett source code notes: | |
## upcycled from torus knot fibration visualization: | |
## http://www.jessebett.com/TorusKnotFibration/torusknot.html | |
## Note: |
""" | |
Compare two Excel sheets | |
Inspired by https://pbpython.com/excel-diff-pandas-update.html | |
For the documentation, download this file and type: | |
python compare.py --help | |
""" | |
import argparse | |
import pandas as pd |
The Jax developers optimized a differential equation benchmark in this issue which used DiffEqFlux.jl as a performance baseline. The Julia code from there was updated to include some standard performance tricks and is the benchmark code here. Thus both codes have been optimized by the library developers.
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """ | |
import numpy as np | |
import cPickle as pickle | |
import gym | |
# hyperparameters | |
H = 200 # number of hidden layer neurons | |
batch_size = 10 # every how many episodes to do a param update? | |
learning_rate = 1e-4 | |
gamma = 0.99 # discount factor for reward |
Only non-stiff ODE solvers are tested since torchdiffeq does not have methods for stiff ODEs. The ODEs are chosen to be representative of models seen in physics and model-informed drug development (MIDD) studies (quantiative systems pharmacology) in order to capture the performance on realistic scenarios.
Below are the timings relative to the fastest method (lower is better). For approximately 1 million ODEs and less, torchdiffeq was more than an order of magnitude slower than DifferentialEquations.jl
/* | |
First run npm install topojson --save and then link "node_modules/topojson/build/topojson.min.js" | |
above this snippet in your html. | |
Usage: http://leafletjs.com/reference.html#geojson | |
*/ | |
L.TopoJSON = L.GeoJSON.extend({ | |
addData: function (data) { | |
var geojson, key; |
using ConformalPrediction | |
using Distributions | |
using MLJ | |
using Plots | |
# Inputs: | |
N = 600 | |
xmax = 3.0 | |
d = Uniform(-xmax, xmax) |