wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Machine Learning Quiz

Total questions: 100

Worksheet time: 50mins

Name
Class
Date
1.

When using BeautifulSoup for web scraping, which of the following would correctly extract all text within paragraph tags while preserving nested structure?

a)

soup.find_all('p').text

b)

soup.find('p').get_text()

c)

soup.find_all('p').get_text(strip=True)

d)

[p.get_text(strip=True) for p in soup.find_all('p')]

2.

In the context of TF-IDF vectorization, what happens when a word appears in every document of the corpus?

a)

Its IDF value becomes 0

b)

Its IDF value becomes 1

c)

Its IDF value becomes infinity

d)

Its TF value becomes 0

3.

Which collaborative filtering approach would be most appropriate for a new e-commerce site with minimal user interaction data but detailed product attributes?

a)

User-based collaborative filtering

b)

Item-based collaborative filtering

c)

Content-based filtering

d)

Matrix factorization

4.

What's the primary issue with using requests.get() in a loop to scrape multiple pages rapidly?

a)

It will return incomplete HTML

b)

It might trigger rate limiting or IP blocking

c)

It cannot handle JavaScript content

d)

It will consume excessive memory

5.

Which of the following NLP tasks is most suitable for identifying customer sentiment in product reviews?

a)

Named Entity Recognition

b)

Part-of-Speech Tagging

c)

Sentiment Analysis

d)

Text Summarization

6.

In a recommendation system, what technique helps solve the "cold start" problem for new users?

a)

Collaborative filtering

b)

Content-based filtering

c)

Matrix factorization

d)

Deep learning

7.

When implementing proxies for web scraping, which is NOT a valid consideration?

a)

Proxy rotation frequency

b)

Geographic location of proxies

c)

Browser JavaScript version

d)

Proxy response time

8.

Which feature would be LEAST useful in a content-based movie recommendation system?

a)

Movie genre

b)

Movie release date

c)

Movie ID number

d)

Movie director

9.

What is the main purpose of stemming in NLP?

a)

To remove stop words

b)

To reduce words to their root form

c)

To identify named entities

d)

To determine word frequency

10.

In web scraping, what is the main advantage of using Selenium over BeautifulSoup?

a)

Faster parsing of HTML

b)

Lower memory usage

c)

Ability to handle dynamic JavaScript content

d)

Better CSS selector support

11.

Which of the following metrics is most appropriate for evaluating a recommendation system's accuracy in a top-N recommendation task?

a)

Root Mean Square Error (RMSE)

b)

Mean Average Precision (MAP)

c)

Perplexity

d)

F1 Score

12.

When using word embeddings in an NLP task, what is the primary purpose of the attention mechanism?

a)

To reduce training time

b)

To compress the input sequence

c)

To focus on relevant parts of the input

d)

To eliminate stop words

13.

In a web scraping scenario where the target website uses infinite scroll, which approach would be most effective?

a)

Using BeautifulSoup with regular expressions

b)

Implementing scroll simulation with Selenium

c)

Using requests with pagination

d)

Parsing the sitemap XML

14.

What technique would be most effective for handling out-of-vocabulary (OOV) words in an NLP system?

a)

Skip-gram modeling

b)

Byte-Pair Encoding (BPE)

c)

TF-IDF vectorization

d)

Stop word removal

15.

In a hybrid recommendation system, which component would be most effective for explaining recommendations to users?

a)

Matrix factorization scores

b)

Content-based feature matching

c)

Collaborative filtering similarities

d)

Neural network embeddings

16.

Which of these is NOT a common attention mechanism in NLP?

a)

Self-attention

b)

Cross-attention

c)

Linear-attention

d)

Recursive-attention

17.

In collaborative filtering, what does "explicit feedback" refer to?

a)

User comments

b)

Direct ratings

c)

Browsing history

d)

Time spent viewing

18.

What is the primary function of the encoder in a GAN?

a)

Generate fake images

b)

There is no encoder in basic GANs

c)

Discriminate real from fake

d)

Compress input data

19.

Which technique is commonly used in object detection to handle objects of different sizes?

a)

