What is Machine Learning?
- A
A subset of AI that enables systems to learn from data
- B
A programming language for AI
- C
A database management system
- D
A type of hardware
Master Machine Learning with 120+ curated MCQs covering algorithms, deep learning, NLP, computer vision, and more. Perfect for data science interviews and exam preparation.
What is Machine Learning?
A subset of AI that enables systems to learn from data
A programming language for AI
A database management system
A type of hardware
Who coined the term 'Machine Learning'?
Arthur Samuel
Alan Turing
Geoffrey Hinton
Andrew Ng
What are the three main types of machine learning?
Supervised, Unsupervised, Reinforcement
Linear, Logistic, Neural
Classification, Regression, Clustering
Training, Testing, Validation
What is the difference between AI and ML?
AI is the broader concept, ML is a subset of AI
ML is the broader concept, AI is a subset
They are the same thing
AI is older than ML
What is the role of a loss function in ML?
To measure how well the model performs
To optimize the model's parameters
To split the data
To visualize data
What is overfitting in machine learning?
Model performs well on training data but poorly on new data
Model performs poorly on both training and new data
Model performs equally well on all data
Model fails to learn from training data
What is supervised learning?
Learning from labeled data
Learning from unlabeled data
Learning through trial and error
Learning without any data
Which of the following is a classification algorithm?
Logistic Regression
Linear Regression
K-Means
PCA
What is the difference between classification and regression?
Classification predicts discrete labels, regression predicts continuous values
Regression predicts discrete labels, classification predicts continuous values
Both predict continuous values
Both predict discrete labels
What is the k-Nearest Neighbors (KNN) algorithm?
A non-parametric algorithm that classifies based on nearest neighbors
A parametric algorithm that uses probability
A reinforcement learning algorithm
A deep learning algorithm
What is the purpose of the train-test split?
To evaluate model performance on unseen data
To increase training data
To reduce overfitting
To normalize data
What is a confusion matrix?
A table used to evaluate classification model performance
A matrix for regression analysis
A visualization tool for clustering
A neural network architecture
What is unsupervised learning?
Learning from unlabeled data
Learning from labeled data
Learning through trial and error
Learning with human feedback
Which of the following is a clustering algorithm?
K-Means
Linear Regression
Support Vector Machine
Random Forest
What is dimensionality reduction?
Reducing the number of features/variables
Reducing the number of data points
Reducing the number of classes
Reducing the model complexity
What is the purpose of PCA (Principal Component Analysis)?
To reduce dimensionality and identify important features
To classify data
To cluster data
To predict continuous values
What is the difference between K-Means and Hierarchical clustering?
K-Means requires number of clusters, Hierarchical creates a hierarchy
Hierarchical requires number of clusters, K-Means creates a hierarchy
Both create hierarchies
Both require number of clusters
What is anomaly detection?
Identifying rare or unusual data points
Identifying common data points
Predicting future data points
Creating new data points
What is linear regression?
A method to model the relationship between variables using a linear equation
A classification algorithm
A clustering algorithm
A deep learning model
What is the cost function in linear regression?
Mean Squared Error (MSE)
Cross-entropy loss
Hinge loss
Log loss
What is the purpose of gradient descent?
To minimize the cost function by updating parameters
To maximize the cost function
To split the data
To visualize the data
What is the difference between simple and multiple linear regression?
Simple uses one independent variable, multiple uses several
Multiple uses one independent variable, simple uses several
Both use one variable
Both use multiple variables
What is R-squared (R²) in regression?
A measure of how well the model explains the variance
The error rate of the model
The number of features
The learning rate
What is regularization in regression?
Techniques to prevent overfitting by adding a penalty term
Techniques to increase overfitting
Techniques to reduce data size
Techniques to increase data size
What is logistic regression?
A classification algorithm that uses a sigmoid function
A regression algorithm for continuous values
A clustering algorithm
A neural network
What is the purpose of the sigmoid function in logistic regression?
To map output to probabilities between 0 and 1
To map output to continuous values
To cluster data
To reduce dimensions
What is the difference between logistic and linear regression?
Logistic is for classification, linear is for regression
Linear is for classification, logistic is for regression
Both are for classification
Both are for regression
What is the support vector machine (SVM)?
A classification algorithm that finds the optimal hyperplane
A clustering algorithm
A regression algorithm
A neural network
What is the kernel trick in SVM?
A method to transform data to higher dimensions without explicit computation
A method to reduce dimensions
A method to cluster data
A method to normalize data
What is the difference between bagging and boosting?
Bagging trains models in parallel, boosting trains sequentially
Boosting trains models in parallel, bagging trains sequentially
Both train in parallel
Both train sequentially
What is a decision tree?
A tree-like model that makes decisions based on feature values
A neural network architecture
A clustering algorithm
A regression algorithm
What is entropy in decision trees?
A measure of randomness or impurity
A measure of accuracy
A measure of precision
A measure of recall
What is information gain?
The reduction in entropy after splitting on a feature
The increase in accuracy
The reduction in training time
The increase in data size
What is the Gini impurity?
A measure of how often a randomly chosen element would be incorrectly classified
A measure of model accuracy
A measure of model precision
A measure of model recall
What is the difference between a decision tree and random forest?
Random forest is an ensemble of multiple decision trees
Decision tree is an ensemble of random forests
Both are the same
Decision tree is more accurate
What is pruning in decision trees?
Removing branches to reduce overfitting
Adding branches to increase complexity
Increasing tree depth
Decreasing tree depth
What is the purpose of ensemble methods?
To combine multiple models for better performance
To use a single model
To reduce data size
To increase data size
What is the Random Forest algorithm?
An ensemble of decision trees using bagging
A single decision tree
A neural network
A clustering algorithm
What is the difference between bagging and boosting?
Bagging reduces variance, boosting reduces bias
Boosting reduces variance, bagging reduces bias
Both reduce variance
Both reduce bias
What is XGBoost?
An optimized gradient boosting algorithm
A random forest implementation
A neural network library
A clustering algorithm
What is AdaBoost?
Adaptive Boosting that gives more weight to misclassified samples
A random forest algorithm
A neural network
A clustering algorithm
What is stacking in ensemble learning?
Combining multiple models using a meta-model
Training models in sequence
Training models in parallel
Using a single model
What is accuracy in classification?
The ratio of correct predictions to total predictions
The ratio of false positives to true positives
The ratio of true positives to false positives
The ratio of false negatives to true negatives
What is precision in classification?
The ratio of true positives to all positive predictions
The ratio of true positives to all actual positives
The ratio of correct predictions to all predictions
The ratio of false positives to true positives
What is recall (sensitivity) in classification?
The ratio of true positives to all actual positives
The ratio of true positives to all positive predictions
The ratio of correct predictions to all predictions
The ratio of false positives to true positives
What is the F1 score?
The harmonic mean of precision and recall
The arithmetic mean of precision and recall
The geometric mean of precision and recall
The sum of precision and recall
What is the ROC curve?
A curve that plots true positive rate vs false positive rate
A curve that plots precision vs recall
A curve that plots accuracy vs error rate
A curve that plots loss vs epochs
What is cross-validation?
A technique to evaluate model performance by splitting data into folds
A technique to increase data size
A technique to reduce features
A technique to optimize hyperparameters
What is a neural network?
A computational model inspired by the human brain
A linear regression model
A decision tree
A clustering algorithm
What is a perceptron?
The simplest type of neural network with one layer
A deep neural network
A convolutional neural network
A recurrent neural network
What is the role of activation functions in neural networks?
To introduce non-linearity
To introduce linearity
To reduce dimensions
To cluster data
What is backpropagation?
An algorithm to update weights by propagating error backwards
An algorithm to propagate input forward
An algorithm to reduce dimensions
An algorithm to cluster data
What is the difference between a shallow and deep neural network?
Shallow has few layers, deep has many layers
Deep has few layers, shallow has many layers
Both have the same number of layers
Shallow is more accurate
What is the purpose of the learning rate in training neural networks?
To control the step size in gradient descent
To control the number of epochs
To control the batch size
To control the number of layers
What is deep learning?
A subset of ML using deep neural networks
A subset of AI without neural networks
A type of clustering
A type of regression
What is a convolutional neural network (CNN)?
A neural network designed for image and spatial data
A neural network for sequential data
A neural network for text data
A neural network for tabular data
What is a recurrent neural network (RNN)?
A neural network designed for sequential data
A neural network for image data
A neural network for tabular data
A neural network with no connections
What is the vanishing gradient problem?
Gradients become too small for effective learning in deep networks
Gradients become too large
Gradients become zero
Gradients become infinite
What is the purpose of dropout in neural networks?
To prevent overfitting by randomly dropping neurons
To increase model complexity
To reduce training time
To increase accuracy
What is transfer learning?
Using knowledge from one task to improve performance on another
Learning from scratch
Learning without data
Learning with no labels
What is the difference between mean and median?
Mean is sensitive to outliers, median is robust
Median is sensitive to outliers, mean is robust
Both are sensitive to outliers
Both are robust to outliers
What is standard deviation?
A measure of the spread of data around the mean
A measure of central tendency
A measure of correlation
A measure of probability
What is the difference between correlation and causation?
Correlation doesn't imply causation
Correlation implies causation
They are the same
Causation doesn't imply correlation
What is a p-value in statistics?
The probability of observing results as extreme as the observed, assuming null hypothesis is true
The probability that the null hypothesis is true
The probability of a Type I error
The probability of a Type II error
What is a normal distribution?
A symmetric bell-shaped distribution
A skewed distribution
A uniform distribution
A bimodal distribution
What is Bayes theorem used for in ML?
To calculate conditional probabilities for classification
To calculate means and variances
To calculate correlations
To calculate standard deviations
What is feature scaling?
Normalizing features to a common range
Adding new features
Removing features
Creating features
What is the difference between normalization and standardization?
Normalization scales to [0,1], standardization has mean 0, std 1
Standardization scales to [0,1], normalization has mean 0, std 1
Both are the same
Neither is used
What is one-hot encoding?
Converting categorical variables to binary vectors
Converting continuous variables to categorical
Converting text to numbers
Converting numbers to text
What is feature selection?
Choosing the most relevant features for the model
Creating new features
Scaling features
Encoding features
What is the purpose of feature engineering?
To improve model performance by creating better features
To reduce data size
To increase data size
To remove all features
What is the curse of dimensionality?
The problem of high-dimensional data leading to sparsity and overfitting
The problem of too little data
The problem of too many samples
The problem of missing values
What is Natural Language Processing (NLP)?
The interaction between computers and human language
Processing numerical data
Processing images
Processing audio
What is tokenization in NLP?
Splitting text into smaller units like words or sentences
Converting text to numbers
Removing stop words
Lemmatizing words
What is the difference between stemming and lemmatization?
Stemming is rule-based, lemmatization uses vocabulary and morphology
Lemmatization is rule-based, stemming uses vocabulary
Both are the same
Neither is used
What is a word embedding?
A dense vector representation of words
A one-hot encoding of words
A bag-of-words representation
A TF-IDF representation
What is the purpose of stop word removal in NLP?
To remove common words that don't add significant meaning
To remove all words
To keep only stop words
To remove all content words
What is the Transformer architecture?
A neural network architecture using attention mechanisms
A traditional RNN architecture
A CNN architecture
A decision tree architecture
What is computer vision?
The field of AI that deals with visual data
The field of AI that deals with text
The field of AI that deals with audio
The field of AI that deals with tabular data
What is image classification?
Assigning a class label to an image
Detecting objects in an image
Segmenting an image
Generating an image
What is object detection?
Identifying and locating objects in an image
Classifying the entire image
Segmenting the image
Generating the image
What is image segmentation?
Dividing an image into segments based on pixel groups
Classifying the entire image
Detecting objects in the image
Generating the image
What is the purpose of max pooling in CNNs?
To reduce spatial dimensions while preserving important features
To increase spatial dimensions
To add non-linearity
To normalize features
What is the difference between object detection and object segmentation?
Detection gives bounding boxes, segmentation gives pixel-level masks
Segmentation gives bounding boxes, detection gives pixel-level masks
Both give bounding boxes
Both give pixel-level masks
What is reinforcement learning?
Learning through interaction with an environment to maximize rewards
Learning from labeled data
Learning from unlabeled data
Learning without any data
What is an agent in reinforcement learning?
The learner that interacts with the environment
The environment itself
The reward function
The policy
What is a policy in reinforcement learning?
A strategy that the agent follows to decide actions
The reward function
The environment
The state space
What is the exploration-exploitation tradeoff?
Balancing between trying new actions and using known good actions
Balancing between training and testing
Balancing between supervised and unsupervised learning
Balancing between classification and regression
What is Q-learning?
A value-based reinforcement learning algorithm
A policy-based reinforcement learning algorithm
A supervised learning algorithm
An unsupervised learning algorithm
What is the reward signal in reinforcement learning?
Feedback from the environment indicating the quality of an action
The prediction error
The classification accuracy
The clustering quality
What is MLOps?
The practice of managing ML model lifecycle in production
The practice of training ML models
The practice of data engineering
The practice of model evaluation
What is model versioning?
Tracking different versions of ML models
Tracking data versions
Tracking code versions
Tracking hardware versions
What is model drift?
The degradation of model performance over time
The improvement of model performance over time
The change in model architecture
The change in model parameters
What is the purpose of A/B testing in ML?
To compare two models and choose the better one
To test model accuracy
To test model precision
To test model recall
What is model monitoring in production?
Continuously tracking model performance and health
Training the model
Deploying the model
Testing the model
What is the difference between model training and inference?
Training learns patterns, inference applies learned patterns to new data
Inference learns patterns, training applies learned patterns
Both learn patterns
Both apply learned patterns
What is clustering?
Grouping similar data points together
Classifying data points into predefined categories
Predicting continuous values
Reducing data dimensions
What is the Elbow method in K-Means clustering?
A method to find the optimal number of clusters
A method to initialize centroids
A method to evaluate cluster quality
A method to visualize clusters
What is the Silhouette score?
A measure of how similar a point is to its own cluster compared to others
A measure of cluster size
A measure of cluster density
A measure of cluster distance
What is the difference between K-Means and DBSCAN?
K-Means is centroid-based, DBSCAN is density-based
DBSCAN is centroid-based, K-Means is density-based
Both are centroid-based
Both are density-based
What is hierarchical clustering?
Creating a hierarchy of clusters in a tree-like structure
Creating clusters of equal size
Creating clusters based on density
Creating clusters based on centroids
What is the purpose of the dendrogram in hierarchical clustering?
To visualize the hierarchy of clusters
To measure cluster quality
To initialize centroids
To assign cluster labels
What is the difference between training and testing data?
Training data is used to learn, testing data is used to evaluate
Testing data is used to learn, training data is used to evaluate
Both are used for learning
Both are used for evaluation
What is a support vector?
The data points closest to the decision boundary in SVM
The data points farthest from the decision boundary
The centroids of clusters
The means of distributions
What is the purpose of the intercept in linear regression?
To allow the model to fit data that doesn't pass through the origin
To increase model complexity
To reduce overfitting
To increase accuracy
What is the difference between binary and multi-class classification?
Binary has two classes, multi-class has more than two
Multi-class has two classes, binary has more than two
Both have two classes
Both have more than two classes
What is the difference between ID3 and C4.5 algorithms?
ID3 uses information gain, C4.5 uses gain ratio
C4.5 uses information gain, ID3 uses gain ratio
Both use information gain
Both use gain ratio
What is the purpose of the 'weak learner' in boosting?
To perform slightly better than random guessing
To perform perfectly
To perform poorly
To perform randomly
What is the difference between accuracy and balanced accuracy?
Balanced accuracy handles class imbalance better
Accuracy handles class imbalance better
Both are the same
Neither handles class imbalance
What is the purpose of batch normalization?
To normalize inputs of each layer to improve training
To reduce model complexity
To increase model complexity
To reduce training time
What is the difference between a CNN and an RNN?
CNN is for spatial data, RNN is for sequential data
RNN is for spatial data, CNN is for sequential data
Both are for spatial data
Both are for sequential data
What is the difference between covariance and correlation?
Correlation is a normalized version of covariance
Covariance is a normalized version of correlation
Both are the same
Neither is normalized
What is the purpose of polynomial features?
To create non-linear features from linear ones
To reduce features
To encode categorical features
To scale features
What is the purpose of TF-IDF?
To weight words based on importance in a document
To convert text to word embeddings
To remove stop words
To perform tokenization
What is the purpose of data augmentation in computer vision?
To increase the diversity of training data
To reduce the size of training data
To remove noise from images
To compress images
What is the difference between on-policy and off-policy learning?
On-policy uses current policy, off-policy can use different policies
Off-policy uses current policy, on-policy can use different policies
Both use current policy
Both use different policies
What is the purpose of CI/CD in MLOps?
To automate model training and deployment
To manually train models
To manually deploy models
To evaluate models
What is the difference between soft and hard clustering?
Hard assigns each point to one cluster, soft assigns probabilities
Soft assigns each point to one cluster, hard assigns probabilities
Both assign to one cluster
Both assign probabilities
What is the difference between model parameters and hyperparameters?
Parameters are learned, hyperparameters are set before training
Hyperparameters are learned, parameters are set before training
Both are learned
Both are set before training
What is the purpose of the bias term in machine learning models?
To allow the model to fit data that doesn't pass through the origin
To increase model complexity
To reduce overfitting
To increase accuracy