STAT 598Z
Spring 2012
STAT 598Z Midterm
March 08, 2012
Time: 75 minutes
Your Name (Please print):
PUID (Please print):
Note:
1.
2.
3.
4.
5.
6.
7.
This exam will contribute 10 points towards your nal score
Use the provided scratch paper for your calculatio
lecture 13: tidy data
STAT 598z: Introduction to computing for statistics
.
Vinayak Rao
Department of Statistics, Purdue University
February 24, 2015
.
Homework 3
In the previous homework, we manually merged two datasets
> head(USArrests)
Murder Assault U
lecture 15: hw and exam review
STAT 598z: Introduction to computing for statistics
.
Vinayak Rao
Department of Statistics, Purdue University
March 3, 2015
.
Plot USPS digits
plot_digit <- function(ip_vec) cfw_
image(matrix(ip_vec, nrow=16,byrow=FALSE),
co
lecture 8: supervised learning
STAT 598z: Introduction to computing for statistics
.
Vinayak Rao
Department of Statistics, Purdue University
February 5, 2015
.
Supervised learning
We are given training data (X, Y) = cfw_(x1 , y1 ), , (xN , yN )
X: indepe
lecture 16: regular expressions in r
STAT 598z: Introduction to computing for statistics
.
Vinayak Rao
Department of Statistics, Purdue University
March 12, 2015
.
print and cat
We have seen the print function
x <- 1
print(x)
y <- list('Hello', TRUE, c(1,
lecture 12: hw review & intro to plyr
STAT 598z: Introduction to computing for statistics
.
Vinayak Rao
Department of Statistics, Purdue University
February 19, 2015
.
Some observations from the homework
functions: modular blocks of code that map input ar
lecture 14: k-nn, k-means and k-fold
cross validation
STAT 598z: Introduction to computing for statistics
.
Vinayak Rao
Department of Statistics, Purdue University
February 26, 2015
.
k-nearest neighbors
k-nearest neighbors: supervised learning
We are giv
lecture 17: object-oriented
programming in r
STAT 598z: Introduction to computing for statistics
.
Vinayak Rao
Department of Statistics, Purdue University
March 23, 2015
.
Object oriented programming (OOP)
functions: an abstraction to encourage modular co
lecture 18: regularization
STAT 598z: Introduction to computing for statistics
.
Vinayak Rao
Department of Statistics, Purdue University
March 26, 2015
.
Ordinary least squares
Consider linear regression:
y = x w +
In vector notation:
y = Xw + ,
y n , X
lecture 19: lasso and coordinate
descent
STAT 598z: Introduction to computing for statistics
.
Vinayak Rao
Department of Statistics, Purdue University
March 31, 2015
.
Bias-variance and regularization
Problem: Given training data (X, y) cfw_xi , yi ,
1
mi
lecture 6: the grammar of graphics
STAT 598z: Introduction to computing for statistics
.
Vinayak Rao
Department of Statistics, Purdue University
February 3, 2015
.
Grammar?
A set of rules describing how to compose a vocabulary into
permissible sentences
T
lecture 23: monte carlo methods
(contd)
STAT 598z: Introduction to computing for statistics
.
Vinayak Rao
Department of Statistics, Purdue University
April 14, 2015
.
Importance sampling
Importance sampling:
Draw a proposal xi from q()
Assign it a weigh
lecture 25: review
STAT 598z: Introduction to computing for statistics
.
Vinayak Rao
Department of Statistics, Purdue University
April 21, 2015
.
Syllabus for Midterm 2
Regular expressions
Melting and casting data
Object oriented programming
Regulariz
lecture 24: monte carlo methods
(contd)
STAT 598z: Introduction to computing for statistics
.
Vinayak Rao
Department of Statistics, Purdue University
April 16, 2015
.
Markov chain Monte Carlo
For rejection/importance sampling proposal distribution must
be
lecture 20: overview of optimization
STAT 598z: Introduction to computing for statistics
.
Vinayak Rao
Department of Statistics, Purdue University
April 2, 2015
.
Global and local minimum
Find minimum of some function f : RD R.
(maximization is just minim
lecture 21: monte carlo methods
STAT 598z: Introduction to computing for statistics
.
Vinayak Rao
Department of Statistics, Purdue University
April 7, 2015
.
Monte Carlo integration
We want to calculate integrals/summations
often expectations w.r.t. some
lecture 9: supervised learning
(contd)
STAT 598z: Introduction to computing for statistics
.
Vinayak Rao
Department of Statistics, Purdue University
February 10, 2015
.
Linear regression
We saw how to pass formulae to lm
fit <- lm(Income ~ Seniority, Data
lecture 10: numerical issues in r
STAT 598z: Introduction to computing for statistics
.
Vinayak Rao
Department of Statistics, Purdue University
February 12, 2015
.
Binary representation
Most computation ignores that computers approximate math
Or assume (h
lecture 11: debugging (i)
STAT 598z: Introduction to computing for statistics
.
Vinayak Rao
Department of Statistics, Purdue University
February 17, 2015
.
Bugs
Bugs are an inevitable part of programming
Learning to x them is an art that comes only from p
STAT 598Z
Spring 2012
STAT 598Z Midterm
March 08, 2012
Time: 75 minutes
Your Name (Please print):
PUID (Please print):
Note:
1.
2.
3.
4.
5.
6.
7.
This exam will contribute 10 points towards your nal score
Use the provided scratch paper for your calculatio
Stats 598z: Midterm exam 2
Important:
Write you name and PUID on all sheets, and include the number of sheets
There are 7 questions, each for 5 points (but not all equally easy)
Attempt all questions, and when appropriate include a brief justication of yo
Stats 598z: Midterm exam 1
Important:
Write you name and PUID on all sheets, and include the number of sheets
There are 8 questions, each for 5 points (but not all equally easy)
Attempt all questions, and when appropriate include a brief justication of yo
Stats 598z: Homework 1
Problem 1 due before class on Jan 29
Important:R code, tables and gures should be part of a single .pdf or .html les from R
Markdown and knitr. See the class reading lists for a short tutorial.
1
Problem 1: The seq() function
[30]
1
Stats 598z: Homework 2
HW2 due before midnight on Feb 6
Important:
R code, tables and gures should be part of a single .pdf or .html les from R Markdown and
knitr. See the class reading lists for a short tutorial.
If you collaborated with anyone else, men
Stats 598z: Homework 3
Due before class on Tuesday, Feb 17
Important:
R code, tables and gures should be part of a single .pdf or .html les from R Markdown and
knitr. See the class reading lists for a short tutorial.
Include R commands for all output unle
Stats 598z: Homework 4
Due before class on Tuesday, Mar 3
Important:
R code, tables and gures should be part of a single .pdf or .html les from R Markdown and
knitr. See the class reading lists for a short tutorial.
Include R commands for all output unles
Stats 598z: Homework 6
Due before class Thursday, Apr 16
Important:
R code, tables and gures should be part of a single .pdf or .html les from R Markdown and
knitr. See the class reading lists for a short tutorial.
Include R commands for all output unless
Stats 598z: Homework 7
Due before class Thursday, Apr 30
Important:
R code, tables and gures should be part of a single .pdf or .html les from R Markdown and
knitr. See the class reading lists for a short tutorial.
Include R commands for all output unless
Stats 598z: Homework 5
Due before midnight Friday, Apr 3
Important:
R code, tables and gures should be part of a single .pdf or .html les from R Markdown and
knitr. See the class reading lists for a short tutorial.
Include R commands for all output unless