Skip to ContentGo to accessibility pageKeyboard shortcuts menu
OpenStax Logo

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 x = ( 0.68 , 0.42 , 0.99 ) , and suppose that the correct classification for this combination of markers is y = 1 (flu diagnosed). With current weights w = ( 0.7 , 0.2 , 0.3 ) and bias b = 0.3 , does the perceptron correctly diagnose the patient as having the flu? If not, use the perceptron learning rule with h = 0.2 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.

A 9 by 9 bitmap with 0s and 1s representing white and black.
Here is how the character might look when rendered:

A 9 by 9 bitmap representing the Japanese hiragana character “a” in which each square has been colored black or white depending on if the square's value was 1 or 0.
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
Citation/Attribution

This book may not be used in the training of large language models or otherwise be ingested into large language models or generative AI offerings without OpenStax's permission.

Want to cite, share, or modify this book? This book uses the Creative Commons Attribution-NonCommercial-ShareAlike License and you must attribute OpenStax.

Attribution information
  • If you are redistributing all or part of this book in a print format, then you must include on every physical page the following attribution:
    Access for free at https://openstax.org/books/principles-data-science/pages/1-introduction
  • If you are redistributing all or part of this book in a digital format, then you must include on every digital page view the following attribution:
    Access for free at https://openstax.org/books/principles-data-science/pages/1-introduction
Citation information

© Dec 19, 2024 OpenStax. Textbook content produced by OpenStax is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike License . The OpenStax name, OpenStax logo, OpenStax book covers, OpenStax CNX name, and OpenStax CNX logo are not subject to the Creative Commons license and may not be reproduced without the prior and express written consent of Rice University.