Skip to content

Instantly share code, notes, and snippets.

View AustinRochford's full-sized avatar

Austin Rochford AustinRochford

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AustinRochford
AustinRochford / gist:d390db28b3b71d8b902d
Created September 24, 2014 16:33
.vimrc for Hanley
" Pathogen
filetype off " Pathogen needs to run before plugin indent on
call pathogen#infect('bundle/{}')
call pathogen#helptags() " generate helptags for everything in 'runtimepath'
filetype plugin indent on
" Colors
colorscheme manxome
syntax on
hi StatusLine ctermfg=white ctermbg=blue
@AustinRochford
AustinRochford / gist:6be7cb4d9f38b9419f94
Created November 30, 2014 01:07
Reservoir Sampling Blog Post
{
"metadata": {
"name": "",
"signature": "sha256:e9943648b5982fa868ab077d78fe550231c16f916d699ee244cf22a1a6120489"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@AustinRochford
AustinRochford / post.ipynb
Created January 13, 2015 02:14
Utility Theory and Logistic Regression Blog Post
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AustinRochford
AustinRochford / gist:92b06d174a7f84fded6e
Created March 4, 2015 02:39
Maximum Likelihood Estimation in Python with StatsModels
{"nbformat_minor": 0, "cells": [{"execution_count": 1, "cell_type": "code", "source": "%matplotlib inline", "outputs": [], "metadata": {"collapsed": true, "trusted": true}}, {"source": "---\ntitle: Maximum Likelihood Estimation of Custom Models in Python with StatsModels\ntags: Statistics, Python\n---", "cell_type": "markdown", "metadata": {}}, {"source": "Maximum likelihood estimation is a common method for fitting statistical models. In Python, it is quite possible to fit maximum likelihood models using just [`scipy.optimize`](http://docs.scipy.org/doc/scipy/reference/optimize.html). Over time, however, I have come to prefer the convenience provided by [`statsmodels`'](http://statsmodels.sourceforge.net/) [`GenericLikelihoodModel`](http://statsmodels.sourceforge.net/devel/dev/generated/statsmodels.base.model.GenericLikelihoodModel.html). In this post, I will show how easy it is to subclass `GenericLikelihoodModel` and take advantage of much of `statsmodels`' well-developed machinery for maximum likelihood
@AustinRochford
AustinRochford / gist:50210506326e1cd73381
Created March 8, 2015 21:49
Robust Regresion with t-Distributed Residuals
{"nbformat_minor": 0, "cells": [{"execution_count": 1, "cell_type": "code", "source": "%matplotlib inline", "outputs": [], "metadata": {"collapsed": true, "trusted": false}}, {"source": "---\ntitle: Robust Regression with t-Distributed Residuals\ntags: Statistics, PyMC\n---", "cell_type": "markdown", "metadata": {}}, {"source": "Ordinarly least squares (OLS) is, without a doubt, the most-well known linear regression model. Despite its wide applicability, it often gives undesireable results when the data deviate from its underlying normal model. In particular, it is quite sensitive to outliers in the data. In this post, we will illustrate this sensitivity and then show that changing the error distribution results in a more robust regression model.\n\nWe will use one of the data sets from [Anscombe's quartet](http://en.wikipedia.org/wiki/Anscombe%27s_quartet) to illustrate these concepts. Anscombe's quartet is a well-known group of four data sets that illustrates the importance of exploratory data analysis
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"$\\int_a^b f'(t) dt = f(b) - f(a)$"
]
},
{
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.