May 2021
代考机器学习 You are going on a hiking trip and you want to fill a bag with items necessary for the trip. The maximum capacity of the bag is 15kg.
1.
You are going on a hiking trip and you want to fill a bag with items necessary for the trip. The maximum capacity of the bag is 15kg. There are 4 different items that you can take. Each item has a weight and a value which represents the level of importance. Your task is to find the ideal combination of items that maximises the value within the weight capacity W = 15kg of the bag.
The weights and values of the items are given below:
You will be using a genetic algorithm to solve this task.
a.Explainhow you will represent the individuals for encoding the problem.[3 marks]
b.Give three examples of individuals using your representation.[3 marks]
c.Explain how we can obtain an individual which is not valid given the task definition and write its genotype.[5 marks]
d.Consider a population with 4members: 代考机器学习
Candidate 1 has a fitness of 2
Candidate 2 has a fitness of 4
Candidate 3 has a fitness of 6
Candidate 4 has a fitness of 13
Use probabilistic selection to calculate the probability of selecting each candidate. Show your calculations.[4 marks]
e.In genetic programming, the genotype is a program represented as a tree. Given the following 2 trees, select a node in each tree and apply the crossover operator (you can select any node you wish, except the rootof the tree). Write the 2 offspring that you obtain.
[6 marks]f.Write the equation of each offspring obtained in part (e) above.[6 marks]
2. 代考机器学习
a.You are given the 3 scenarios below. For each of these, determine the type of learning you would use to solve them – supervised learning, unsupervised learning, reinforcement learning – as well as anappropriate machine learning algorithm you would Explain your answer.
i)A sales company has a database of its customers. It wants to auto- maticallyfind out information about the customers and group them into market segments to improve ad targeting.
ii)Astart-up has a database of images with people in real Each image has been annotated with one of the 6 basic emotions: happiness, sadness, disgust, fear, surprise, and anger. The start- up wants to use this database to build a system that identifies the emotions expressed by people when entering their workplace.
iii)A company wants to develop a self-driving car that can make safe decisions.[9 marks]
b.Amulti-layer feedforward network has 5 input units, a first hidden layer with 4 units, a second hidden layer with 3 units, and 2 output units. How many weights does this network have? Do not include the biases in your calculations. Show your calculations.[4 marks]
Thefollowing diagram represents a feed-forward neural network with one hidden layer:
The input nodes to this network are nodes 1 and 2. The weights in the network are as follows:
w13 = —2 | w14 =4 | w23 =3 | w24 = —1 |
w35 =1 | w36 = —1 | w45 = —1 | w46 =1 |
Each hidden and output node uses the following activation function:
Calculate the network output for the following input. Show your calcu- lations.
[4 marks]
d.Havingdone the forward pass in this network, what is the usual sequence of events for training the network using the backpropagation algorithm? You do not need to write the update rules nor do any calculations.[13 marks]
3. 代考机器学习
You have a supervised machine learning model that takes inputs x and computes its output hw(x) using a weight vector w. Using a training set ((x1, y1) (x2, y2) .. . (xm, ym) ), the model aims to minimise the following loss function:
(1)
a.What kind of problems can we solve with thismodel?[3 marks]
b.Givethree real-world example tasks for which you can use this model.[3 marks]
c.Howwould you define your hypothesis function hw(x) if your model is linear and multivariate?[4 marks]
d.Weare told that some training examples are more important than others and, hence, after training, it is important that there is a small difference between yi and hw(xi) for these How might you modify your training algorithm to take this into account? Explain your answer.[15 marks] 代考机器学习
e.Youuse the training data to train a model hw(x). A colleague presents you with another model trained using the same set of examples and loss function but with a different set of features, h0w0(x0). How might you use these models to train a single, more powerful one? Justify your answer.[8 marks]
f.Howmight you define the hypothesis function hw(x) of your new model in part (e)? Explain your answer.[10 marks]