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

  • 40Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Machine Learning Fundamentals

What is machine learning primarily about?

40 questions

  1. 1

    What is machine learning primarily about?

    1. A

      Building neural networks that mimic the human brain

    2. B

      Using labeled data to make predictions

    3. C

      Giving computers data to learn patterns without explicit programming

    4. D

      Writing detailed instructions for every possible scenario

    Correct answer
    C

    Giving computers data to learn patterns without explicit programming

    Explanation

    The content defines ML as giving data and letting computers figure things out instead of hard-coding.

  2. 2

    In supervised learning, how does the model learn?

    1. A

      By finding patterns in unlabeled data without any guidance

    2. B

      By comparing its predictions to labeled correct answers and adjusting

    3. C

      By randomly generating outputs until one matches a known result

    4. D

      By using a reward signal from the environment

    Correct answer
    B

    By comparing its predictions to labeled correct answers and adjusting

    Explanation

    Supervised learning uses labeled data; the model compares its predictions to the correct answers and adjusts.

  3. 3

    What is the key difference between supervised and unsupervised learning?

    1. A

      The presence or absence of labeled data

    2. B

      The type of output (continuous vs discrete)

    3. C

      The use of a kernel trick or not

    4. D

      The number of layers in the neural network

    Correct answer
    A

    The presence or absence of labeled data

    Explanation

    Supervised uses labeled data; unsupervised uses no labels.

  4. 4

    Which of the following tasks is an example of regression?

    1. A

      Identifying whether a tumor is malignant

    2. B

      Predicting tomorrow's temperature

    3. C

      Determining if an image contains a cat or dog

    4. D

      Classifying an email as spam or not spam

    Correct answer
    B

    Predicting tomorrow's temperature

    Explanation

    Regression predicts continuous values; temperature is continuous.

  5. 5

    What type of output does classification produce?

    1. A

      A continuous numerical value

    2. B

      A set of cluster centroids

    3. C

      A discrete category

    4. D

      A probability distribution over all possible values

    Correct answer
    C

    A discrete category

    Explanation

    Classification predicts a discrete category from a fixed set.

  6. 6

    In linear regression, what does the slope (β1\beta_1β1​) represent?

    1. A

      The change in Y for a one-unit increase in X

    2. B

      The error between predicted and actual values

    3. C

      The point where the line crosses the Y-axis

    4. D

      The predicted value of Y when X is zero

    Correct answer
    A

    The change in Y for a one-unit increase in X

    Explanation

    β1\beta_1β1​ is the slope, how much Y changes per unit X.

  7. 7

    What is the purpose of the sigmoid function in logistic regression?

    1. A

      To convert a linear output into a probability between 0 and 1

    2. B

      To find the best-fitting line through data points

    3. C

      To measure the distance between clusters

    4. D

      To reduce the dimensionality of the feature space

    Correct answer
    A

    To convert a linear output into a probability between 0 and 1

    Explanation

    Sigmoid squishes output to [0,1] for probability interpretation.

  8. 8

    In binary classification using logistic regression, when is an example predicted as positive?

    1. A

      When the probability exceeds 0.5

    2. B

      When the sigmoid output is exactly 0.5

    3. C

      When the linear output is zero

    4. D

      When the output is less than 0.5

    Correct answer
    A

    When the probability exceeds 0.5

    Explanation

    The usual cutoff is 0.5; above 0.5 means positive.

  9. 9

    What does multiple linear regression allow that simple linear regression does not?

    1. A

      Using multiple independent variables to predict the output

    2. B

      Predicting continuous values instead of discrete categories

    3. C

      Handling non-linear relationships with a kernel trick

    4. D

      Building an ensemble of models

    Correct answer
    A

    Using multiple independent variables to predict the output

    Explanation

    Multiple linear regression uses multiple X features.

  10. 10

    What assumption does Naïve Bayes make about the input features?

    1. A

      They are linearly separable

    2. B

      They are all normally distributed

    3. C

      They have equal variance

    4. D

      They are all independent of each other

    Correct answer
    D

    They are all independent of each other

    Explanation

    The "naïve" part assumes features are independent.

  11. 11

    In Naïve Bayes spam detection, how does the algorithm decide if an email is spam?

    1. A

      By multiplying word probabilities given spam and comparing to not spam

    2. B

      By building a tree of yes/no questions about email features

    3. C

      By looking at the k closest emails in the training set

    4. D

      By drawing a hyperplane between spam and non-spam emails

    Correct answer
    A

    By multiplying word probabilities given spam and comparing to not spam

    Explanation

    It computes probability for each word independently and multiplies.

  12. 12

    How does KNN classify a new data point?

    1. A

      By passing the input through a sigmoid function

    2. B

      By taking a majority vote among its k nearest neighbors

    3. C

      By finding the hyperplane that maximizes the margin

    4. D

      By averaging the values of all training points

    Correct answer
    B

    By taking a majority vote among its k nearest neighbors

    Explanation

    KNN classification uses majority vote of k nearest neighbors.

  13. 13

    What distance metric does KNN typically use to find neighbors?

    1. A

      Euclidean distance

    2. B

      Manhattan distance

    3. C

      Mahalanobis distance

    4. D

      Cosine similarity

    Correct answer
    A

    Euclidean distance

    Explanation

    The video says typically uses Euclidean distance.

  14. 14

    When KNN is used for regression, how is the prediction made?

    1. A

      By taking the median of the neighbors' values

    2. B

      By taking the average of the neighbors' values

    3. C

      By using a weighted majority vote

    4. D

      By fitting a linear regression on the neighbors

    Correct answer
    B

    By taking the average of the neighbors' values

    Explanation

    For regression, it averages the neighbors' values.

  15. 15

    What is the goal of a Support Vector Machine?

    1. A

      To find a hyperplane with the maximum margin separating classes

    2. B

      To minimize the sum of squared errors

    3. C

      To cluster data into k groups

    4. D

      To generate new data that resembles the training data

    Correct answer
    A

    To find a hyperplane with the maximum margin separating classes

    Explanation

    SVM aims to maximize the margin.

  16. 16

    What are support vectors in SVM?

    1. A

      The vectors that are used in the kernel trick

    2. B

      The data points closest to the hyperplane that define the margin

    3. C

      The points that are misclassified by the hyperplane

    4. D

      The centroids of each class

    Correct answer
    B

    The data points closest to the hyperplane that define the margin

    Explanation

    Support vectors are the nearest points from each class.

  17. 17

    How does SVM handle data that is not linearly separable?

    1. A

      By building an ensemble of linear SVMs

    2. B

      By using a sigmoid function to squash the outputs

    3. C

      By reducing the dimensionality with PCA

    4. D

      By using the kernel trick to transform data into a higher dimension

    Correct answer
    D

    By using the kernel trick to transform data into a higher dimension

    Explanation

    The kernel trick transforms data to higher dimension where it becomes separable.

  18. 18

    In a decision tree, what is the root node?

    1. A

      The first and most important split at the top

    2. B

      The node that handles the least important feature

    3. C

      The node that averages predictions from multiple trees

    4. D

      The final node where predictions are made

    Correct answer
    A

    The first and most important split at the top

    Explanation

    Root node is the first split.

  19. 19

    What are leaf nodes in a decision tree?

    1. A

      The nodes that split the data further

    2. B

      The final nodes where predictions are made

    3. C

      The root node and its immediate children

    4. D

      The nodes that perform feature selection

    Correct answer
    B

    The final nodes where predictions are made

    Explanation

    Leaf nodes are bottom nodes with predictions.

  20. 20

    How does Random Forest create diversity among its decision trees?

    1. A

      By adjusting the learning rate for each tree

    2. B

      By using different algorithms for each tree

    3. C

      By training each tree on a random subset of data and a random subset of features

    4. D

      By pruning each tree to a different depth

    Correct answer
    C

    By training each tree on a random subset of data and a random subset of features

    Explanation

    Random Forest uses random data sampling and random feature selection.

  21. 21

    What is ensemble learning?

    1. A

      Selecting the best model from a set of candidates

    2. B

      Training a model on multiple datasets simultaneously

    3. C

      Using a single model with multiple layers

    4. D

      Combining multiple models to improve performance

    Correct answer
    D

    Combining multiple models to improve performance

    Explanation

    Ensemble learning combines multiple models.

  22. 22

    How does XGBoost differ from Random Forest in terms of tree construction?

    1. A

      XGBoost requires the data to be linearly separable

    2. B

      XGBoost uses only a single tree with many branches

    3. C

      XGBoost builds trees sequentially, each correcting errors of the previous one

    4. D

      XGBoost builds trees independently and averages them

    Correct answer
    C

    XGBoost builds trees sequentially, each correcting errors of the previous one

    Explanation

    XGBoost uses boosting, sequential correction of errors.

  23. 23

    What technique does XGBoost use to minimize the loss function?

    1. A

      Gradient descent

    2. B

      Simulated annealing

    3. C

      Genetic algorithms

    4. D

      Brute force search

    Correct answer
    A

    Gradient descent

    Explanation

    The "gradient" part refers to gradient descent.

  24. 24

    In a neural network, what are the layers that perform the actual learning called?

    1. A

      Output layers

    2. B

      Input layers

    3. C

      Convolutional layers

    4. D

      Hidden layers

    Correct answer
    D

    Hidden layers

    Explanation

    Hidden layers are where learning happens.

  25. 25

    What determines the influence of one node on the next in a neural network?

    1. A

      The weight of the connection

    2. B

      The activation function

    3. C

      The learning rate

    4. D

      The number of hidden layers

    Correct answer
    A

    The weight of the connection

    Explanation

    Weights determine influence.

  26. 26

    What is the convolution operation in a CNN designed to do?

    1. A

      Compute the average of all pixel values

    2. B

      Slide a small filter across the image to detect patterns

    3. C

      Reduce the image size by subsampling

    4. D

      Apply a sigmoid function to each pixel

    Correct answer
    B

    Slide a small filter across the image to detect patterns

    Explanation

    Convolution slides a filter to detect patterns.

  27. 27

    What types of patterns does a CNN detect in its early layers?

    1. A

      Color histograms

    2. B

      Complex patterns like entire faces

    3. C

      Simple patterns like edges and corners

    4. D

      Text and numbers

    Correct answer
    C

    Simple patterns like edges and corners

    Explanation

    Early layers detect simple patterns.

  28. 28

    What type of data are CNNs specifically designed for?

    1. A

      Sequential data like time series

    2. B

      Tabular data with many features

    3. C

      Data with spatial structure, such as images

    4. D

      Text data for natural language processing

    Correct answer
    C

    Data with spatial structure, such as images

    Explanation

    CNNs are designed for grid-like structure (images).

  29. 29

    What key mechanism allows Transformers to understand context across an entire sequence?

    1. A

      Convolution

    2. B

      Gradient boosting

    3. C

      Recurrent connections

    4. D

      Self-attention

    Correct answer
    D

    Self-attention

    Explanation

    Transformers use self-attention to look at entire sequence.

  30. 30

    How do Transformers differ from older sequential models in processing text?

    1. A

      They only work on short sentences

    2. B

      They process the entire sentence at once rather than word by word

    3. C

      They require less training data

    4. D

      They use a single layer instead of multiple layers

    Correct answer
    B

    They process the entire sentence at once rather than word by word

    Explanation

    Transformers process entire sequence at once.

  31. 31

    In a GAN, what is the role of the generator?

    1. A

      To create fake data that looks realistic

    2. B

      To compress the data into a lower dimension

    3. C

      To discriminate between real and fake data

    4. D

      To classify the generated data

    Correct answer
    A

    To create fake data that looks realistic

    Explanation

    Generator creates fake data.

  32. 32

    What is the discriminator's job in a GAN?

    1. A

      To compute the loss function

    2. B

      To set the learning rate

    3. C

      To determine whether data is real or fake

    4. D

      To generate new data samples

    Correct answer
    C

    To determine whether data is real or fake

    Explanation

    Discriminator distinguishes real from fake.

  33. 33

    How are both networks in a GAN trained?

    1. A

      Simultaneously, in competition with each other

    2. B

      Independently, with separate datasets

    3. C

      Sequentially, generator first then discriminator

    4. D

      Using reinforcement learning

    Correct answer
    A

    Simultaneously, in competition with each other

    Explanation

    They are trained simultaneously in competition.

  34. 34

    In K-Means clustering, what does the 'K' represent?

    1. A

      The number of iterations

    2. B

      The number of clusters to find

    3. C

      The number of features to use

    4. D

      The number of nearest neighbors

    Correct answer
    B

    The number of clusters to find

    Explanation

    K is the number of clusters.

  35. 35

    How does K-Means define each cluster?

    1. A

      By a decision tree with leaf nodes

    2. B

      By a hyperplane that separates clusters

    3. C

      By a centroid, the center point of the cluster

    4. D

      By the mean of all points in the dataset

    Correct answer
    C

    By a centroid, the center point of the cluster

    Explanation

    Each cluster has a centroid.

  36. 36

    What is the main goal of Principal Component Analysis (PCA)?

    1. A

      To find natural groupings in unlabeled data

    2. B

      To classify data into categories

    3. C

      To predict a continuous value

    4. D

      To reduce the number of features while preserving important information

    Correct answer
    D

    To reduce the number of features while preserving important information

    Explanation

    PCA is for dimensionality reduction.

  37. 37

    What does PCA compute to find directions of maximum variation?

    1. A

      The covariance matrix

    2. B

      The confusion matrix

    3. C

      The correlation matrix

    4. D

      The precision matrix

    Correct answer
    A

    The covariance matrix

    Explanation

    PCA computes the covariance matrix.

  38. 38

    In reinforcement learning, what is the role of the reward?

    1. A

      It is used to initialize the agent's policy

    2. B

      It is the final output of the agent

    3. C

      It represents the state of the environment

    4. D

      It provides feedback to the agent about whether an action was good or bad

    Correct answer
    D

    It provides feedback to the agent about whether an action was good or bad

    Explanation

    Reward is feedback signal.

  39. 39

    How does the agent in reinforcement learning learn?

    1. A

      By reducing the dimensionality of observations

    2. B

      Through trial and error, discovering what actions maximize total reward

    3. C

      By being given labeled examples of correct actions

    4. D

      By clustering states into groups

    Correct answer
    B

    Through trial and error, discovering what actions maximize total reward

    Explanation

    RL learns through trial and error.

  40. 40

    What is the policy in reinforcement learning?

    1. A

      A strategy for deciding what action to take in any situation

    2. B

      A neural network that generates data

    3. C

      The environment's dynamics

    4. D

      The reward function

    Correct answer
    A

    A strategy for deciding what action to take in any situation

    Explanation

    Policy is the agent's strategy.

Question 1 of 40
Question 1 of 40

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent