
Generating Practice Questions
- 1 installs
- 1.3k repo stars
- Updated June 8, 2026
- https-deeplearning-ai/sc-agent-skills-files
Generates practice questions from lecture notes (LaTeX, PDF, Markdown, text) covering true/false, explanatory, coding, and use-case items.
About
Reads lecture notes and produces structured practice questions across true/false, explanatory, coding, and use-case types without an answer key. Educators and students use it to build exam prep and study materials from lecture content.
- Extracts learning objectives and main topics from multiple input formats
- Fixed question order with difficulty progression and LaTeX/Markdown templates
Generating Practice Questions by the numbers
- 1 all-time installs (skills.sh)
- Ranked #565 of 688 Office & Documents skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/https-deeplearning-ai/sc-agent-skills-files --skill generating-practice-questionsAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1 |
|---|---|
| repo stars | ★ 1.3k |
| Last updated | June 8, 2026 |
| Repository | https-deeplearning-ai/sc-agent-skills-files ↗ |
What it does
Generates practice questions from lecture notes (LaTeX, PDF, Markdown, text) covering true/false, explanatory, coding, and use-case items.
Files
Practice Question Generator
Generate comprehensive practice questions from lecture notes to test student understanding of learning objectives and key concepts.
Input
Supported formats: LaTeX (.tex), PDF, Markdown (.md), plain text (.txt)
- PDF: Use
pdfplumberfor text extraction
- LaTeX: Read as text, strip preamble (everything before
\begin{document}), preserve math environments ($...$,\[...\],\begin{equation}, etc.)
- Markdown/Text
Content to extract:
1. Learning objectives - Usually at beginning: "After this lecture, you should be able to..." or may be in section: "Learning Outcomes","Objectives", "Goals". If absent, derive from main topics. 2. Main topics - Section headings, bold terms, definitions, algorithms. 3. Examples - Use for realistic scenarios in questions.
Question Structure
Generate questions in this order:
1. True/False (one per learning objective, or 3-5 if no objectives) 2. Explanatory Questions (3-5 covering main topics) 3. Coding Question (1 algorithm implementation or concept simulation) 4. Use Case (1 realistic application)
For each question type, follow guidelines below, and never include answer key.
Question Guidelines
Type 1: True/False
Test factual understanding and common misconceptions.
Coverage:
- One per learning objective, or 3-5 covering main topics if no objectives
Difficulty progression:
- Start with 1-2 simple definitional questions
- Include 2-3 reasoning-based questions requiring concept application or testing relationships between concepts
Quality criteria:
- Unambiguous with one correct interpretation
- Clear language without complex nested clauses
- Answer directly found in lecture notes
- Wrong answer reveals common misconception
Examples:
- Easy: "In supervised learning, the training data includes both input features and their corresponding labels."
- Medium: "A model with high training accuracy but low test accuracy is likely underfitting the data."
Type 2: Explanatory Questions
Test deeper understanding by requiring students to articulate concepts, compare approaches, and explain reasoning.
Topic selection:
- Choose 3-5 main topics (key algorithms and their implementations, Advantages/limitations of approaches, Relationships between concepts)
- Avoid repetition: If topic appears in T/F, ask about a different aspect
Question formulations:
- "Explain..." - requires description in student's words
- "Compare and contrast..." - tests understanding of differences
- "Why does..." - tests causal reasoning
- "What are the advantages/disadvantages..." - tests critical analysis
- "Describe the steps..." - tests procedural knowledge
Quality criteria:
- Open-ended but focused
- Cannot be answered with simple yes/no
- Requires 3-5 sentences to answer well
Examples:
- "Explain the bias-variance tradeoff. How does increasing model complexity affect bias and variance?"
- "Compare K-Nearest Neighbors and Decision Trees in terms of decision boundaries, training time, and prediction time."
Type 3: Coding Question
Test practical implementation through code.
Scope:
- Implementation of an algorithm discussed in lecture
- Simulation of a concept or process
- Must be achievable with lecture knowledge only
- Should take 15-30 minutes for prepared student
Required structure:
1. Clear objective 2. Step-by-step instructions (3-5 steps) 3. Function signature (if applicable) 4. Expected behavior with input/output examples 5. Hints (optional but helpful)
Language:
- Python (default) with standard library.
- If using external libraries: NumPy, pandas, matplotlib, scikit-learn.
- Should not require advanced Python features
Type 4: Use Case Question
Test ability to apply concepts or algorithms explained in lecture notes to realistic scenarios.
Components:
1. Context - Realistic scenario description 2. Data description - What data is available (provide generation code if needed) 3. Task - What needs accomplishment 4. Constraints (optional) - Time, space, accuracy requirements 5. Hints (2-3) - Guidance without giving solution 6. Libraries - Can use scikit-learn, pandas, NumPy
Data generation: If needed, provide simple, clear code to generate appropriate data.
Output Format Guidelines
Output format depends on user request (LaTeX, PDF, Markdown, plain text).
General structure for all formats:
1. Title with document name 2. Instructions section 3. Part 1: True/False Questions (numbered sequentially) 4. Part 2: Explanatory Questions (numbered sequentially) 5. Part 3: Coding Question (with steps, signature, examples, hints) 6. Part 4: Use Case Application (with scenario, data, task, requirements, hints)
For specific formats: For LaTeX and Markdown document structures, use the following templates (in assets/ folder):
questions_template.tex- Complete LaTeX document structure with formattingmarkdown_template.md- Complete Markdown document structure
Supporting Resources
References (in references/ folder):
examples_by_topic.md- Domain-specific question examples for ML topics (algorithms, preprocessing, evaluation, etc.)
Markdown Template for Practice Questions
Use this template when generating practice questions in Markdown format.
# Practice Questions for [Document Title]
## Instructions
These practice questions are designed to test your understanding of the material covered in [lecture/document name]. Work through each question carefully and show your reasoning.
---
## Part 1: True/False Questions
**Question 1:** [Question text]
**Question 2:** [Question text]
**Question 3:** [Question text]
<!-- Add more T/F questions as needed based on learning objectives -->
---
## Part 2: Explanatory Questions
**Question 4:** [Question text]
**Question 5:** [Question text]
**Question 6:** [Question text]
**Question 7:** [Question text]
<!-- Add 3-5 explanatory questions total -->
---
## Part 3: Coding Question
**Question 8: [Descriptive Title]**
[Brief description of what to implement]
**Steps:**
1. [First major step]
2. [Second major step]
3. [Third major step]
4. [Testing step]
**Function Signature:**def function_name(param1, param2) -> return_type: """ Brief description of what function does
Args: param1: description param2: description
Returns: description of return value """ pass
**Example:**Input
input_example
Output
output_example
**Hints:**
- [Helpful hint 1]
- [Helpful hint 2]
- [Helpful hint 3]
---
## Part 4: Use Case Application
**Question 9: [Use Case Title]**
**Scenario:**
[2-4 sentence description of realistic scenario]
**Data:**
[Description of data or code to generate it]
import numpy as np import pandas as pd
Generate sample data
[data generation code]
**Task:**
[Specific requirements - what needs to be accomplished]
**Requirements:**
- [Requirement 1]
- [Requirement 2]
- [Requirement 3]
**Hints:**
- [Hint 1 - guides toward approach]
- [Hint 2 - implementation suggestion]
- [Hint 3 - important consideration]Formatting Guidelines
- Use
**bold**for question numbers and labels - Use code fences (\
\\`python) for all code blocks - Use
---horizontal rules to separate major sections - Number questions sequentially across all sections
- Include blank lines between sections for readability
\documentclass[14pt]{extarticle}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{listings}
\usepackage{geometry}
\usepackage{enumitem}
\usepackage{xcolor}
\geometry{margin=1in}
% Code formatting settings
\lstset{
basicstyle=\ttfamily\footnotesize,
breaklines=true,
frame=single,
numbers=left,
numberstyle=\tiny\color{gray},
language=Python,
showstringspaces=false,
commentstyle=\color{gray},
keywordstyle=\color{blue},
stringstyle=\color{red},
tabsize=4,
captionpos=b
}
% Custom command for question numbering
\newcounter{questionnum}
\setcounter{questionnum}{0}
\newcommand{\question}[1]{
\stepcounter{questionnum}
\vspace{0.5cm}
\noindent\textbf{Question \arabic{questionnum}:} #1
\vspace{0.3cm}
}
\title{\textbf{Practice Questions for [DOCUMENT_TITLE]}}
\author{}
\date{}
\begin{document}
\maketitle
\section*{Instructions}
These practice questions are designed to test your understanding of the material covered in the lecture. Work through each question carefully and show your reasoning. The questions cover key machine learning concepts, require explanation of main topics, include a coding implementation task, and present a realistic use case for applying what you've learned.
\vspace{0.5cm}
% ============================================
% TRUE/FALSE QUESTIONS
% ============================================
\section*{Part 1: True/False Questions}
\question{[TRUE_FALSE_QUESTION_1]}
\question{[TRUE_FALSE_QUESTION_2]}
\question{[TRUE_FALSE_QUESTION_3]}
% Add more T/F questions as needed based on learning objectives
\vspace{1cm}
% ============================================
% EXPLANATORY QUESTIONS
% ============================================
\section*{Part 2: Explanatory Questions}
\question{[EXPLANATORY_QUESTION_1]}
\question{[EXPLANATORY_QUESTION_2]}
\question{[EXPLANATORY_QUESTION_3]}
\question{[EXPLANATORY_QUESTION_4]}
% Add 3-5 explanatory questions total
\vspace{1cm}
% ============================================
% CODING QUESTION
% ============================================
\section*{Part 3: Coding Question}
\question{[CODING_QUESTION_TITLE]}
[Brief description of what to implement]
\textbf{Steps:}
\begin{enumerate}
\item [Step 1]
\item [Step 2]
\item [Step 3]
\item [Step 4]
\end{enumerate}
\textbf{Function Signature:}
\begin{lstlisting}
def function_name(parameters) -> return_type:
"""
Brief description
Args:
param1: description
param2: description
Returns:
description
"""
pass
\end{lstlisting}
\textbf{Example:}
\begin{lstlisting}
# Input
[input_example]
# Output
[output_example]
\end{lstlisting}
\textbf{Hints:}
\begin{itemize}
\item [Hint 1]
\item [Hint 2]
\item [Hint 3]
\end{itemize}
\vspace{1cm}
% ============================================
% USE CASE QUESTION
% ============================================
\section*{Part 4: Use Case Application}
\question{[USE_CASE_TITLE]}
\textbf{Scenario:}
[2-4 sentence description of realistic scenario]
\textbf{Data:}
[Description of data or code to generate data]
\begin{lstlisting}
# Data generation code
import numpy as np
import pandas as pd
# Generate sample data
[data_generation_code]
\end{lstlisting}
\textbf{Task:}
[Specific requirements - what needs to be accomplished]
\textbf{Requirements:}
\begin{itemize}
\item [Requirement 1]
\item [Requirement 2]
\item [Requirement 3]
\end{itemize}
\textbf{Hints:}
\begin{itemize}
\item [Hint 1 - guides toward approach]
\item [Hint 2 - implementation suggestion]
\item [Hint 3 - important consideration]
\end{itemize}
\end{document}
Question Examples by Subject Area
Domain-specific examples to guide question generation for common machine learning topics.
Machine Learning Fundamentals
Types of Learning
True/False Examples:
- "In supervised learning, the model learns from labeled data where each input has a corresponding output." (True)
- "Unsupervised learning requires labeled data to identify patterns in the dataset." (False)
- "Reinforcement learning involves an agent learning through trial and error with rewards and penalties." (True)
Explanatory Examples:
- "Explain the key differences between supervised, unsupervised, and reinforcement learning. Provide an example application for each."
- "Describe what makes a problem suitable for classification versus regression. How do the outputs differ?"
Overfitting and Underfitting
True/False Examples:
- "A model that performs well on training data but poorly on test data is overfitting." (True)
- "Increasing model complexity always improves generalization performance." (False)
- "An underfitting model has high bias and low variance." (True)
Explanatory Examples:
- "Explain the bias-variance tradeoff. How does model complexity affect each component?"
- "Describe three techniques to prevent overfitting in machine learning models."
---
Linear Algebra for Machine Learning
Vectors and Operations
True/False Examples:
- "The dot product of two perpendicular vectors is zero." (True)
- "The Euclidean norm of a vector represents its magnitude or length." (True)
- "Matrix multiplication is commutative: $AB = BA$ for all matrices A and B." (False)
Explanatory Examples:
- "Explain why the dot product is useful for measuring similarity between feature vectors. How does cosine similarity relate to this?"
- "Describe the geometric interpretation of matrix-vector multiplication as a linear transformation."
Coding Example:
\textbf{Question: Euclidean Distance Calculation}
Implement a function to calculate the Euclidean distance between two points represented as NumPy arrays.
\begin{enumerate}
\item Take two vectors of equal length as input
\item Compute the element-wise difference
\item Square each difference, sum them, and take the square root
\item Return the distance as a scalar
\end{enumerate}---
Data Preprocessing
Feature Scaling
True/False Examples:
- "Standardization transforms features to have zero mean and unit variance." (True)
- "Feature scaling is essential for decision trees to work correctly." (False - trees are scale-invariant)
- "Min-max normalization scales features to a range of [0, 1]." (True)
Explanatory Examples:
- "Explain why K-Nearest Neighbors requires feature scaling but Decision Trees do not. What property of each algorithm causes this difference?"
- "Compare standardization (z-score normalization) and min-max normalization. When would you prefer one over the other?"
Coding Example:
\textbf{Question: Implement Standardization}
Implement a function to standardize a feature matrix (zero mean, unit variance).
\begin{enumerate}
\item Calculate the mean of each feature (column)
\item Calculate the standard deviation of each feature
\item Subtract the mean and divide by the standard deviation
\item Handle the edge case where standard deviation is zero
\end{enumerate}Use Case Example:
- "You have a dataset with features: age (20-80), income ($20K-$500K), and number of children (0-5). Before applying KNN, you need to preprocess the data. Implement standardization and explain why this is necessary for distance-based algorithms."
---
Model Evaluation
Train/Test Split and Cross-Validation
True/False Examples:
- "Using the same data for training and evaluation gives an accurate estimate of model performance." (False)
- "K-fold cross-validation provides a more robust estimate of model performance than a single train/test split." (True)
- "The test set should never be used during model selection or hyperparameter tuning." (True)
Explanatory Examples:
- "Explain why we need separate training, validation, and test sets. What role does each play in the model development process?"
- "Describe how 5-fold cross-validation works. What are its advantages over a simple holdout method?"
Classification Metrics
True/False Examples:
- "Accuracy is always the best metric for evaluating classification models." (False - especially for imbalanced data)
- "Precision measures the proportion of positive predictions that are actually correct." (True)
- "A model with high recall may have low precision if it predicts many false positives." (True)
Explanatory Examples:
- "Explain the difference between precision and recall. In what scenarios would you prioritize one over the other?"
- "Describe what a confusion matrix shows and how to calculate accuracy, precision, recall, and F1-score from it."
Coding Example:
\textbf{Question: Implement Confusion Matrix Metrics}
Given predicted and true labels, compute classification metrics from scratch.
\begin{enumerate}
\item Count True Positives (TP), False Positives (FP), True Negatives (TN), and False Negatives (FN)
\item Calculate accuracy: (TP + TN) / (TP + TN + FP + FN)
\item Calculate precision: TP / (TP + FP)
\item Calculate recall: TP / (TP + FN)
\item Calculate F1-score: 2 * (precision * recall) / (precision + recall)
\end{enumerate}Use Case Example:
\textbf{Question: Credit Card Fraud Detection Evaluation}
\textbf{Scenario:}
A bank has deployed a fraud detection model. Out of 10,000 transactions, 50 are actually fraudulent. The model flagged 80 transactions as fraud, correctly identifying 40 actual fraud cases.
\textbf{Task:}
1. Construct the confusion matrix
2. Calculate accuracy, precision, recall, and F1-score
3. Explain why accuracy alone is misleading for this problem
4. Recommend which metric the bank should prioritize and why---
K-Nearest Neighbors (KNN)
Algorithm Fundamentals
True/False Examples:
- "KNN is a lazy learning algorithm because it does not build an explicit model during training." (True)
- "The time complexity of KNN prediction is O(1) because there is no training phase." (False - prediction is O(nm) where n is samples and m is features)
- "Increasing k in KNN always improves model accuracy." (False - there is an optimal k)
- "KNN can be used for both classification and regression tasks." (True)
Explanatory Examples:
- "Explain why KNN is called a 'lazy learner' or 'instance-based learner.' What are the implications for training and prediction time?"
- "Describe the curse of dimensionality and explain why it particularly affects KNN. What happens to distances as dimensionality increases?"
- "Compare the effect of small k versus large k on the bias-variance tradeoff in KNN."
Distance Metrics
True/False Examples:
- "Euclidean distance is the only distance metric that can be used with KNN." (False)
- "Manhattan distance sums the absolute differences along each dimension." (True)
- "Cosine similarity measures the angle between two vectors rather than their magnitude." (True)
Explanatory Examples:
- "Compare Euclidean and Manhattan distance. In what situations might Manhattan distance be preferred?"
- "Explain when cosine similarity would be a better choice than Euclidean distance for measuring similarity between data points."
Coding Example:
\textbf{Question: Implement KNN Classifier}
Implement K-Nearest Neighbors classification from scratch.
\begin{enumerate}
\item Calculate Euclidean distances from the test point to all training points
\item Find the indices of the k smallest distances
\item Retrieve the labels of the k nearest neighbors
\item Return the most common label (majority vote)
\item Test with different values of k
\end{enumerate}
\textbf{Function Signature:}
\begin{verbatim}
def knn_classify(X_train, y_train, x_test, k):
"""
Classify a single test point using KNN.
Args:
X_train: Training features (n_samples, n_features)
y_train: Training labels (n_samples,)
x_test: Test point (n_features,)
k: Number of neighbors
Returns:
Predicted class label
"""
\end{verbatim}Use Case Example:
\textbf{Question: Iris Species Classification}
\textbf{Scenario:}
A botanist wants to automatically classify iris flowers into three species based on measurements of sepal length, sepal width, petal length, and petal width.
\textbf{Data:}
Use sklearn's iris dataset:
\begin{verbatim}
from sklearn.datasets import load_iris
iris = load_iris()
X, y = iris.data, iris.target
\end{verbatim}
\textbf{Task:}
1. Split data into training (70%) and testing (30%)
2. Standardize the features
3. Find the optimal k using 5-fold cross-validation (try k = 1, 3, 5, 7, 9)
4. Plot training and validation accuracy vs k to visualize the bias-variance tradeoff
5. Report the test accuracy with the optimal k
\textbf{Hints:}
\begin{itemize}
\item Use StandardScaler from sklearn.preprocessing
\item Use cross_val_score with cv=5 for cross-validation
\item Small k leads to overfitting, large k leads to underfitting
\end{itemize}---
Decision Trees
Tree Structure and Splitting
True/False Examples:
- "Decision trees split data based on feature values to create homogeneous subsets." (True)
- "Gini impurity measures the probability of misclassifying a randomly chosen element." (True)
- "Decision trees require feature scaling to work properly." (False - trees are scale-invariant)
- "A decision tree with no depth limit will always achieve 100% training accuracy." (True - if features can distinguish all samples)
Explanatory Examples:
- "Explain how a decision tree chooses which feature to split on at each node. What role does Gini impurity or information gain play?"
- "Describe the geometric interpretation of decision tree boundaries. Why are they always axis-aligned?"
- "Explain why deep decision trees tend to overfit and how pruning or limiting tree depth helps prevent this."
Tree Hyperparameters
True/False Examples:
- "Limiting the maximum depth of a decision tree can help prevent overfitting." (True)
- "A minimum samples split of 1 would allow the tree to grow until each leaf has one sample." (True)
- "Decision trees can only handle categorical features, not continuous ones." (False)
Explanatory Examples:
- "Describe how the max_depth hyperparameter affects the bias-variance tradeoff in decision trees."
- "Explain the difference between pre-pruning (stopping criteria) and post-pruning techniques."
Coding Example:
\textbf{Question: Calculate Gini Impurity}
Implement a function to calculate the Gini impurity of a node.
\begin{enumerate}
\item Count the frequency of each class in the node
\item Calculate the proportion of each class: $p_c = n_c / n_{total}$
\item Compute Gini: $G = 1 - \sum_{c} p_c^2$
\item Test on example: [0, 0, 1, 1, 1] should give Gini = 0.48
\end{enumerate}
\textbf{Function Signature:}
\begin{verbatim}
def gini_impurity(labels):
"""
Calculate Gini impurity for a set of labels.
Args:
labels: Array of class labels
Returns:
Gini impurity value between 0 and 0.5 (for binary)
"""
\end{verbatim}Use Case Example:
\textbf{Question: Loan Default Prediction}
\textbf{Scenario:}
A bank wants to predict whether loan applicants will default based on their credit history, income, and loan amount. The model should be interpretable so loan officers can explain decisions to applicants.
\textbf{Data:}
\begin{verbatim}
import numpy as np
import pandas as pd
np.random.seed(42)
n = 500
data = {
'credit_score': np.random.randint(300, 850, n),
'annual_income': np.random.exponential(50000, n),
'loan_amount': np.random.exponential(15000, n),
'debt_ratio': np.random.uniform(0, 0.8, n)
}
df = pd.DataFrame(data)
# Higher default probability with low credit, high debt ratio
default_prob = 0.1 + 0.3 * (df['credit_score'] < 600) + 0.2 * (df['debt_ratio'] > 0.5)
df['default'] = (np.random.random(n) < default_prob).astype(int)
\end{verbatim}
\textbf{Task:}
1. Train a decision tree classifier with max_depth=3
2. Visualize the tree structure
3. Identify the most important feature for predicting default
4. Explain three decision rules the tree has learned
5. Discuss why a shallow tree might be preferred for this application
\textbf{Hints:}
\begin{itemize}
\item Use sklearn.tree.plot_tree() or export_text() to visualize
\item Feature importances are available via tree.feature_importances_
\item Consider the tradeoff between accuracy and interpretability
\end{itemize}---
Linear Models
Linear Regression
True/False Examples:
- "Linear regression finds the line that minimizes the sum of squared residuals." (True)
- "Linear regression can model non-linear relationships if polynomial features are added." (True)
- "The coefficients in linear regression represent the change in output for a one-unit change in the corresponding feature." (True)
Explanatory Examples:
- "Explain the geometric interpretation of linear regression. What does the regression line represent in feature space?"
- "Describe how adding polynomial features transforms a linear model into a non-linear one. What are the risks of using high-degree polynomials?"
Logistic Regression
True/False Examples:
- "Despite its name, logistic regression is used for classification, not regression." (True)
- "Logistic regression outputs probabilities between 0 and 1 using the sigmoid function." (True)
- "The decision boundary of logistic regression is always linear in the original feature space." (True)
Explanatory Examples:
- "Explain why we use the sigmoid function in logistic regression instead of a linear function. What problem does it solve?"
- "Describe how to interpret the coefficients of a logistic regression model. What do the odds ratios tell us?"
Coding Example:
\textbf{Question: Implement the Sigmoid Function}
Implement the sigmoid function and use it to convert logistic regression outputs to probabilities.
\begin{enumerate}
\item Implement: $\sigma(z) = \frac{1}{1 + e^{-z}}$
\item Handle numerical overflow for large negative values of z
\item Given weights w and bias b, compute P(y=1|x) = sigmoid(w·x + b)
\item Convert probabilities to class predictions using threshold 0.5
\end{enumerate}---
Regularization
Ridge and Lasso Regression
True/False Examples:
- "Regularization adds a penalty term to the loss function to prevent overfitting." (True)
- "Ridge regression (L2) tends to shrink coefficients toward zero but rarely makes them exactly zero." (True)
- "Lasso regression (L1) can perform feature selection by setting some coefficients to exactly zero." (True)
- "Increasing the regularization parameter lambda always improves model performance." (False)
Explanatory Examples:
- "Compare Ridge (L2) and Lasso (L1) regularization. When would you choose one over the other?"
- "Explain how the regularization parameter lambda affects the bias-variance tradeoff. What happens at extreme values of lambda?"
Use Case Example:
\textbf{Question: Housing Price Prediction with Regularization}
\textbf{Scenario:}
You're building a model to predict housing prices with many features (size, bedrooms, location scores, etc.). Some features may be highly correlated or irrelevant.
\textbf{Task:}
1. Train Linear Regression, Ridge, and Lasso models
2. Use cross-validation to find optimal lambda for Ridge and Lasso
3. Compare the coefficients across models
4. Identify which features Lasso eliminated (set to zero)
5. Compare test RMSE for all three models
\textbf{Hints:}
\begin{itemize}
\item Use sklearn.linear_model (LinearRegression, Ridge, Lasso)
\item Use RidgeCV and LassoCV for automatic lambda selection
\item Standardize features before regularization
\end{itemize}---
Tips for Different Lecture Topics
For Algorithm-Heavy Lectures (KNN, Decision Trees)
- Focus coding question on implementing the core algorithm
- Use case should show practical application with real-world data
- T/F questions test edge cases, complexity, and hyperparameters
For Theory-Heavy Lectures (Bias-Variance, Evaluation)
- More explanatory questions testing conceptual understanding
- T/F questions test common misconceptions
- Coding question computes metrics or demonstrates concepts
- Use case demonstrates why theory matters in practice
For Math-Heavy Lectures (Linear Algebra, Optimization)
- T/F questions test mathematical properties
- Explanatory questions connect math to ML applications
- Coding question implements mathematical operations
- Use case shows how math enables ML solutions
For Preprocessing Lectures (Scaling, Encoding)
- T/F questions test when preprocessing is necessary
- Explanatory questions compare different techniques
- Coding question implements preprocessing from scratch
- Use case shows impact of preprocessing on model performance