Unassessed Worksheet - Machine Learning, Slides of Machine Learning

Unassessed Worksheet - Machine Learning. Basic Comprehension. Regression. 1. Here is a small data set i) Calculate the averages for X and ...

Typology: Slides

2022/2023

Uploaded on 05/11/2023

sureesh
sureesh 🇺🇸

4.6

(10)

243 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Introduction to Artificial Intelligence The University of Birmingham
Autumn Semester 2016 School of Computer Science
November 3, 2016 Jeremy L Wyatt
Unassessed Worksheet - Machine Learning
Basic Comprehension
Regression
1. Here is a small data set
i) Calculate the averages for X and for T.
ii) Calculate the variance of X and T.
iii) Calculate the co-variance of X and T.
iv) Now calculate the parameters of y = ax + b, where y is the best fit straight line.
2. Taking the data set from 1. Start with a=1 and b=0. Now apply the batch LMS rule to this
regression problem (this will yield 14 updates which you save in batch, 7 for a and 7 for b).
What are a and b after the update at the end of the first epoch?
3. Explain the difference between classification and regression.
4. Explain the difference between supervised and unsupervised learning.
5. This question requires downloading and using Matlab, with which you may be unfamiliar. If
you can’t download it you can use matlab installed on the school network. Type matlab into
a terminal you invoke on a Linux machine. Download the associated matlab (.m) files
associated with this exercise sheet. To run them you should be able to download and install
matlab from mysoftware.bham.ac.uk . It should also run with Octave (https://www.gnu.org/
software/octave/download.html) though I haven’t tried it myself, and so I give no
guarantees.
You may need to add the folder in which you store these files to the Matlab path. Look on
the Mathworks website to see how to do this.
Now run the file “linear_data_regression_script” from the Matlab engine. You should see
three figures, with movies of the convergence of batch and incremental LMS, as I showed
in the lectures.
If you want you can check your answer for Q1, as least_squares_fit is precisely this
procedure.
X
1
3
4
6
9
10
12
T
0.5
5
12
9
19
24
19
pf2

Partial preview of the text

Download Unassessed Worksheet - Machine Learning and more Slides Machine Learning in PDF only on Docsity!

Introduction to Artificial Intelligence The University of Birmingham Autumn Semester 2016 School of Computer Science November 3, 2016 Jeremy L Wyatt

Unassessed Worksheet - Machine Learning

Basic Comprehension Regression

  1. Here is a small data set i) Calculate the averages for X and for T. ii) Calculate the variance of X and T. iii) Calculate the co-variance of X and T. iv) Now calculate the parameters of y = ax + b, where y is the best fit straight line.
  2. Taking the data set from 1. Start with a=1 and b=0. Now apply the batch LMS rule to this regression problem (this will yield 14 updates which you save in batch, 7 for a and 7 for b). What are a and b after the update at the end of the first epoch?
  3. Explain the difference between classification and regression.
  4. Explain the difference between supervised and unsupervised learning.
  5. This question requires downloading and using Matlab, with which you may be unfamiliar. If you can’t download it you can use matlab installed on the school network. Type matlab into a terminal you invoke on a Linux machine. Download the associated matlab (.m) files associated with this exercise sheet. To run them you should be able to download and install matlab from mysoftware.bham.ac.uk. It should also run with Octave (https://www.gnu.org/ software/octave/download.html) though I haven’t tried it myself, and so I give no guarantees. You may need to add the folder in which you store these files to the Matlab path. Look on the Mathworks website to see how to do this. Now run the file “linear_data_regression_script” from the Matlab engine. You should see three figures, with movies of the convergence of batch and incremental LMS, as I showed in the lectures. If you want you can check your answer for Q1, as least_squares_fit is precisely this procedure. X 1 3 4 6 9 10 12 T 0.5 5 12 9 19 24 19

NB. Matlab is quite easy to read because it is very close to vector notation. If you want to see how the algorithm works step by step you can modify the code, or simply use the debugger. To set a stop point click on a horizontal line in the line numbers on the left of a piece of code. This will allow you stop the code. You can then step line by line, and see the values of variables by typing who, or hovering the mouse over the variables in the main matlab execution window. Finally the code is written to be slow but easy to read. Decision Tree Learning & Neural Network Learning

  1. Return to the AI Space application for decision tree learning that you used previously. Download the cancer data set with additional features. This is called cancer_data_set_full. Now train the decision tree on this data set. What is the first feature chosen to split on by the information gain algorithm? Now train using the information gain ratio as the splitting function. What is the first feature chosen now? Research the gain ratio method and explain why you think the two criteria pick different features.
  2. Reload the cancer data into the Neural network tool. Build and train a Multilayer network. Compare the decision tree learner with the NN learner. You will have to run many trials of each method (NN, DT). Which method generalises better on randomly selected test sets?
  3. Looking at the printout of the multilayer perceptron model, and the decision tree models, which if either do you find more understandable? Why? Does understandability of machine learned classifiers matter? Advanced Question Note that Advanced Questions do not form part of the syllabus but will enhance your depth of understanding if you do try them.
  4. Looking at a Neural Network text such as Beale and Jackson or Kevin Gurney. Find the derivation of the sigmoid learning rule from first principles. Study it and see if you can follow all the steps of the basic sigmoid learning rule I showed you. You need to understand differentiation and the chain rule to do this.