Feature Pyramid Networks

b)

Max Pooling

c)

Batch Normalization

d)

Dropout

20.

What is the purpose of the 'User-Agent' header in web scraping?

a)

Speed up requests

b)

Identify the scraper

c)

Encrypt data

d)

Cache results

21.

In NLP, what is the purpose of subword tokenization?

a)

Reduce vocabulary size

b)

Increase model speed

c)

Improve memory usage

d)

Handle punctuation

22.

Which metric is NOT commonly used in recommendation systems?

a)

NDCG

b)

Mean Reciprocal Rank

c)

Intersection over Union

d)

Precision

23.

What is the role of skip connections in image processing networks?

a)

Reduce training time

b)

Prevent vanishing gradients

c)

Decrease model size

d)

Limit overfitting

24.

In StyleGAN, what is the purpose of the mapping network?

a)

Style transfer

b)

Image segmentation

c)

Latent space disentanglement

d)

Image compression

25.

Which technique helps prevent mode collapse in GANs?

a)

Minibatch discrimination

b)

Max pooling

c)

Batch normalization

d)

Dropout

26.

What is the primary purpose of beam search in NLP?

a)

A. Reduce computation time

b)

B. Find optimal sequence

c)

C. Compress input

d)

D. Handle long sequences

27.

In web scraping, what is a Captcha used for?

a)

Speed up loading

b)

Prevent automated access

c)

Improve security

d)

Cache data

28.

Which loss function is commonly used in object detection for bounding box regression?

a)

Cross-entropy

b)

Smooth L1

c)

Binary cross-entropy

d)

Hinge loss

29.

What is the purpose of negative sampling in recommendation systems?

a)

Handle missing data

b)

Improve training efficiency

c)

Reduce memory usage

d)

Increase model accuracy

30.

In image processing, what does the term 'receptive field' refer to?

a)

Image resolution

b)

Pixel neighborhood

c)

Color space

d)

Feature map size

31.

In NLP, which of the following is NOT a common preprocessing step?

a)

Tokenization

b)

Matrix multiplication

c)

Stemming

d)

Stop word removal

32.

The BERT model is primarily based on which architecture?

a)

RNN

b)

LSTM

c)

Transformer

d)

CNN

33.

In a recommendation system, what does 'cold start problem' refer to?

a)

System initialization time

b)

Recommending to new users

c)

Server cooling issues

d)

Algorithm warm-up period

34.

Which loss function is commonly used in GANs?

a)

Binary Cross-entropy

b)

Mean Squared Error

c)

Categorical Cross-entropy

d)

Huber Loss

35.

In object detection, what does IoU stand for?

a)

Internet of Usage

b)

Intersection over Union

c)

Input over Update

d)

Image over URL

36.

Which of these is NOT a common web scraping library in Python?

a)

BeautifulSoup

b)

Scrapy

c)

Selenium

d)

PyTorch

37.

What is the purpose of non-maximum suppression in object detection?

a)

Reduce memory usage

b)

Eliminate duplicate detections

c)

Increase model accuracy

d)

Speed up training

38.

In content-based filtering for recommendation systems, what is primarily analyzed?

a)

User behavior

b)

Item features

c)

User demographics

d)

System performance

39.

Which type of GAN is specifically designed for image-to-image translation?

a)

DCGAN

b)

CycleGAN

c)

WGAN

d)

CGAN

40.

What is the primary purpose of word embeddings in NLP?

a)

Data compression

b)

Semantic representation

c)

Text encryption

d)

Memory optimization

41.

Which technique is commonly used for handling imbalanced datasets in image classification?

a)

Data augmentation

b)

Batch normalization

c)

Dropout

d)

Layer normalization

42.

What is the role of the discriminator in a GAN?

a)

Generate new data

b)

Classify real vs fake data

c)

Preprocess input data

d)

Optimize network parameters

43.

In web crawling, what is a robots.txt file used for?

a)

Store crawler settings

b)

Define crawling rules

c)

Log crawler errors

d)

Cache webpage data

44.

Which method is NOT typically used for text summarization?

a)

Extractive summarization

b)

