Skip to content

Week 4 Quiz :Sequences, Time Series and Prediction (DeepLearning.AI TensorFlow Developer Professional Certificate) Answers 2025

1. Question 1

Python library used to read CSV files?

  • ❌ py_csv

  • ❌ py_files

  • ❌ CommaSeparatedValues

  • csv

Explanation:
Python’s built-in csv module is used for reading/writing CSV files.


2. Question 2

Why is MAE good for accuracy in time series?

  • ❌ It punishes larger errors

  • It doesn’t heavily punish larger errors like squared errors do

  • ❌ Only counts positive errors

  • ❌ Biases toward small errors

Explanation:
MAE treats all errors linearly → good when you don’t want large errors exaggerated (unlike MSE).


3. Question 3

Expected input shape for a univariate time series to Conv1D?

  • (window_size, 1)

  • ❌ (1, window_size)

  • ❌ ()

  • ❌ (1,)

Explanation:
Conv1D expects:
(timesteps, features)
Univariate = 1 feature.


4. Question 4

Correct way to cast column 2 to float?

  • ❌ Convert.toFloat(row[2])

  • ❌ float f = row[2].read()

  • float(row[2])

  • ❌ You can’t

Explanation:
Casting strings from CSV to float uses:

value = float(row[2])

5. Question 5

How to add a 1-D convolution layer?

  • ❌ ConvolutionD1

  • ❌ 1DConvolution

  • Conv1D

  • ❌ 1DConv

Explanation:
Correct Keras layer:

tf.keras.layers.Conv1D(...)

6. Question 6

CSV file has a header you want to skip — what do you call?

  • ❌ reader.next

  • next(reader)

  • ❌ reader.ignore_header()

  • ❌ reader.read(next)

Explanation:
next(reader) reads and discards the first line (header).


7. Question 7

Best neural network type for predicting time series like sunspots?

  • ❌ RNN/LSTM

  • ❌ Convolutions

  • ❌ DNN

  • A combination of all other answers

Explanation:
The best model blends:
✔ convolution for pattern extraction
✔ LSTM/RNN for temporal relationships
✔ dense layers for final prediction


🧾 Summary Table

Q# Correct Answer Key Concept
1 csv Reading CSV files
2 MAE doesn’t heavily punish large errors MAE benefits
3 (window_size, 1) Conv1D input shape
4 float(row[2]) Type casting
5 Conv1D layer Convolution for time series
6 next(reader) Skipping headers
7 Combination model Best architecture