Font size
WorksheetsMachine Learning Quiz
Total questions: 100
Worksheet time: 50mins
When using BeautifulSoup for web scraping, which of the following would correctly extract all text within paragraph tags while preserving nested structure?
soup.find_all('p').text
soup.find('p').get_text()
soup.find_all('p').get_text(strip=True)
[p.get_text(strip=True) for p in soup.find_all('p')]
In the context of TF-IDF vectorization, what happens when a word appears in every document of the corpus?
Its IDF value becomes 0
Its IDF value becomes 1
Its IDF value becomes infinity
Its TF value becomes 0
Which collaborative filtering approach would be most appropriate for a new e-commerce site with minimal user interaction data but detailed product attributes?
User-based collaborative filtering
Item-based collaborative filtering
Content-based filtering
Matrix factorization
What's the primary issue with using requests.get() in a loop to scrape multiple pages rapidly?
It will return incomplete HTML
It might trigger rate limiting or IP blocking
It cannot handle JavaScript content
It will consume excessive memory
Which of the following NLP tasks is most suitable for identifying customer sentiment in product reviews?
Named Entity Recognition
Part-of-Speech Tagging
Sentiment Analysis
Text Summarization
In a recommendation system, what technique helps solve the "cold start" problem for new users?
Collaborative filtering
Content-based filtering
Matrix factorization
Deep learning
When implementing proxies for web scraping, which is NOT a valid consideration?
Proxy rotation frequency
Geographic location of proxies
Browser JavaScript version
Proxy response time
Which feature would be LEAST useful in a content-based movie recommendation system?
Movie genre
Movie release date
Movie ID number
Movie director
What is the main purpose of stemming in NLP?
To remove stop words
To reduce words to their root form
To identify named entities
To determine word frequency
In web scraping, what is the main advantage of using Selenium over BeautifulSoup?
Faster parsing of HTML
Lower memory usage
Ability to handle dynamic JavaScript content
Better CSS selector support
Which of the following metrics is most appropriate for evaluating a recommendation system's accuracy in a top-N recommendation task?
Root Mean Square Error (RMSE)
Mean Average Precision (MAP)
Perplexity
F1 Score
When using word embeddings in an NLP task, what is the primary purpose of the attention mechanism?
To reduce training time
To compress the input sequence
To focus on relevant parts of the input
To eliminate stop words
In a web scraping scenario where the target website uses infinite scroll, which approach would be most effective?
Using BeautifulSoup with regular expressions
Implementing scroll simulation with Selenium
Using requests with pagination
Parsing the sitemap XML
What technique would be most effective for handling out-of-vocabulary (OOV) words in an NLP system?
Skip-gram modeling
Byte-Pair Encoding (BPE)
TF-IDF vectorization
Stop word removal
In a hybrid recommendation system, which component would be most effective for explaining recommendations to users?
Matrix factorization scores
Content-based feature matching
Collaborative filtering similarities
Neural network embeddings
Which of these is NOT a common attention mechanism in NLP?
Self-attention
Cross-attention
Linear-attention
Recursive-attention
In collaborative filtering, what does "explicit feedback" refer to?
User comments
Direct ratings
Browsing history
Time spent viewing
What is the primary function of the encoder in a GAN?
Generate fake images
There is no encoder in basic GANs
Discriminate real from fake
Compress input data
Which technique is commonly used in object detection to handle objects of different sizes?
Feature Pyramid Networks
Max Pooling
Batch Normalization
Dropout
What is the purpose of the 'User-Agent' header in web scraping?
Speed up requests
Identify the scraper
Encrypt data
Cache results
In NLP, what is the purpose of subword tokenization?
Reduce vocabulary size
Increase model speed
Improve memory usage
Handle punctuation
Which metric is NOT commonly used in recommendation systems?
NDCG
Mean Reciprocal Rank
Intersection over Union
Precision
What is the role of skip connections in image processing networks?
Reduce training time
Prevent vanishing gradients
Decrease model size
Limit overfitting
In StyleGAN, what is the purpose of the mapping network?
Style transfer
Image segmentation
Latent space disentanglement
Image compression
Which technique helps prevent mode collapse in GANs?
Minibatch discrimination
Max pooling
Batch normalization
Dropout
What is the primary purpose of beam search in NLP?
A. Reduce computation time
B. Find optimal sequence
C. Compress input
D. Handle long sequences
In web scraping, what is a Captcha used for?
Speed up loading
Prevent automated access
Improve security
Cache data
Which loss function is commonly used in object detection for bounding box regression?
Cross-entropy
Smooth L1
Binary cross-entropy
Hinge loss
What is the purpose of negative sampling in recommendation systems?
Handle missing data
Improve training efficiency
Reduce memory usage
Increase model accuracy
In image processing, what does the term 'receptive field' refer to?
Image resolution
Pixel neighborhood
Color space
Feature map size
In NLP, which of the following is NOT a common preprocessing step?
Tokenization
Matrix multiplication
Stemming
Stop word removal
The BERT model is primarily based on which architecture?
RNN
LSTM
Transformer
CNN
In a recommendation system, what does 'cold start problem' refer to?
System initialization time
Recommending to new users
Server cooling issues
Algorithm warm-up period
Which loss function is commonly used in GANs?
Binary Cross-entropy
Mean Squared Error
Categorical Cross-entropy
Huber Loss
In object detection, what does IoU stand for?
Internet of Usage
Intersection over Union
Input over Update
Image over URL
Which of these is NOT a common web scraping library in Python?
BeautifulSoup
Scrapy
Selenium
PyTorch
What is the purpose of non-maximum suppression in object detection?
Reduce memory usage
Eliminate duplicate detections
Increase model accuracy
Speed up training
In content-based filtering for recommendation systems, what is primarily analyzed?
User behavior
Item features
User demographics
System performance
Which type of GAN is specifically designed for image-to-image translation?
DCGAN
CycleGAN
WGAN
CGAN
What is the primary purpose of word embeddings in NLP?
Data compression
Semantic representation
Text encryption
Memory optimization
Which technique is commonly used for handling imbalanced datasets in image classification?
Data augmentation
Batch normalization
Dropout
Layer normalization
What is the role of the discriminator in a GAN?
Generate new data
Classify real vs fake data
Preprocess input data
Optimize network parameters
In web crawling, what is a robots.txt file used for?
Store crawler settings
Define crawling rules
Log crawler errors
Cache webpage data
Which method is NOT typically used for text summarization?
Extractive summarization
Abstractive summarization
Recursive summarization
Hybrid summarization
What is the purpose of attention mechanisms in NLP?
Reduce computation time
Focus on relevant parts of input
Compress input data
Normalize output values
Content-based filtering uses _____
other users' preferences
item features
server logs
deep learning models only
Web scraping is primarily used to _____
write backend logic
extract data from websites
optimize queries
enhance security
Web scraping is primarily used to _____
A. write backend logic
B. extract data from websites
C. optimize queries
D. enhance security
Which method helps mimic browser behavior in web scraping?
pandas
NumPy
Selenium
Scikit-learn
Which NLP task involves identifying the base form of words?
Tokenization
Lemmatization
Classification
Parsing
Which of the following is a well-known dataset for handwritten digit classification?
COCO
MNIST
ImageNet
ADE20K
Named Entity Recognition (NER) involves identifying _____
part of speech
names of people, places, and organizations
token length
punctuation marks
The file used by websites to communicate crawling rules to bots is called _____
sitemap.xml
robots.txt
crawl.json
meta.html
In deep learning-based image classification, overfitting can be reduced by _____
increasing layers
using dropout
removing labels
increasing image size
The generator in a GAN learns to _____
label images
create data similar to the real distribution
tokenize words
parse HTML
Which evaluation metric is used in object detection?
BLEU
mAP
RMSE
TF-IDF
BLEU score is mainly used to evaluate _____
image clarity
machine translation
object detection
classification accuracy
In object detection, Intersection over Union (IoU) is used to _____
reduce model size
evaluate prediction accuracy
perform augmentation
convert images to grayscale
Breadth-first search (BFS) in crawling explores _____
deepest pages first
pages level by level
pages with ads
only internal links
Scrapy is a framework used for _____
image recognition
web crawling and scraping
recommendation systems
GANs
The role of the discriminator in a GAN is to _____
generate fake images
distinguish real from fake data
compute loss
provide embeddings
Which task does NLP not cover?
Sentiment analysis
Text classification
Image segmentation
Question answering
In web scraping, time delays between requests are often used to _____
reduce image resolution
avoid overloading servers
improve classification
compress data
Matrix factorization is used in which type of recommendation system?
Content-based
Collaborative filtering
Demographic filtering
Sentiment-based filtering
What is the purpose of using headers in a web scraping request?
To bypass DNS
To mimic a real browser
To reduce memory usage
To parse HTML faster
Recommender systems often suffer from the problem of _____
memory leaks
cold start
mode collapse
adversarial loss
Which of the following is an embedding method in NLP?
YOLO
Word2Vec
Faster R-CNN
K-Means
What is typically used as the output layer in image classification CNNs?
ReLU
Softmax
MaxPool
Sigmoid
Which algorithm divides the image into grids and detects objects?
R-CNN
YOLO
GAN
GPT
Which status code generally indicates that access to the web page is forbidden during scraping?
200
301
403
500
Which method allows scraping JavaScript-generated content?
Requests
urllib
Selenium
FTP
Which of the following is not typically used for object detection?
SSD
LSTM
YOLO
Faster R-CNN
A key challenge when training GANs is _____
overfitting
mode collapse
low accuracy
memory leaks
Which metric is commonly used to evaluate recommendation accuracy?
Recall
RMSE
BLEU
IoU
In NLP, stemming is different from lemmatization in that stemming _____
uses full vocabulary
cuts words to root form without context
is always more accurate
translates sentences
Which of the following libraries is typically used to parse HTML content in Python web scraping?
NumPy
Pandas
BeautifulSoup
Matplotlib
Which model is commonly used in image classification?
RNN
GAN
CNN
SVM
Which of the following is an ethical consideration in web crawling?
Using GPU
Respecting robots.txt
Using HTML5
Writing CSS selectors
Which task is more complex than image classification?
Speech-to-text
Object detection
Web scraping
Text classification
Which of the following is an ethical consideration in web crawling?
A. Using GPU
B. Respecting robots.txt
C. Using HTML5
D. Writing CSS selectors
Which model is commonly used in image classification?
A. RNN
B. GAN
C. CNN
D. SVM
GAN stands for _____
Generative Adversarial Network
General AI Network
Graphical Attention Network
General Annotation Network
Content-based filtering uses _____
other users' preferences
item features
server logs
deep learning models only
Collaborative filtering is based on _____
user metadata
user-item interactions
image recognition
text summarization
Collaborative filtering is based on _____
user metadata
user-item interactions
image recognition
text summarization
YOLO stands for _____
You Only Learn Once
You Only Look Once
You Opt Learn Once
Your Object Learner Only
Which of the following is an ethical consideration in web crawling?
Using GPU
Respecting robots.txt
Using HTML5
Writing CSS selectors
_____ is a popular Python library used for web scraping.
NumPy
BeautifulSoup
TensorFlow
Matplotlib
GAN stands for _____
Generative Adversarial Network
General AI Network
Graphical Attention Network
General Annotation Network
_____ is a popular Python library used for web scraping.
NumPy
BeautifulSoup
TensorFlow
Matplotlib
GAN stands for _____
Generative Adversarial Network
General AI Network
Graphical Attention Network
General Annotation Network
Which NLP task involves identifying the base form of words?
A. Tokenization
B. Lemmatization
C. Classification
D. Parsing
GANs consist of _____
A. Generator and Discriminator
B. Encoder and Decoder
C. Scraper and Crawler
D. Actor and Critic
Web scraping is primarily used to _____
A. write backend logic
B. extract data from websites
C. optimize queries
D. enhance security
Which method helps mimic browser behavior in web scraping?
A. pandas
B. NumPy
C. Selenium
D. Scikit-learn
A web crawler is used to _____
A. improve site speed
B. systematically browse the web
C. train AI models
D. manage cloud services
Which task is more complex than image classification?
A. Speech-to-text
B. Object detection
C. Web scraping
D. Text classification
Which of the following is an ethical consideration in web crawling?
A. Using GPU
B. Respecting robots.txt
C. Using HTML5
D. Writing CSS selectors
_____ is a popular Python library used for web scraping.
A. NumPy
B. BeautifulSoup
C. TensorFlow
D. Matplotlib
Which method helps mimic browser behavior in web scraping?
A. pandas
B. NumPy
C. Selenium
D. Scikit-learn