Abstractive summarization

c)

Recursive summarization

d)

Hybrid summarization

45.

What is the purpose of attention mechanisms in NLP?

a)

Reduce computation time

b)

Focus on relevant parts of input

c)

Compress input data

d)

Normalize output values

46.

Content-based filtering uses _____

a)

other users' preferences

b)

item features

c)

server logs

d)

deep learning models only

47.

Web scraping is primarily used to _____

a)

write backend logic

b)

extract data from websites

c)

optimize queries

d)

enhance security

48.

Web scraping is primarily used to _____

a)

A. write backend logic

b)

B. extract data from websites

c)

C. optimize queries

d)

D. enhance security

49.

Which method helps mimic browser behavior in web scraping?

a)

pandas

b)

NumPy

c)

Selenium

d)

Scikit-learn

50.

Which NLP task involves identifying the base form of words?

a)

Tokenization

b)

Lemmatization

c)

Classification

d)

Parsing

51.

Which of the following is a well-known dataset for handwritten digit classification?

a)

COCO

b)

MNIST

c)

ImageNet

d)

ADE20K

52.

Named Entity Recognition (NER) involves identifying _____

a)

part of speech

b)

names of people, places, and organizations

c)

token length

d)

punctuation marks

53.

The file used by websites to communicate crawling rules to bots is called _____

a)

sitemap.xml

b)

robots.txt

c)

crawl.json

d)

meta.html

54.

In deep learning-based image classification, overfitting can be reduced by _____

a)

increasing layers

b)

using dropout

c)

removing labels

d)

increasing image size

55.

The generator in a GAN learns to _____

a)

label images

b)

create data similar to the real distribution

c)

tokenize words

d)

parse HTML

56.

Which evaluation metric is used in object detection?

a)

BLEU

b)

mAP

c)

RMSE

d)

TF-IDF

57.

BLEU score is mainly used to evaluate _____

a)

image clarity

b)

machine translation

c)

object detection

d)

classification accuracy

58.

In object detection, Intersection over Union (IoU) is used to _____

a)

reduce model size

b)

evaluate prediction accuracy

c)

perform augmentation

d)

convert images to grayscale

59.

Breadth-first search (BFS) in crawling explores _____

a)

deepest pages first

b)

pages level by level

c)

pages with ads

d)

only internal links

60.

Scrapy is a framework used for _____

a)

image recognition

b)

web crawling and scraping

c)

recommendation systems

d)

GANs

61.

The role of the discriminator in a GAN is to _____

a)

generate fake images

b)

distinguish real from fake data

c)

compute loss

d)

provide embeddings

62.

Which task does NLP not cover?

a)

Sentiment analysis

b)

Text classification

c)

Image segmentation

d)

Question answering

63.

In web scraping, time delays between requests are often used to _____

a)

reduce image resolution

b)

avoid overloading servers

c)

improve classification

d)

compress data

64.

Matrix factorization is used in which type of recommendation system?

a)

Content-based

b)

Collaborative filtering

c)

Demographic filtering

d)

Sentiment-based filtering

65.

What is the purpose of using headers in a web scraping request?

a)

To bypass DNS

b)

To mimic a real browser

c)

To reduce memory usage

d)

To parse HTML faster

66.

Recommender systems often suffer from the problem of _____

a)

memory leaks

b)

cold start

c)

mode collapse

d)

adversarial loss

67.

Which of the following is an embedding method in NLP?

a)

YOLO

b)

Word2Vec

c)

Faster R-CNN

d)

K-Means

68.

What is typically used as the output layer in image classification CNNs?

a)

ReLU

b)

Softmax

c)

MaxPool

d)

Sigmoid

69.

Which algorithm divides the image into grids and detects objects?

a)

R-CNN

b)

YOLO

c)

GAN

d)

GPT

70.

Which status code generally indicates that access to the web page is forbidden during scraping?

a)

200

b)

301

c)

403

d)

500

71.

Which method allows scraping JavaScript-generated content?

a)

Requests

b)

urllib

c)

Selenium

d)

FTP

72.

Which of the following is not typically used for object detection?

