mar11 - STA 414/2104 Notes Take-home Midterm March 16 March...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
STA 414/2104 Mar 11, 2010 Notes I Take-home Midterm: March 16 – March 25 I One question from ”Kernels and Ensembles” by M. Zhu I Classification and regression trees § 9.2 I Ensemble methods and random forests Zhu + § 15.1-3 I k -means and k -nearest neighbour methods § 13.1-3 I unsupervised learning § 14.1-3 1 / 12
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
STA 414/2104 Mar 11, 2010 VR code for neural networks 2 5 10 20 50 0.05 0.20 1.00 5.00 Size = 2 Tetrahydrocortisone Pregnanetriol a a a a a a b b b b b b b b b b c c c c c u u u u u u 2 5 10 20 50 Size = 2, lambda = 0.001 Tetrahydrocortisone a a a a a a b b b b b b b b b b c c c c c u u u u u u 2 5 10 20 50 Size = 2, lambda = 0.01 Tetrahydrocortisone a a a a a a b b b b b b b b b b c c c c c u u u u u u 2 5 10 20 50 Size = 5,20, lambda = 0.01 Tetrahydrocortisone a a a a a a b b b b b b b b b b c c c c c u u u u u u 2 / 12
Background image of page 2
STA 414/2104 Mar 11, 2010 ...code for nn plt.bndry <- function(size=0, decay=0, . ..) { cush.nn <- nnet(cush, tpi, skip=T, softmax=T, size=size, decay=decay, maxit=1000) invisible(b1(predict(cush.nn, cushT), . ..)) } b1 <- function(Z, . ..) { zp <- Z[,3] - pmax(Z[,2], Z[,1]) contour(exp(xp), exp(yp), matrix(zp, np), add=T, levels=0, labex=0, . ..) zp <- Z[,1] - pmax(Z[,3], Z[,2]) contour(exp(xp), exp(yp), matrix(zp, np), add=T, levels=0, labex=0, . ..) } 3 / 12
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
STA 414/2104 Mar 11, 2010 ...code for nn I Z = predict(cush.nn, cushT) I uses fitted neural network to predict on a 100 × 100 grid of ( x 1 , x 2 ) called cushT I the grid points are called xp and yp I this gives a 10 , 000 × 3 matrix of probabilities I zp = Z[,3] - pmax(Z[,2], Z[,1] ) I Pr ( 3 ) - max { Pr ( 2 ) , Pr ( 1 ) } I positive if class 3 is the highest probability, else negative I matrix(zp, np) : np = 100, the number of columns in the matrix zp I contour(exp(xp), exp(yp), matrix(zp, np), add=T, levels = 0) I the boundary where Pr
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 12

mar11 - STA 414/2104 Notes Take-home Midterm March 16 March...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online