Font size
WorksheetsNurkhat
Total questions: 70
Worksheet time: 36mins
Lasso can be interpreted as least-squares linear regression where
weights are regularized with the L1 norm
the weights have a Gaussian prior
weights are regularized with the L2 norm
the solution algorithm is simpler e. None of the above
What is overfitting?
Great result in training and poor result in test
Great result in training and great result in test
Poor result in training and poor result in test
... shows how far is a ?average model? from the ground truth
Bias
MSE
Variance
R squared
Which of the following techniques can be used for keyword normalization in NLP, the process of converting a keyword into its base form?
Lemmatization
Soundex
Cosine Similarity
N-grams
Which of the following indicates a fairly strong relationship between X and Y?
Correlation coefficient = 0.9
The p-value for the null hypothesis Beta coefficient =0 is 0.0001
The t-statistic for the null hypothesis Beta coefficient =0 is 30
None of the above
You trained a binary classifier model which gives very high accuracy on the training data, but much lower accuracy on validation data. The following may be true:
This is an instance of overfitting
This is an instance of underfitting.
The training was not well regularized.
The training and testing examples are sampled from different distributions
Which way Lasso Regression differs from Ridge Regression?
It uses absolute values in regularization parameter, instead of squares
It uses square values in regularization parameter
It works better in small datasets
It works better in big datasets
None of the above
What kind of function is used to predict in the sklearn library?
predict()
test()
find()
None of the above
Which is not a sample of classification problem?
To predict the amount of money a customer will spend in one year
To predict whether a customer switches to another provider or brand
To predict the category to which customer belongs to
To predict whether a customer responds to a particular advertising campaign or not
Regarding bias and variance, which of the following statements are true? (select multiple)
Models which overfit have a high bias.
Models which overfit have a low bias.
Models which underfit have a low variance.
None of the above
In a simple linear regression model (One independent variable), If we change the input variable by 1 unit. How much will the output variable change?
By 1
By change
By its Slope
No change
. ... in classification problems is the number of correct predictions made by the model over all kinds of predictions made.
Accuracy
F1 Score
Recall
Precision
To test the linear relationship of y(dependent) and x(independent) continuous variables, which of the following plots is best suited?
Scatter plot
Barchart
Histograms
All of the above
What is the true positive?
Ground truth: True, Predicted: True
Ground truth: False, Predicted: False
Ground truth: True, Predicted: False
Ground truth: False, Predicted: True
Which of the following methods) does not have a closed form solution for its coefficients?
Ridge regression
Lasso
None of both
Clear selection
What is overfitting?
Great result in training and poor result in test
Great result in training and great result in test
Poor result in training and poor result in test
Poor result in training and poor result in test
Which of the following is true about "Ridge" or "Lasso" regression methods in case of feature selection?
Lasso regression uses subset selection of features
Ridge regression uses subset selection of features
Both use subser selection of features
None of above All of the above
Natural Language processing can be used in
Text classification
All of the above
Chatbots
Topic modeling
The correlation coefficient is used to determine:
The strength of the relationship between the x and y variables
A specific value of the y-variable given a specific value of the x-variable
A specific value of the x-variable given a specific value of the y-variable
All of the above
You are predicting whether an email is spam or not. Based on the features, you obtained an estimated probability to be 0.75. What's the meaning of this estimated probability?
(select two)
there is 75% chance that the email will be spam
there is 25% chance that the email will be spam
there is 75% chance that the email will not be spam
there is 25% chance that the email will not be spam
The response variable can belong to one of three or more categories and there is a natural ordering among the categories.
Binary logistic regression
Ordinal logistic regression
Multinomial logistic regression
Linear regression
Overfitting is ...
a good performance on training data and poor performance on unseen data
the idea that simpler models should be used more frequently than complex
a strategy to make complex models (like the decision tree) more robust
None of the above
What are typical sizes for the training, validation and testing sets?
80% 10% 10%
60% 20% 20%
10% 80% 10%
20% 20% 60%.
50% 10% 40%
How to calculate the recall?
(tp + tn) / (tp + tn + fp + fn)
tp/(tp + fp)
tp/(tp+ fn)
(tp + tn) / (tp + tn + fp)
The correlation coefficient is used to determine:
The strength of the relationship between the x and y variables
A specific value of the y-variable given a specific value of the x-variable
A specific value of the x-variable given a specific value of the y-variable
All of the above
How to calculate the accuracy?
(tp + tn) / (tp + tn + fp + fn)
tp/(tp+fp)
tp /(tp + tn)
(tp + tn) / (tp + tn + fp)
Suppose you have fitted a complex regression model on a dataset. Now, you are using Ridge regression with tuning parameter lambda to reduce its complexity. Choose the option(s) below which describes the relationship of bias and variance with lambda.
In case of very small lambda; bias is low, variance is low
In case of very small lambda: bias is low, variance is high
In case of very small lambda; bias is high, variance is low
In case of very small lambda; bias is high, variance is high
Which of the following is not true about Machine Learning?
Machine Learning was inspired by the learning process of human beings.
Machine Learning models iteratively learn from data, and allow computers to find hidden insights.
Machine Learning models help us in tasks such as object recognition, summarization, and recommendation systems.
Machine Learning gives computers the ability to make decisions by writing down rules and methods and being explicitly programmed.
How do you handle missing or corrupted data in a dataset?
Drop missing rows or columns
Replace missing values with mean/median/mode
Assign a unique category to missing values
All of the above
What is the difference between supervised and unsupervised learning?
Supervised learning uses labeled data, while unsupervised learning uses unlabeled data
Both supervised and unsupervised learning use labeled data.
Supervised learning is used for clustering, unsupervised for regression.
What is the difference between supervised and unsupervised learning?
Supervised learning uses labeled data, while unsupervised learning uses unlabeled data
Both supervised and unsupervised learning use labeled data.
Supervised learning is used for clustering, unsupervised for regression.
Provide an example of reinforcement learning.
Using decision trees to classify images.
Training an AI to play chess by rewarding it for winning games.
Predicting house prices based on labeled data
Describe how supervised learning works.
It learns a function from labeled training data to make predictions on new data
It makes decisions without any labeled data.
It guesses predictions randomly and adjusts based on errors.
Do you think machine learning is another name for artificial intelligence?
No, ML is a subset of AI focused on learning from data.
Yes, AI is a subset of machine learning.
Yes, they are the same thing.
Why do we need to split the data into training and testing sets?
To evaluate the model’s performance on unseen data.
To make the dataset larger
To make sure the model only works on a small dataset.
Why do we need logistic regression?
For time-series forecasting.
For binary and multi-class classification tasks.
For dimensionality reduction.
Provide examples for each type of logistic regression.
Binary: Spam detection; Multinomial: Document classification; Ordinal: Customer satisfaction levels
Decision trees examples only.
Linear regression examples only.
Why do we need linear regression?
To predict continuous numeric values based on input variable
For classification tasks.
For feature extraction.
What are evaluation metrics for classification problems?
Accuracy, Precision, Recall, F1-score, ROC-AUC
R-squared, Mean Squared Error.
A/B Testing, Click-through rates.
Why do we need a confusion matrix? Provide a detailed definition.
It helps visualize the performance of classification by showing TP, FP, FN, and TN counts.
It shows the results of a regression model.
It calculates the mean of predicted and actual values.
What are evaluation metrics for linear regression?
Precision, Recall, F1-score.
AUC, ROC Curve.
Mean Absolute Error, Mean Squared Error, R-squared.
What is the difference between decision trees and random forests?
Random forests use fewer features than decision trees.
Decision trees use more data points than random forests.
Decision trees are single models; random forests combine many trees for better accuracy and stability.
Explain the structure of a decision tree
A table with rows and columns for data points.
A linear regression model.
A tree with nodes for decisions, branches for outcomes, and leaves for predictions
What is the difference between precision and recall?
Precision: TP / (TP + FP); Recall: TP / (TP + FN)
Precision and recall are the same.
Precision: TN / (TN + FP); Recall: FP / (FP + FN)
Explain the cross-validation technique.
It uses a single fold for validation.
Data is split into folds; the model trains on some folds and validates on the remaining one, rotating.
The model is trained on the entire dataset at once.
How does a random forest handle categorical variables?
It splits them using criteria like Gini impurity or information gain.
It ignores categorical variables completely.
It splits them using criteria like Gini impurity or information gain.
How does feature extraction work? Describe the steps involved.
Step 1: Collect data; Step 2: Clean data; Step 3: Transform raw features; Step 4: Select or extract key features.
The raw data is used without any changes.
Feature extraction happens automatically without any preparation.
What is the difference between computer vision and natural language processing?
CV processes images/videos; NLP processes text/language.
CV processes audio; NLP processes images.
Both fields process numerical data
List 5 computer vision algorithms with descriptions
PCA: Image classification; LDA: Image classification; t-SNE: Image classification.
SVM: Image classification; KNN: Image classification; Naive Bayes: Image classification.
CNN: Feature extraction in images; YOLO: Real-time object detection; SIFT: Keypoint detection; R-CNN: Region proposals for object detection; Optical Flow: Motion tracking
How do word embeddings work and where are they used?
They map words to vectors based on context; used in NLP tasks like translation and sentiment analysis
They map words to random numbers.
They convert words into images for processing.
How does text analysis help in real life?
Only useful for classifying text into categories.
Spam filtering, sentiment detection, customer feedback analysis, chatbot development, topic modeling.
Only helps with data compression.
What types of problems can Naive Bayes solve?
Text classification, spam detection, sentiment analysis, medical diagnosis
Clustering problems.
Regression problems.
What is sentiment analysis?
The process of categorizing text into topics.
The process of converting text into numeric data.
The process of determining if a piece of text is positive, negative, or neutral
How does tokenization work?
Splits text into words or phrases for processing.
Groups words into predefined categories.
Converts text into images.
Real-life uses of computer vision?
Used for data normalization.
Only used for photo editing.
Face recognition, autonomous vehicles, medical imaging, quality inspection, surveillance
Describe SVM in detail.
SVM finds the average of all data points.
SVM finds the optimal hyperplane that maximally separates classes in a dataset.
SVM is used for time-series forecasting.
How do recommender systems work? When are they used?
They analyze user behavior/preferences to suggest items. Used in e-commerce, streaming, and social media
They only predict outcomes based on past behavior
They classify users into fixed categories
Write an algorithm for KNN
1. Choose K; 2. Calculate distances to all points; 3. Sort distances; 4. Choose K nearest neighbors; 5. Vote for the most common label
1. Choose K; 2. Take the average of distances; 3. Assign labels randomly
1. Choose a single point; 2. Sort all points; 3. Select the farthest neighbor.
What is the purpose of SVM?
To classify data by finding the best boundary between categories.
To cluster similar data points together
To predict continuous values
What is text vectorization and how does it work?
Converts text into numeric form using methods like Bag of Words or TF-IDF
Uses neural networks to interpret text.
Converts text into images
Example of SVM with detailed description.
Email classification using decision trees.
Email classification: SVM separates spam vs non-spam based on word vectors.
Email classification using KNN.
List 3 dimensionality reduction techniques besides PCA.
t-SNE: Non-linear dimensionality reduction; LDA: Projects data for classification; Autoencoders: Neural network-based reduction
K-means: Clustering; Naive Bayes: Classification; SVM: Classification.
Decision Trees: Classification; Linear Regression: Prediction.
Describe K-means in one sentence.
It clusters data by assigning points to the nearest of K centroids
It predicts continuous values based on input data.
It generates random clusters.
What is the architecture of autoencoders? How do they work?
Encoder randomly selects data; decoder generates predictions.
Encoder compresses input; decoder reconstructs it, useful for reducing dimensionality.
Autoencoders perform classification.
What is KNN and where can it be used?
KNN is a classification algorithm based on distance; used in pattern recognition and recommender systems.
KNN is used for time-series forecasting.
KNN is used only in clustering
Which of the following is not Machine Learning techniques?
1 point
Classification and Regression
Clustering
Numpy, Scipy and Scikit-Learn
Anomaly Detection and Recommendation Systems
Numpy, Scipy and Scikit-Learn
Classification and Regression
Clustering
Which is not a sample of classification problems?
To predict the amount of money a customer will spend in one year
To predict whether a customer switches to another provider or brand
To predict the the category to which customer belongs to
To predict whether a customer responds to a particular advertising campaign or not
Suppose you are working on weather prediction, and use a learning algorithm to predict tomorrow's temperature (in degrees Centigrade/Fahrenheit). Would you treat this as a classification or a regression problem?
Regression
Classification
Clustering
What are independent variables?
The features of our dataset
The values that interfere in the value we want to predict
The parameters of the regression algorithm
The value we want to predict
What makes the supervised model different from unsupervised?
Differences are only on the name b. Different libraries are used
In the depth of ML. models
Existence of ground truth labels
