Solution to Assignment 2
A. Hand-written Numerals: MNIST Database
- MNIST Database: Download the gz files and unzip them into 'data' in your working directory.
- Source Code: Extract this into your working directory.
1a. Digits 1 and 7
Type the Following Command in Matlab to generate these graphs: Q1a
1b. Digits 4 and 9
Type the Following Command in Matlab to generate these graphs: Q1b
1c. All Digits
Type the Following Command in Matlab to generate these graphs: Q1c
2a. Digits 1 and 7
Type the Following Command in Matlab to generate these graphs: Q2a
2b. Digits 4 and 9
Type the Following Command in Matlab to generate these graphs: Q2b
2c. All Digits
Type the Following Command in Matlab to generate these graphs: Q2c
B. Discovering Robot Motion DOFs
Download the gz files and unzip them into 'data' in your working directory.
- Nao200.zip:
- 2arms-random.rar
- 2arms-box-horiz.rar
- Source Code
a. Robot Nao
Type the Following Command in Matlab to generate these graphs: ANS_2_1
As from residual error curve we can deduce the dimensionality is 2.
Explationation:- The intrinsic dimensionality of the data can be estimated by looking for the “elbow” in
residual error curve at which this curve ceases to decrease significantly with added dimensions.
Also the expected dimensionality is 2 as Nao is moving its left hand which has two degrees of freedom.
b. 2 Arms
Type the Following Command in Matlab to generate these graphs: ANS_2_2
As from residual error curve we can deduce the dimensionality is 4.
The two arms are seperated by a constant distance(their bases) but are free to rotate about 4 points, thus allowing it 4 degrees of freedom and hence the position of any point can be accurately determined knowing theta1, theta2, theta3 and theta4.
c. Calculating theta
Equation 1: 15 sin(p) + 15 sin (q) = 12
Equation 2: -15 cos(p)+15 cos(q) = 2.5
Equation 3: 20 + 15cos(r) - 15cos(s) = 7.5
Equation 4: 15sin(s) + 15sin(s) = 12.5
Solving these equations we get p = 35.88, q = 12.35, r = -10.88 and s = 81.44
On taking the convention shown:
theta1: 144.12
theta2: 134.65
theta3: 109.44
theta4: 100.88
d. 2 Arms with a Box
Type the Following Command in Matlab to generate these graphs: ANS_2_4
As from residual error curve we can deduce the dimensionality is 4.
Comparision:- Answer of part-B is mapping of all possible moves of arms in 2-D horizontal space but
in ans-D is mapping of moving a box in horizontal space along a line. Which is just a subset of motions in Ans-B.