1. Home
  2. Explore
  3. Computer Science
  4. Machine Learning Models Overview

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Machine Learning Models Overview

  • 63Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: ML Fundamentals
  • spaceFlip card
  • KI knew it
  • DI didn't know it
  • ←Previous card
  • →Next card

What is machine learning?

Tap to flipClick to flipspace

Giving computers a large amount of data and allowing them to learn patterns and make decisions without being explicitly programmed for every step.

Or swipe the card

63 cards

  1. What is machine learning?

    Giving computers a large amount of data and allowing them to learn patterns and make decisions without being explicitly programmed for every step.

  2. What is supervised learning?

    A type of machine learning where the model is trained on labeled data, meaning each input has a corresponding correct output. The model learns by comparing its predictions to the labels and adjusting.

  3. What is unsupervised learning?

    A type of machine learning where the model is given unlabeled data and must find patterns and structure on its own without any guidance.

  4. What is the difference between regression and classification in supervised learning?

    Regression predicts a continuous numerical value (e.g., house price, temperature), while classification predicts a discrete category (e.g., spam/not spam, cat/dog).

  5. What is the equation for simple linear regression?

    Y^=β0+β1X\hat{Y} = \beta_0 + \beta_1 XY^=β0​+β1​X, where Y^\hat{Y}Y^ is the predicted output, β0\beta_0β0​ is the intercept, β1\beta_1β1​ is the slope, and XXX is the input feature.

  6. How does multiple linear regression differ from simple linear regression?

    Multiple linear regression uses multiple independent variables. The equation is Y^=β0+β1X1+β2X2+...+βnXn\hat{Y} = \beta_0 + \beta_1 X_1 + \beta_2 X_2 + ... + \beta_n X_nY^=β0​+β1​X1​+β2​X2​+...+βn​Xn​, where each β\betaβ represents the contribution of that feature.

  7. Give a real-world example of linear regression.

    Predicting a student's exam score based on hours studied. Hours studied (X) is the independent variable, and exam score (Y) is the dependent variable.

  8. What type of problem does Logistic Regression solve?

    Binary classification problems, where the output is one of two categories (e.g., yes/no, true/false).

  9. How does Logistic Regression output a probability?

    It passes the linear regression output through the sigmoid function σ(z)=11+e−z\sigma(z) = \frac{1}{1+e^{-z}}σ(z)=1+e−z1​, which squishes the value to between 0 and 1, interpreted as probability.

  10. What threshold is typically used in Logistic Regression to make a classification decision?

    A threshold of 0.5. If the predicted probability is above 0.5, classify as positive; below 0.5, classify as negative.

  11. When is Logistic Regression best used?

    When you need to classify something into one of two categories and the relationship between inputs and output is relatively straightforward.

  12. Give an example of Logistic Regression.

    Predicting whether a patient has a disease based on age, blood pressure, and cholesterol levels. The model outputs a probability (e.g., 0.85) that the patient has the disease.

  13. What is the core assumption of Naïve Bayes?

    All input features are independent of each other given the class (the 'naïve' assumption).

  14. What mathematical theorem is Naïve Bayes based on?

    Bayes' Theorem: P(A∣B)=P(B∣A)P(A)P(B)P(A|B) = \frac{P(B|A)P(A)}{P(B)}P(A∣B)=P(B)P(B∣A)P(A)​.

  15. How does Naïve Bayes classify a text like an email?

    It calculates the probability of the email being spam given each word, assuming independence, multiplies the probabilities for all words, and compares the result for spam vs. not spam. The higher probability wins.

  16. When is Naïve Bayes a good choice?

    For fast, lightweight classification on text data, where computational resources are limited.

  17. Give an example of Naïve Bayes.

    Spam detection: scanning an email's words independently, multiplying probabilities that each word appears in spam vs. not spam, and classifying accordingly.

  18. What is the core idea of K-Nearest Neighbors (KNN)?

    To predict the class of a new data point, look at the kkk closest data points in the training set and take a majority vote (for classification) or average (for regression).

  19. How is the 'closeness' measured in KNN?

    Typically using Euclidean distance: ∑i=1n(xi−yi)2\sqrt{\sum_{i=1}^{n} (x_i - y_i)^2}∑i=1n​(xi​−yi​)2​, which calculates the straight-line distance between two points.

  20. What does the 'K' in KNN represent?

    The number of nearest neighbors to consider. For example, K=3K=3K=3 uses the 3 closest points.

  21. When is KNN a good choice?

    When the dataset is small and the relationship between data points is based on similarity.

  22. Give an example of KNN.

    Identifying the type of party (tech meetup vs. music event) by looking at the nearest people around you. If the 3 nearest people are talking about Python, you're at a tech meetup.

  23. What is the goal of Support Vector Machines (SVM)?

    To find the hyperplane that best separates two classes by maximizing the margin (distance) between the hyperplane and the nearest data points from each class.

  24. What are support vectors in SVM?

    The data points that are closest to the hyperplane; they 'support' the boundary. The hyperplane depends only on these points.

  25. How does SVM handle non-linearly separable data?

    Using the kernel trick, which maps the data to a higher-dimensional space where it becomes linearly separable.

  26. When is SVM most effective?

    When there is a clear margin of separation between classes and when working with high-dimensional data (e.g., text classification, image recognition).

  27. Give an example of SVM.

    Separating red and blue dots on a graph with a line. SVM finds the line that has the maximum distance to the closest dots (support vectors) on both sides.

  28. What is a Decision Tree?

    A tree-like structure of yes/no questions (nodes) that splits data based on features, leading to a prediction at the leaf nodes.

  29. What are the root node and leaf nodes in a Decision Tree?

    The root node is the first split at the top of the tree; leaf nodes are the final nodes where predictions are made.

  30. When is a Decision Tree a good choice?

    When the model needs to be easy to interpret and explain, as you can follow the branches to see how a prediction was made.

  31. Give an example of a Decision Tree.

    Predicting loan approval using questions like income level, credit score, and employment status. Each split narrows down the risk profile until a final decision is reached.

  32. How does a Random Forest improve over a single Decision Tree?

    It builds many decision trees (an ensemble) and averages their predictions (majority vote for classification, average for regression). It uses random data sampling and random feature selection to create diverse trees, reducing overfitting.

  33. What are the two key twists in Random Forest that create diversity?

    1. Random data sampling: each tree is trained on a random subset of the data. 2) Random feature selection: at each split, only a random subset of features is considered.
  34. What is the main principle behind XGBoost?

    Sequential building of trees, where each new tree focuses on correcting the errors of the previous tree using gradient descent to minimize a loss function.

  35. How does XGBoost use gradient descent?

    It calculates the gradient of the loss function with respect to predictions and builds a tree that moves in the direction that reduces the error most.

  36. When is XGBoost a top choice?

    When maximum predictive performance on structured, tabular data is needed.

  37. What are the basic building blocks of a Neural Network?

    Layers of interconnected nodes (neurons): an input layer, one or more hidden layers, and an output layer. Connections have weights that are adjusted during training.

  38. How does a Neural Network learn?

    By adjusting the weights of connections between neurons based on the error of its predictions, using backpropagation and gradient descent.

  39. When should you use a Neural Network?

    When the data is complex and high-dimensional (e.g., images, audio, text), where traditional algorithms struggle to find patterns.

  40. What makes Convolutional Neural Networks (CNNs) specialized for images?

    They use convolution operations that slide filters across the image, detecting patterns like edges and textures, and they understand that nearby pixels are related (spatial structure).

  41. How do patterns become more complex in a CNN's layers?

    Early layers detect simple patterns like edges, while deeper layers combine these into complex patterns like eyes, faces, etc.

  42. When are CNNs the go-to choice?

    For image recognition, video analysis, and medical imaging, where spatial structure matters.

  43. What is the key innovation of Transformers?

    The self-attention mechanism that allows the model to look at the entire input sequence at once and determine which parts are most relevant to each other, capturing long-range dependencies.

  44. How do Transformers handle language differently from older models?

    They process an entire sentence at once rather than one word at a time, allowing better understanding of context (e.g., resolving pronouns like 'it').

  45. Give an example of a Transformer application.

    Resolving the pronoun 'it' in the sentence 'The trophy didn't fit in the suitcase because it was too big.' The Transformer uses self-attention to determine 'it' refers to the trophy.

  46. What are the two components of a Generative Adversarial Network (GAN)?

    A generator that creates fake data and a discriminator that tries to distinguish real from fake.

  47. How do GANs train?

    The generator and discriminator are trained simultaneously in a two-player game. The generator improves its fakes, while the discriminator improves its detection, until the generator produces realistic data.

  48. What are GANs best used for?

    Generating new, realistic data (e.g., images, audio, video) rather than classifying or predicting existing data. Examples include deepfakes and AI-generated art.

  49. Give an example of a GAN.

    Generating photorealistic human faces from scratch. The generator creates faces, and the discriminator tries to detect if they are fake. Over time, the generator produces faces indistinguishable from real ones.

  50. What is K-Means Clustering?

    An unsupervised algorithm that partitions data into K clusters, each defined by a centroid. Points are assigned to the nearest centroid, and centroids are recalculated iteratively until stable.

  51. How does K-Means determine cluster assignments?

    It assigns each point to the nearest centroid (using Euclidean distance), then recomputes centroids as the mean of points in each cluster. This repeats until convergence.

  52. What is a typical application of K-Means?

    Customer segmentation, where customers are grouped by purchasing behavior to tailor marketing strategies.

  53. Give an example of K-Means.

    Segmenting customers into groups like big spenders, occasional browsers, and discount hunters based on transaction data.

  54. What is Principal Component Analysis (PCA)?

    A dimensionality reduction technique that transforms a high-dimensional dataset into a lower-dimensional representation while preserving as much variance as possible.

  55. How does PCA work mathematically?

    It computes the covariance matrix of the data, finds its eigenvectors (principal components) and eigenvalues (amount of variance), and projects the data onto the top components.

  56. When should PCA be used?

    When dealing with high-dimensional data to reduce complexity before feeding into another model, or to visualize data in 2D/3D. Also used in image compression.

  57. Give an example of PCA.

    Taking a selfie from the best angle to capture the most flattering features, analogous to finding the principal components that capture the most variation.

  58. What are the three main components of Reinforcement Learning?

    An agent (learner), an environment (what it interacts with), and a reward signal (feedback on actions).

  59. What is the goal of the agent in Reinforcement Learning?

    To maximize its total reward over time.

  60. How does the RL agent learn?

    Through trial and error: it takes actions, receives rewards or penalties, and over many iterations learns a policy that tells it which action to take in each state to maximize total reward.

  61. What is a policy in Reinforcement Learning?

    A strategy that the agent learns, mapping states to actions, with the goal of maximizing cumulative reward.

  62. Where is Reinforcement Learning commonly applied?

    In robotics (learning motor skills), autonomous vehicles, game playing (e.g., AlphaGo), and any scenario where an agent must interact with an environment to achieve a goal.

  63. Give an example of Reinforcement Learning.

    Training a dog: every time the dog performs a trick correctly, it gets a treat (reward). Over time, the dog learns which behaviors maximize treats.

Card 1 of 63
Card 1 of 63

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent