Every problem in the chapter beside the book’s answer, a chapter at a time as you scroll.

Chapter 7: Deep Learning and AI Basics

6 problems · 0 figures

7-1 §7.3 source ↗

What is the primary role of hidden layers in a neural network?
  1. a.
    To directly interact with the input data and produce the final output
  2. b.
    To provide a way for the network to learn and represent complex patterns and relationships within the data
  3. c.
    To reduce the number of features of the input data
  4. d.
    To store the final predictions of the model

Answer

B. To provide a way for the network to learn and represent complex patterns and relationships within the data

7-2 §7.2 source ↗

What is a convolutional neural network (CNN), and in which scenarios might it perform better than standard neural networks?
  1. a.
    A CNN is a type of neural network designed to process sequential data, and it is particularly effective for tasks like language translation and text generation.
  2. b.
    A CNN is a type of neural network that includes recurrent layers, making it suitable for time series prediction and speech recognition.
  3. c.
    A CNN is a type of neural network that uses convolutional layers to process grid-like data structures, such as images, and is particularly effective for tasks like image classification, object detection, and recognizing spatial relationships.
  4. d.
    A CNN is a type of neural network that relies on decision trees, and it is particularly effective for classification tasks involving structured tabular data.

Answer

C. A CNN is a type of neural network that uses convolutional layers to process grid-like data structures, such as images, and is particularly effective for tasks like image classification, object detection, and recognizing spatial relationships.

7-3 §7.5 source ↗

Why are speech recognition and text-to-speech algorithms important in everyday life, and what are some examples of their applications?
  1. a.
    Speech recognition and text-to-speech algorithms are mainly used in scientific research and have limited everyday applications.
  2. b.
    These algorithms are only relevant in the context of language translation and have no significant impact on everyday life.
  3. c.
    Speech recognition is primarily used for recording audio, while text-to-speech is used mainly for entertainment purposes, such as audiobooks.
  4. d.
    These algorithms are important because they enable hands-free interaction with devices, improve accessibility for individuals with disabilities, and enhance user experience in various applications.

Answer

D. These algorithms are important because they enable hands-free interaction with devices, improve accessibility for individuals with disabilities, and enhance user experience in various applications.

7-4 §7.5 source ↗

Which of the following would be considered an unethical use of AI or NLP technology?
  1. a.
    Developing a chatbot that provides customer service and technical support on a 24/7 basis
  2. b.
    Creating a natural language processing system that assists visually impaired users in reading text aloud
  3. c.
    Designing a virtual assistant that collects personal data without explicit user consent and sells it to third-party advertisers
  4. d.
    Implementing an AI-based language model that translates content across different languages for educational purposes

Answer

C. Designing a virtual assistant that collects personal data without explicit user consent and sells it to third-party advertisers

Quantitative Problem 7.1 §7.1 source ↗

 
a.
Suppose that a neural network has been trained to classify students as likely to graduate or not likely to graduate based on various input parameters. There is a single output neuron having four inputs, x 1 , x 2 , x 3 , and one output, y . The output y is used to make the classification. The weights of the three inputs of this neuron are w 1 = 0.25 , w 2 = 0.09 , and w 3 = − 0.31 . The bias of the neuron is b = − 0.23 . Find the output y if ( x 1 , x 2 , x 3 ) = ( 0.4 , − 1.2 , 0.6 ) and if the activation function is:

1. ReLU

2. Leaky ReLU defined by max⁡ (0.2x,x)

3. Sigmoid

4. Softplus

b.
Which of the four activation functions, applied at the output layer, would be best suited for this classification task? Using this activation function, how would the neural network classify the student?

Answer (2 parts)

a.

1. 0

2. − 0.0848

3. 0.396

4. 0.503

b.
No published answer: OpenStax gives this part only in the instructor’s Solution Manual.

Quantitative Problem 7.2 §7.1 source ↗

The output of a neural network on data points are given in the table. Compute the average loss using the following loss functions.
a.
MSE
b.
Hinge loss
Table 7.4 in the book ↗
Data point Predicted y ^ Actual(target) y
1 ( 0.043 , 1.169 , 1.019 ) ( 0 , 1 , 1 )
2 ( − 0.149 , 0.927 , − 0.136 ) ( 0 , 1 , 0 )
3 ( 0.96 , 0.237 , − 0.109 ) ( 1 , 0 , 0 )
4 ( 0.842 , − 0.148 , − 0.218 ) ( 1 , 0 , 0 )
5 ( 0.942 , 0.838 , 1.011 ) ( 1 , 1 , 1 )

Answer (2 parts)

a.
0.018
b.
0.499

Loading chapter 8…

Problems and answers are adapted from Principles of Data Science by Shaun V. Ault, Soohyun Nam Liao and Larry Musolino, OpenStax, and are used under the CC BY-NC-SA 4.0 licence. Access for free at https://openstax.org/books/principles-data-science/pages/1-introduction. Illustrations: Copyright Rice University, OpenStax, under CC BY-NC-SA 4.0 license. This adaptation is released under the same licence, is non-commercial, and is neither affiliated with nor endorsed by OpenStax or Rice University.