a)

SSD

b)

LSTM

c)

YOLO

d)

Faster R-CNN

73.

A key challenge when training GANs is _____

a)

overfitting

b)

mode collapse

c)

low accuracy

d)

memory leaks

74.

Which metric is commonly used to evaluate recommendation accuracy?

a)

Recall

b)

RMSE

c)

BLEU

d)

IoU

75.

In NLP, stemming is different from lemmatization in that stemming _____

a)

uses full vocabulary

b)

cuts words to root form without context

c)

is always more accurate

d)

translates sentences

76.

Which of the following libraries is typically used to parse HTML content in Python web scraping?

a)

NumPy

b)

Pandas

c)

BeautifulSoup

d)

Matplotlib

77.

Which model is commonly used in image classification?

a)

RNN

b)

GAN

c)

CNN

d)

SVM

78.

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

79.

Which task is more complex than image classification?

a)

Speech-to-text

b)

Object detection

c)

Web scraping

d)

Text classification

80.

Which of the following is an ethical consideration in web crawling?

a)

A. Using GPU

b)

B. Respecting robots.txt

c)

C. Using HTML5

d)

D. Writing CSS selectors

81.

Which model is commonly used in image classification?

a)

A. RNN

b)

B. GAN

c)

C. CNN

d)

D. SVM

82.

GAN stands for _____

a)

Generative Adversarial Network

b)

General AI Network

c)

Graphical Attention Network

d)

General Annotation Network

83.

Content-based filtering uses _____

a)

other users' preferences

b)

item features

c)

server logs

d)

deep learning models only

84.

Collaborative filtering is based on _____

a)

user metadata

b)

user-item interactions

c)

image recognition

d)

text summarization

85.

Collaborative filtering is based on _____

a)

user metadata

b)

user-item interactions

c)

image recognition

d)

text summarization

86.

YOLO stands for _____

a)

You Only Learn Once

b)

You Only Look Once

c)

You Opt Learn Once

d)

Your Object Learner Only

87.

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

88.

_____ is a popular Python library used for web scraping.

a)

NumPy

b)

BeautifulSoup

c)

TensorFlow

d)

Matplotlib

89.

GAN stands for _____

a)

Generative Adversarial Network

b)

General AI Network

c)

Graphical Attention Network

d)

General Annotation Network

90.

_____ is a popular Python library used for web scraping.

a)

NumPy

b)

BeautifulSoup

c)

TensorFlow

d)

Matplotlib

91.

GAN stands for _____

a)

Generative Adversarial Network

b)

General AI Network

c)

Graphical Attention Network

d)

General Annotation Network

92.

Which NLP task involves identifying the base form of words?

a)

A. Tokenization

b)

B. Lemmatization

c)

C. Classification

d)

D. Parsing

93.

GANs consist of _____

a)

A. Generator and Discriminator

b)

B. Encoder and Decoder

c)

C. Scraper and Crawler

d)

D. Actor and Critic

94.

Web scraping is primarily used to _____

a)

A. write backend logic

b)

B. extract data from websites

c)

C. optimize queries

d)

D. enhance security

95.

Which method helps mimic browser behavior in web scraping?

a)

A. pandas

b)

B. NumPy

c)

C. Selenium

d)

D. Scikit-learn

96.

A web crawler is used to _____

a)

A. improve site speed

b)

B. systematically browse the web

c)

C. train AI models

d)

D. manage cloud services

97.

Which task is more complex than image classification?

a)

A. Speech-to-text

b)

B. Object detection

c)

C. Web scraping

d)

D. Text classification

98.

Which of the following is an ethical consideration in web crawling?

a)

A. Using GPU

b)

B. Respecting robots.txt

c)

C. Using HTML5

d)

D. Writing CSS selectors

99.

_____ is a popular Python library used for web scraping.

a)

A. NumPy

b)

B. BeautifulSoup

c)

C. TensorFlow

d)

D. Matplotlib

100.

Which method helps mimic browser behavior in web scraping?

a)

A. pandas

b)

B. NumPy

c)

C. Selenium

d)

D. Scikit-learn