WorksheetsIntroduction to Machine Learning (Mid-term Exam)
Total questions: 40
Worksheet time: 40mins
What is the main goal of Machine Learning?
To write programs manually for every possible case
To enable computers to learn from data and make predictions
To replace data with algorithms
To store large amounts of information
Which of the following is an example of supervised learning?
Clustering customers by purchase history
Predicting house prices based on features
Detecting topics in a set of news articles
Reducing image dimensions using PCA
In supervised learning, the dataset includes:
Only input variables
Only output variables
Both input and output variables
Random unlabeled data
Which of the following tasks best represents unsupervised learning?
Predicting whether an email is spam or not
Grouping customers based on their buying habits
Predicting a student’s final grade
Classifying handwritten digits
What is “training data”?
Data used to evaluate the final model
Data used to build and adjust the model’s parameters
Data that is randomly generated
Data that contains only categorical variables
Which of the following is NOT a type of Machine Learning paradigm?
Supervised Learning
Reinforcement Learning
Controlled Learning
Unsupervised Learning
In reinforcement learning, the agent learns by:
Being told the correct answers directly
Maximizing cumulative reward through trial and error
Randomly adjusting its parameters
Following a fixed rule-based system
Which of the following libraries is commonly used for Machine Learning in Python?
NumPy
Matplotlib
Scikit-learn
TensorDoc
The process of dividing the dataset into training and testing sets is meant to:
Reduce dataset size
Evaluate model performance on unseen data
Increase the training accuracy
Avoid overfitting completely
What does overfitting mean?
Model fits the training data too well but fails to generalize
Model performs poorly on both training and testing data
Model is too simple for the given problem
Model performs perfectly on new data
Which metric is best suited for classification tasks?
Mean Squared Error (MSE)
Accuracy
R-squared
Mean Absolute Error (MAE)
Which of the following evaluation techniques helps ensure robustness of model performance?
Cross-validation
Data augmentation
Feature scaling
Early stopping
The confusion matrix is used for evaluating:
Regression models
Classification models
Clustering models
Dimensionality reduction
Precision measures:
The proportion of true positives among all predicted positives
The proportion of true positives among all actual positives
The overall accuracy of the model
The false positive rate
Recall is defined as:
TP/(TP+FP)
TP/(TP+FN)
(TP+TN)/(TP+FP+FN+TN)
FP/(FP+TN)
The ROC curve plots:
Precision vs Recall
True Positive Rate vs False Positive Rate
Accuracy vs Loss
Sensitivity vs Specificity
In linear regression, the output variable must be:
Categorical
Continuous
Binary
Discrete
The cost function commonly used in linear regression is:
Cross-Entropy Loss
Mean Squared Error (MSE)
Hinge Loss
Log Loss
Which of the following statements about the regression line is true?
It minimizes the distance between predicted and actual values
It maximizes the variance of predictions
It ignores the relationship between variables
It always passes through the origin
The slope (β1) in a simple linear regression represents:
The average of Y
The change in Y for a unit change in X
The intercept
The variance of X
Logistic regression is mainly used for:
Predicting continuous numeric outcomes
Binary or categorical classification problems
Clustering unlabeled data
Detecting outliers
The output of logistic regression before applying the sigmoid function is called:
Logit
Accuracy
Loss
Entropy
The sigmoid function converts values into:
0 or 1 directly
Probability values between 0 and 1
Negative values only
Integer counts
Which of the following activation functions is used in logistic regression?
ReLU
Sigmoid
Tanh
Softmax
If the logistic regression model outputs 0.85, what does it mean?
The model is 85% sure the sample belongs to class 1
The model misclassified 85% of samples
The learning rate is 0.85
The accuracy is 0.85
A Decision Tree splits data based on:
Random numbers
Feature values that minimize impurity
Dataset size
Alphabetical order
Which metric is commonly used to measure impurity in a classification tree?
Gini Index
Mean Squared Error
R² Score
Gradient Loss
What is a "leaf node" in a decision tree?
A node that makes further splits
The top-most node
The final node that gives the output
A node with maximum impurity
Decision trees are prone to:
Underfitting
Overfitting
High bias
Slow learning
Which technique helps reduce overfitting in Decision Trees?
Increasing depth
Pruning
Using fewer features
Removing labels
In Random Forest, each tree is trained on:
The same dataset
Different random subsets of data and features
Only the outliers
A single feature
The main idea behind ensemble methods is to:
Combine multiple models to improve performance
Use a single complex model
Reduce dataset size
Eliminate weak learners
Bagging primarily helps to:
Reduce variance
Increase bias
Increase training error
Reduce number of features
Boosting algorithms like AdaBoost and Gradient Boosting work by:
Training models sequentially, focusing on previous errors
Training all models independently
Randomly selecting outputs
Ignoring misclassified data
A hyperparameter is:
A parameter learned during training
A parameter set before training begins
Introduction to Machine
Learning
Always related to data scaling
Which of the following is a hyperparameter?
Coefficient weight
( β )
Learning rate
Predicted label
Training accuracy
The main goal of model optimization is to:
Make model training slower
Find the best set of parameters for minimal loss
Reduce dataset size
Simplify the algorithm
Gradient Descent works by:
Moving parameters in the direction of increasing loss
Randomly updating weights
Iteratively reducing the loss by adjusting weights
Skipping local minima
Early stopping is used to:
Stop training when validation error starts increasing
Stop training after a fixed number of epochs
Stop when training accuracy is 100%
Reset model weights
Grid Search is a technique for:
Randomly sampling hyperparameters
Exhaustively testing all combinations of hyperparameter values
Automatically generating datasets
Visualizing model performance
