Assignment2
March 6, 2014
You may discuss homework problems with other students, but you have to prepare the
written assignments yourself. Late homework will be penalized 10% per day.
Please combine all your answers, the computer code and the gures into o
Assignment1
March 6, 2014
You may discuss homework problems with other students, but you have to prepare the
written assignments yourself. Late homework will be penalized 10% per day.
Please combine all your answers, the computer code and the gures into o
Introduction to Robotics (CS223A)
Handout
(Winter 2006/2007)
Homework #3 solutions
1. You are given that a certain RPR manipulator has the following transformation
matrices, where cfw_E is the frame of the end eector.
0
1T
=
c1 s1
s1
c1
0
0
0
0
0
0
1
0
0
Introduction to Robotics (CS223A)
Handout
(Winter 2006/2007)
Homework #6 solutions
1. Consider the 1-DOF system described the equation of motion, 4 + 20x + 25x = f .
x
(a)
Find the natural frequency n and the natural damping ratio n of the
natural (passiv
Introduction to Robotics (CS223A)
Handout
(Winter 2006/2007)
Homework #4 solutions Wednesday, February 14
1. Consider the following RRRR manipulator (image courtesy J. J. Craig):
It has the following forward kinematics and rotational Jacobian:
0
4T
c12 c3
Introduction to Robotics (CS223A)
Handout
(Winter 2006/2007)
Homework #2 solutions
1. Looking at equation 2.8 of the Lecture Notes, give a geometric interpretation
of why t13 = 0. Hint: Consider what the third column represents; your answer
should be only
Introduction to Robotics (CS223A) (Winter 2008/2009)
Homework #1 Solution
1. A frame cfw_B and a frame cfw_A are initially coincident. Frame cfw_B is rotated about YB by an angle , and then rotated about the new ZB by an angle . Determine A R, which will
trans2
March 6, 2014
0.1
Transformations & Weighted Least Squares
Download the slides and/or the ipython notebook.
0.1.1
Bacteria Example
This example shows a gure of exponential decay in a population of bacteria.
In [1]: %load_ext course_modules.knitr_ex
questions2
March 6, 2014
0.1
Question 1: Can you form an exact covariance test?
In [1]: %load_ext rmagic
In [2]: %R
library(lars)
data(diabetes)
X = diabetes $ x
y = diabetes $ y
plot(lars(X,y,type=lasso)
Loaded lars 1.1
1
In [3]: %R
nsim = 10000
covtestP
shrinkage
March 6, 2014
0.1
Model selection
In a given regression situation, there are often many choices to be made. Recall our usual setup
Yn1 = Xnp p1 +
n1 .
Any subset A cfw_1, . . . , p yields a new regression model
M(A) : Yn1 = X [, A] [A] +
n1
by s
questions
March 6, 2014
0.1
Question 1: Can you form an exact covariance test?
In [1]: %load_ext rmagic
In [2]: %R
library(lars)
data(diabetes)
X = diabetes $ x
y = diabetes $ y
plot(lars(X,y,type=lasso)
Loaded lars 1.1
1
In [3]: %R
nsim = 10000
covtestP
Simple linear regression
February 18, 2014
1
Simple linear regression
The rst type of model, which we will spend a lot of time on, is the simple linear regresssion model. One
simple way to think of it is via scatter plots. Below are heights of mothers and
Review
March 6, 2014
1
Course Introduction and Review
1.1
Outline
What is a regression model?
Descriptive statistics numerical
Descriptive statistics graphical
Inference about a population mean
Dierence between two population means
2
What is course a
anova2
March 6, 2014
1
ANOVA models
Last time, we discussed the use of categorical variables in multivariate regression. Often, these are encoded
as indicator columns in the design matrix.
In [37]: %R
url = http:/statweb.stanford.edu/~jtaylo/stats191/data
Selection
March 6, 2014
0.1
Model selection
In a given regression situation, there are often many choices to be made. Recall our usual setup
Yn1 = Xnp p1 +
n1 .
Any subset A cfw_1, . . . , p yields a new regression model
M(A) : Yn1 = X [, A] [A] +
n1
by s
Simple diagnostics
March 6, 2014
0.1
Diagnostics for simple regression
Goodness of t of regression: analysis of variance.
F -statistics.
Residuals.
Diagnostic plots.
0.2
Geometry of least squares
Here are three pictures that help to describe dierent m
Multiple linear regression
March 6, 2014
In []:
1
Multiple linear regression
1.1
Outline
Specifying the model.
Fitting the model: least squares.
Interpretation of the coecients.
More on F -statistics.
Matrix approach to linear regression.
T -statist
Interactions
March 6, 2014
0.1
Interactions and qualitative variables
Most variables we have looked at so far were continuous: height, rating, etc. In many situations, we record
a categorical variable: sex or gender, state, country, etc.
We call these var
Rainfall data
March 6, 2014
In this example, we will extract a table of monthly and annual rainfall from 8 Northern California stations.
The data is made available by the state department of water resources.
On inspecting the source of the page, the data
Logistic
March 6, 2014
0.1
Logistic regression
Binary outcomes
Most models so far have had response Y as continuous.
Many responses in practice fall into the Y ES/N O framework.
Examples:
0.1.1
1. medical: presence or absence of cancer
2. nancial: bank
ANOVA
March 6, 2014
1
ANOVA models
Last time, we discussed the use of categorical variables in multivariate regression. Often, these are encoded
as indicator columns in the design matrix.
In [9]: %R
url = http:/stats191.stanford.edu/data/salary.table
sala