CSCI 390, Artificial Intelligence Assignment 8

$30.00

Download Details:

  • Name: assignment-8-solved-m8mor1.zip
  • Type: zip
  • Size: 1.10 MB

Category:

Description

Rate this product

Question 1 (Linear regression)
The following is a table of data to be used for linear regression. This table describes the expenditure (in
dollars) on recreation per month by employees at a certain company, and their corresponding monthly
incomes. We treat the left-hand column as the input and the right-hand column as the output. Considering the
bias parameter in your computation.
Answer the following questions:
a. Find the equation of the linear regression line for the data
b. What is the slope? What is the y-intercept?
c. Using the equation for the linear regression that you calculated, estimate the monthly income of an
employee at this company who spends 5000 dollars per month on recreation.
Question 2 (Binary perceptron)
Apply the binary perceptron algorithm for the following data set. The training samples (i.e., 3D data points
with the corresponding labels) are given as the following table.
# Features (x1, x2, x3) Class label
1 (4,3,6) –
2 (2,-2,3) +
3 (1,0,-3) +
4 (4,2,3) –
Start with weight vector 𝑀 = (𝑀0, 𝑀1, 𝑀2,𝑀3) = (1,0,0,0), where 𝑀0 is the bias parameter. Then, you need to use
the bias feature together with given features during your computation.
a. Will the perceptron algorithm converge? Write β€œnever” if it will never converge and prove.
b. If the perceptron algorithm converges, fill out the table below. After how many steps will the perceptron
algorithm converge? Note: one step means processing one data point. Data points are processed in order
and then repeated, until convergence.
Step Weights Score Correct?
1 (1,0,0,0)
Final weights:
Question 3 (Multi-class perceptron)
Consider a multi-class perceptron with current weight vectors wA = (1, 2, 3), wB = (-1, 0, 2), wC = (0, -2, 1).
A new training sample is provided, which has feature vector x = (x0, x1, x2) = (1, -3, 1) and label y* = B. Here,
x0 is the bias feature.
a. Which class y would be predicted by the current weight vectors?
b. Would the perceptron update the weight vectors after having seen this training example? If yes, write the
resulting weight vectors below:
wA =
wB =
wC =