4. You have a neural network training code that runs but the accuracy stays very low. Which fix is most likely to improve the model's ability to handle complex data?
medium
A. Reduce the dataset size to speed up training.
B. Add more layers and neurons to the model.
C. Remove activation functions like ReLU.
D. Use only linear regression instead of neural networks.
Solution
Step 1: Understand model capacity and complexity
More layers and neurons allow the model to learn complex patterns better.
Step 2: Evaluate other options
Reducing data or removing activations reduces learning power; linear regression is too simple.
Final Answer:
Add more layers and neurons to the model. -> Option B
Quick Check:
Increasing model complexity [OK]
Hint: More layers = better complex pattern learning [OK]
Common Mistakes:
Thinking less data helps accuracy
Removing activation functions
Replacing neural nets with linear regression
5. You want to classify images of cats and dogs using a dataset of 10,000 images. Which advanced technique is best suited to handle this complex image data and why?
hard
A. Use a convolutional neural network (CNN) because it learns spatial features automatically.
B. Use a decision tree because it handles images well without preprocessing.
C. Use k-nearest neighbors because it scales well with large image datasets.
D. Use linear regression because it is simple and fast.
Solution
Step 1: Identify the nature of image data
Images have spatial patterns that CNNs can learn effectively through convolution layers.
Step 2: Compare other methods
Decision trees and k-NN do not capture spatial features well; linear regression is unsuitable for classification.
Final Answer:
Use a convolutional neural network (CNN) because it learns spatial features automatically. -> Option A
Quick Check:
CNNs for images [OK]
Hint: CNNs automatically learn image features [OK]