Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
<html> | |
<table id="comparetable" class="clean"> | |
<tr> | |
<td class="blank"> </td> | |
<th>Machine Learning</th> | |
<th>Frequentist<br>Statistics</th> | |
<th>Probabilistic<br>Programming</th> | |
</tr> | |
<tr> | |
<td class="rowTitle">Prediction</td> |
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
import pymc as pm | |
t = pm.Uniform('t', 0, 1, verbose=1) | |
y = pm.Normal('x', mu=t, tau=1, value=-5, observed=True) | |
pm.MAP([t,y]).fit(verbose=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
from traits.api import \ | |
PrototypedFrom, Float, HasTraits, Instance, Str, List, on_trait_change | |
from copy import copy | |
class Parent (HasTraits): | |
first_name = Str | |
family_name = '' | |
favorite_first_name = Str | |
child_allowance = Float(1.00) |
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/python | |
# Cython wrapper for the fast-dm code by Voss & Voss | |
# (C) by Thomas Wiecki (thomas_wiecki@brown.edu), 2010 | |
# GPLv2 or later. | |
from __future__ import division | |
import numpy as np | |
cimport numpy as np | |
cimport cython |
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
''' | |
Gibbs sampler for function: | |
f(x,y) = x x^2 \exp(-xy^2 - y^2 + 2y - 4x) | |
using conditional distributions: | |
x|y \sim Gamma(3, y^2 +4) | |
y|x \sim Normal(\frac{1}{1+x}, \frac{1}{2(1+x)}) | |
''' |
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
{ | |
"metadata": { | |
"name": "SimonPupilRegression" | |
}, | |
"nbformat": 3, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ | |
"cell_type": "code", |
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
def _start_notebook(self, master, user, profile_dir, profile_name='default', notebook_port=8888): | |
master.ssh.execute('ipython profile create %s' % profile_name) | |
log.info("Setting up IPython web notebook for user: %s" % user) | |
user_cert = posixpath.join(profile_dir, '%s.pem' % user) | |
ssl_cert = posixpath.join(profile_dir, '%s.pem' % user) | |
if not master.ssh.isfile(user_cert): | |
log.info("Creating SSL certificate for user %s" % user) | |
ssl_subj = "/C=US/ST=SC/L=STAR/O=Dis/CN=%s" % master.dns_name | |
master.ssh.execute( | |
"openssl req -new -newkey rsa:4096 -days 365 " |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer