Weekly exercises

In some of the exercises, there will be need for using a statistical package. We will use R in the course. R is a free software available both for linux and windows and can be downloaded from the R home page. A good reference for use of R is Kuhnert and Venables: An introduction to R (free).

 

R scripts used for the different exercises are available at /studier/emner/matnat/math/STK4030/h15/r-scripts/

Exercise for the next three weeks:

Explore the world of learning techniques and submit your entry to the following competition before the end of Sunday 22nd of November. There will be a prize!

The data set: epithelial.RData    

In CSV-format: trainExpression.csv   trainStatus.csv   testExpression.csv

To enter a contribution to the competition, send your predictions to k.h.hellton (at) math.uio.no or use the table in competition description and deliver it to the postbox of Kristoffer Hellton, Mathematics department post room (7th floor).

Exercises for November 2nd: 

Extra exercise 7.1 (can skip point a4 as Sec. 7.7 is not on the curriculum)

Solution

Exercises for October 26th: 

Try to recreate the figure 7.1. Use lasso regression and play with the parameters; noise, regression coefficients, \(p\) and \(\lambda\)

Solution

Exercise 2.9

Exercises for October 19th: 

Exercise 5.1

Exercise 5.3 (Hint: All methods are linear in the beta's, such that eq (3.8) which can be used to obtain prediction variances)

Solution

Exercise 5.4

Solution

Exercises for October 12th: 

Extend the exercise 4.9 to incorporate

  1. Logistic regression with quadratic penalty (18.3.2)
  2. Logistic regression with L1 - penalty (HTF: 4.4.4)
  3. Compare and motivate the differences

Solution

Exercises for October 5th:

Exercise 4.2 Solution

Exercise 4.9 Solution

Extensions to this exercise:

  1. Start by defining binary outputs for each class and for each of the following regression methods, construct classification rules (by writing computer programs):
    1. linear regression
    2. logistic regression
  2. Write a computer program to perform a linear discriminant analysis
  3. Then finally implement quadratic discriminant analysis
  4. Compare the different methods and conclude.

Note: The vowel data contain both a training and a test set. Use the training set to construct the classifiers and the test set to compare the different methods!

Hint: The file exer4_9_hint.r contain code for the first part of the exercise.

Exercises for September 21st:

Extra exercise 3.4, +  Problem 1, Exam 2013 (you will be given time to solve & discuss the problem in class)

Exercise for September 14th:

Extra exercise 3.3

Solutions:

Solution 3.3a  Solution 3.3.b

Solution (pdf with output)

Exercise for September 7th:

Extra exercise 3.2

Solutions:

Solution 3.2a Solution 3.2b

Solution (pdf with output)

Exercise for August 31st:

Extra exercise 3.1

Solution

Exercises for August 24th:

  1. Derive equation (2.13)
  2. Exercise 2.2 (R challenge: try also to simulate new data and plot the Bayes decision boundary) Tip: See description p. 16 and assume the 10 means for each class to be known. R script
  3. Exercise 2.5. Solution
  4. Exercise 2.7 abc. Solution
Published Aug. 16, 2015 9:08 PM - Last modified Mar. 13, 2023 1:35 PM