Representations:
- Hierarchical models
- Hidden Markov models
- Graphical models
- Non-parametric Bayes (distributions over functions)
Inference Approaches:
library(ggplot2) | |
library(shiny) | |
# Call ggbrush with a ggplot2 object, and the dimensions which | |
# should be brushed (try "xy" for scatter, "x" for histogram). | |
# The plot will show in RStudio Viewer or your web browser, and | |
# any observations selected by the user will be returned. | |
ggbrush <- function(plotExpr, direction = c("xy", "x", "y")) { | |
# See below for definition of dialogPage function |
""" | |
preprocess-twitter.py | |
python preprocess-twitter.py "Some random text with #hashtags, @mentions and http://t.co/kdjfkdjf (links). :)" | |
Script for preprocessing tweets by Romain Paulus | |
with small modifications by Jeffrey Pennington | |
with translation to Python by Motoki Wu | |
Translation of Ruby script to create features for GloVe vectors for Twitter data. |
# -*- coding: utf-8 -*- | |
""" | |
given a word and visualize near words | |
original source code is https://github.com/nishio/mycorpus/blob/master/vis.py | |
""" | |
import word2vec_boostpython as w2v | |
from sklearn.decomposition import PCA | |
import matplotlib.pyplot as plt | |
import matplotlib.font_manager |
I think the two most important messages that people can get from a short course are:
a) the material is important and worthwhile to learn (even if it's challenging), and b) it's possible to learn it!
For those reasons, I usually start by diving as quickly as possible into visualisation. I think it's a bad idea to start by explicitly teaching programming concepts (like data structures), because the pay off isn't obvious. If you start with visualisation, the pay off is really obvious and people are more motivated to push past any initial teething problems. In stat405, I used to start with some very basic templates that got people up and running with scatterplots and histograms - they wouldn't necessary understand the code, but they'd know which bits could be varied for different effects.
Apart from visualisation, I think the two most important topics to cover are tidy data (i.e. http://www.jstatsoft.org/v59/i10/ + tidyr) and data manipulation (dplyr). These are both important for when people go off and apply
2017-08-03: Since I wrote this in 2014, the universe, specifically Kirill Müller (https://github.com/krlmlr), has provided better solutions to this problem. I now recommend that you use one of these two packages:
I love these packages so much I wrote an ode to here.
I use these packages now instead of what I describe below. I'll leave this gist up for historical interest. 😆
-- A Pandoc filter to use Pygments for Pandoc | |
-- Code blocks in HTML output | |
-- Nickolay Kudasov 2013 | |
-- Requires Pandoc 1.12 | |
import Text.Pandoc.Definition | |
import Text.Pandoc.JSON (toJSONFilter) | |
import Text.Pandoc.Shared | |
import Data.Char(toLower) | |
import System.Process (readProcess) |
#!/bin/bash | |
# | |
# git-svn-diff originally by (http://mojodna.net/2009/02/24/my-work-git-workflow.html) | |
# modified by mike@mikepearce.net | |
# modified by aconway@[redacted] - handle diffs that introduce new files | |
# modified by t.broyer@ltgt.net - fixes diffs that introduce new files | |
# modified by m@rkj.me - fix sed syntax issue in OS X | |
# modified by rage-shadowman - cleaned up finding of SVN info and handling of path parameters | |
# modified by tianyapiaozi - cleaned up some diff context lines | |
# |
;; Usage Example: | |
;; | |
;; <!-- BEGIN RECEIVE ORGTBL ${1:YOUR_TABLE_NAME} --> | |
;; <!-- END RECEIVE ORGTBL $1 --> | |
;; | |
;; <!-- | |
;; #+ORGTBL: SEND $1 orgtbl-to-gfm | |
;; | $0 | | |
;; --> |