1
.
Consider a single perceptron model that is being trained to diagnose the flu in patients based on three simple markers. Suppose the next data point in the training set is , and suppose that the correct classification for this combination of markers is (flu diagnosed). With current weights and bias , does the perceptron correctly diagnose the patient as having the flu? If not, use the perceptron learning rule with to update the weights and bias. Is there an improvement in classifying this data point?
2
.
For each scenario, determine whether a standard neural network, a recurrent neural network (RNN), or a convolutional neural network (CNN) would be most suitable. Explain your choice, detailing the advantages and disadvantages of each type of network for the given scenario.
a.
A company wants to analyze customer reviews to determine whether they are positive, negative, or neutral. The reviews are provided as text data, and the company is interested in understanding the general sentiment of each review.
b.
An investment firm is developing a model to predict future stock prices based on historical price data. The firm wants to account for trends, patterns, and time-based dependencies in the data.
c.
A technology company is building a model to classify images into various categories, such as “cat,” “dog,” and “car.” The input data consists of individual images.
d.
A company wants to predict whether a customer is likely to cancel their subscription based on a variety of features, such as customer demographics, subscription duration, customer interactions, and usage patterns.
3
.
The characters in some computer fonts are represented by arrays of color values or grayscale values, called bitmaps. See the following 9-by-9 bitmap representing the Japanese hiragana character “a” in which each number indicates one of two color values, 0 for white and 1 for black, for each pixel.
Here is how the character might look when rendered:
Partition the bitmap array into 2-by-2 blocks and use the pooling method of averaging to reduce the size of the bitmap. Note: Since the original array’s dimensions are not divisible by 2, you should pad the array by appending a column of zeros to the right and a row of zeros on the bottom. How might the resulting bitmap be interpreted visually?
Here is how the character might look when rendered:
Partition the bitmap array into 2-by-2 blocks and use the pooling method of averaging to reduce the size of the bitmap. Note: Since the original array’s dimensions are not divisible by 2, you should pad the array by appending a column of zeros to the right and a row of zeros on the bottom. How might the resulting bitmap be interpreted visually?
4
.
Which loss functions would be most appropriate to use in training a neural network for the following tasks? Why?
a.
Predicting the temperature based on day of the year, recent wind speeds, precipitation, and prior temperatures
b.
Classifying emails as spam or not spam based on their content
c.
Classifying an image into one of several categories, such as animals, vehicles, or plants
d.
Diagnosing cancer in patients based on multiple indicators