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
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.com/install.sh | sh |
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
### Function: Likelihood Plot Values | |
likelihood <- function(N,Y){ | |
a <- Y + 1 | |
b <- N - Y + 1 | |
dom <- seq(0,1,0.005) | |
val <- dbeta(dom,a,b) | |
return(data.frame('x'=dom, 'y'=val)) | |
} |
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
Y_samp <- sum(Zsamp) |
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
## Perform Inference on Simulated LDA Corpus | |
library(MCMCpack) | |
library(ggplot2) | |
library(tm) | |
library(topicmodels) | |
library(plyr) | |
setwd('/home/rmealey/Dropbox/LaPlacianAmbitions/10-TopicModels') | |
################################## |
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
#### Monty Hall Monte Carlo | |
#### Rob Mealey | |
library(ggplot2) | |
library(RColorBrewer) | |
library(reshape2) | |
### Function: Run simulation n times and plot results in stacked bar histograms | |
montyMonte <- function(n,titleSize=7,legendTitle=5,ytextSize=5,xtextSize=5){ | |
Picks <- c() | |
Opens <- c() |