Machine Learning Models Overview
- 25Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
Define machine learning in your own words.
25 questions
- 1
Define machine learning in your own words.
Model answer
Machine learning is a method of giving computers data and letting them learn patterns and make decisions without being explicitly programmed with every rule.
Explanation
The source describes ML as giving computers data and letting them slowly figure things out instead of hard-coding every instruction.
- 2
What is the difference between supervised and unsupervised learning?
Model answer
Supervised learning uses labeled data (input-output pairs) to learn a mapping, while unsupervised learning uses unlabeled data to find hidden patterns or groupings on its own.
Explanation
Supervised learning is trained on labeled examples with correct answers, while unsupervised learning has no labels and must discover structure independently.
- 3
Describe regression tasks and give one example.
Model answer
Regression predicts a continuous numerical value. Example: predicting a house price based on features like size and location.
Explanation
Regression output is any number along a range; the source lists house prices, temperature, and salary as examples.
- 4
Describe classification tasks and give one example.
Model answer
Classification predicts a discrete category from a fixed set of options. Example: classifying an email as spam or not spam.
Explanation
Classification output is one of a fixed set; the source gives spam detection, tumor malignancy, and animal identification.
- 5
What is the purpose of supervised learning?
Model answer
Supervised learning learns a function that maps inputs to outputs from labeled training data, then applies it to new data.
Explanation
The model compares predictions to correct answers and adjusts to improve, like studying with an answer key.
- 6
Write the equation for simple linear regression and explain each term.
Model answer
Y^=β0+β1X, where Y^ is predicted output, β0 is intercept, β1 is slope, and X is input feature.
Explanation
Linear regression draws the best-fitting line through data points; the equation is explicitly given in the source.
- 7
How does multiple linear regression differ from simple linear regression?
Model answer
Multiple linear regression uses multiple input features (X1,X2,...) each with its own coefficient (β), allowing prediction from several independent variables.
Explanation
The source presents the multiple regression equation with multiple X's and beta coefficients, each representing a feature's contribution.
- 8
What kind of problem does Logistic Regression solve, and how does it produce a probability?
Model answer
Logistic Regression solves binary classification problems by passing a linear equation through a sigmoid function, outputting a probability between 0 and 1. A cutoff (usually 0.5) determines the class.
Explanation
It is used for classification, not regression; the sigmoid squashes output to [0,1], interpreted as probability; threshold at 0.5 gives yes/no.
- 9
Explain the 'naïve' assumption in Naïve Bayes and how Bayes' Theorem is applied.
Model answer
The naïve assumption is that all input features are independent of each other. Bayes' Theorem calculates the probability of a class given the features by multiplying the likelihoods of each feature given the class, then multiplying by the class prior.
Explanation
The source states that Naïve Bayes assumes complete independence of features, and uses Bayes' Theorem to update beliefs based on evidence (words in spam detection).
- 10
How does K-Nearest Neighbors (KNN) classify a new data point?
Model answer
KNN finds the K closest training points (using Euclidean distance) and takes a majority vote of their classes; the new point is assigned the most common class among its neighbors.
Explanation
The source describes classification by looking at k nearest neighbors and taking a majority vote; regression takes the average.
- 11
What is the goal of a Support Vector Machine (SVM) and what are support vectors?
Model answer
SVM finds a hyperplane that separates classes with the maximum margin. Support vectors are the closest data points from each class that 'support' or define the margin.
Explanation
SVM maximizes the margin; support vectors are the nearest points to the hyperplane, as described in the source.
- 12
How does the kernel trick enable SVM to handle non-linear data?
Model answer
The kernel trick transforms data into a higher-dimensional space where a linear hyperplane can separate the classes, without explicitly computing the transformation.
Explanation
The source explains that lifting data into 3D makes it separable; the kernel trick efficiently does this.
- 13
What are the main components of a Decision Tree?
Model answer
A Decision Tree has a root node (first split), internal nodes (decision points based on features), and leaf nodes (final predictions).
Explanation
The source defines root node, nodes for splits, and leaf nodes for predictions.
- 14
How does a Random Forest build diversity among its trees?
Model answer
It trains each tree on a random subset of the training data (bagging) and considers a random subset of features at each split, forcing diversity.
Explanation
The source mentions two key twists: random data sampling (bagging) and random feature selection.
- 15
Explain the concept of boosting as used in XGBoost.
Model answer
Boosting builds trees sequentially, where each new tree focuses on correcting the errors of the previous ones, using gradient descent to minimize a loss function.
Explanation
XGBoost uses boosting to sequentially learn from mistakes; gradient descent measures and corrects errors.
- 16
What are the three types of layers in a Neural Network and what does each do?
Model answer
Input layer receives data (features), hidden layers learn patterns through weighted connections, and output layer produces the final prediction.
Explanation
The source describes input, hidden, and output layers; hidden layers are where learning happens via weight adjustments.
- 17
How does a Convolutional Neural Network (CNN) process images differently from a regular Neural Network?
Model answer
A CNN uses convolution operations with small filters that slide across the image, capturing spatial patterns like edges and shapes, whereas a regular network treats each pixel independently.
Explanation
The source highlights that CNNs understand nearby pixels are related and use filters to detect patterns hierarchically.
- 18
What is self-attention in Transformers and why is it important?
Model answer
Self-attention allows the model to weigh the importance of all words in a sequence relative to each other, capturing long-range dependencies and context effectively.
Explanation
Transformers process the entire sequence at once; self-attention figures out which words are most relevant, solving context issues like pronoun resolution.
- 19
Describe the adversarial process in Generative Adversarial Networks (GANs).
Model answer
A generator creates fake data, and a discriminator tries to distinguish real from fake. They compete, with the generator improving to fool the discriminator, leading to realistic data generation.
Explanation
The source uses the forger-detective analogy: the generator (forger) produces fakes, the discriminator (detective) learns to spot them, and both improve.
- 20
What is unsupervised learning and give an example algorithm covered?
Model answer
Unsupervised learning finds patterns in unlabeled data without predefined outputs. Examples include K-Means Clustering for grouping and PCA for dimensionality reduction.
Explanation
The source introduces unsupervised learning with no labels; K-Means and PCA are two specific algorithms described in the video.
- 21
How does K-Means Clustering form clusters?
Model answer
It partitions data into K clusters by iteratively assigning each point to the nearest centroid and recalculating centroids until convergence.
Explanation
The source explains that K is chosen, centroids are set, points assigned, centroids recalculated, and repeated until stable.
- 22
What is the goal of Principal Component Analysis (PCA)?
Model answer
PCA reduces dimensionality by finding directions (principal components) that capture the most variance in the data, projecting it onto fewer dimensions while retaining important information.
Explanation
PCA compresses data by focusing on directions of maximum variation; it uses covariance matrix to identify these directions.
- 23
Define the key components of Reinforcement Learning: agent, environment, reward, and policy.
Model answer
Agent: the decision-maker. Environment: everything the agent interacts with. Reward: feedback signal telling the agent if an action was good or bad. Policy: the strategy the agent learns to choose actions to maximize cumulative reward.
Explanation
The source describes agent, environment, reward, and policy (strategy for action selection) in the context of trial-and-error learning.
- 24
What is an example application of Reinforcement Learning mentioned in the source?
Model answer
Robotics and autonomous vehicles are mentioned as applications where reinforcement learning learns through trial and error.
Explanation
The source says reinforcement learning is increasingly used in robotics and autonomous vehicles.
- 25
How does the sigmoid function transform the output of a linear equation in Logistic Regression?
Model answer
The sigmoid function squishes any real number into a value between 0 and 1, which is interpreted as a probability. The formula is σ(z)=1+e−z1, where z is the linear combination.
Explanation
The source describes the S-shaped curve and squishing to [0,1] for probability interpretation.

Ask anything
We've read this whole study set, so questions about it get the best answers.