1. Home
  2. Explore
  3. Computer Science
  4. Data-Driven Business with ML

Study methods

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

Data-Driven Business with ML

  • 29Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Algorithms Basics

What is the formal definition of an algorithm?

29 questions

  1. 1

    What is the formal definition of an algorithm?

    1. A

      A device that stores large amounts of data for analysis.

    2. B

      A set of rules or processes to be followed in calculations or problem-solving operations by a computer.

    3. C

      A programming language used to build machine learning models.

    4. D

      A mathematical equation used to solve linear regressions.

    Correct answer
    B

    A set of rules or processes to be followed in calculations or problem-solving operations by a computer.

    Explanation

    An algorithm is defined as a set of rules or processes to be followed in calculations or other problem-solving operations, especially by a computer.

  2. 2

    Which historical figure is credited with decoding the Enigma messages during World War II?

    1. A

      Charles Babbage

    2. B

      Albert Einstein

    3. C

      Alan Turing

    4. D

      John von Neumann

    Correct answer
    C

    Alan Turing

    Explanation

    Alan Turing was instrumental in decoding the encrypted Enigma messages from Germany, which contributed to the end of World War II.

  3. 3

    In a flowchart, what does a diamond-shaped box represent?

    1. A

      A decision point with two tracks (true/false or yes/no).

    2. B

      The start or end of a process.

    3. C

      An input or output operation.

    4. D

      A processing step or action.

    Correct answer
    A

    A decision point with two tracks (true/false or yes/no).

    Explanation

    The diamond shape in a flowchart indicates a decision box where a condition is evaluated, leading to different paths such as yes/no or true/false.

  4. 4

    What is a pseudocode?

    1. A

      A high-level, literal representation of code that can be understood by non-programmers.

    2. B

      A low-level machine language used for optimization.

    3. C

      A type of algorithm that only performs arithmetic operations.

    4. D

      A graphical representation of an algorithm using symbols.

    Correct answer
    A

    A high-level, literal representation of code that can be understood by non-programmers.

    Explanation

    Pseudocode is a high-level language code that is very literal, allowing non-programmers to understand the logic without knowing a specific programming language.

  5. 5

    In the pseudocode/flowchart example, what is the value of C after adding A=10 and B=20?

    1. A

      10

    2. B

      20

    3. C

      200

    4. D

      30

    Correct answer
    D

    30

    Explanation

    C = A + B = 10 + 20 = 30 as shown in the example.

  6. 6

    In the pseudocode/flowchart example that prints values from A=10 to B=20, what is the output?

    1. A

      20, 19, 18, ..., 10

    2. B

      10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20

    3. C

      10, 20

    4. D

      The sum of A and B

    Correct answer
    B

    10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20

    Explanation

    The algorithm prints all numbers from 10 to 20 inclusive, as the loop increments A by 1 until it equals B.

  7. 7

    What is the definition of machine learning provided in the session?

    1. A

      The use of statistical formulas to predict outcomes without data.

    2. B

      A method to store and retrieve data efficiently.

    3. C

      The process of manually coding every decision a machine should make.

    4. D

      The ability for a machine to learn something without being explicitly programmed for that particular thing.

    Correct answer
    D

    The ability for a machine to learn something without being explicitly programmed for that particular thing.

    Explanation

    Machine learning is defined as the ability for a machine to learn without being explicitly programmed for that specific task, by using data to train itself.

  8. 8

    What are the three main types of machine learning?

    1. A

      Training, validation, and testing.

    2. B

      Linear, logistic, and polynomial learning.

    3. C

      Supervised learning, unsupervised learning, and reinforcement learning.

    4. D

      Regression, classification, and clustering.

    Correct answer
    C

    Supervised learning, unsupervised learning, and reinforcement learning.

    Explanation

    The session identifies supervised, unsupervised, and reinforcement learning as the three main types.

  9. 9

    In supervised learning, what does the input variable typically represent?

    1. A

      The reward signal.

    2. B

      The number of clusters.

    3. C

      X, the independent variable.

    4. D

      Y, the dependent variable.

    Correct answer
    C

    X, the independent variable.

    Explanation

    In supervised learning, input variables are denoted by X and are considered independent variables.

  10. 10

    In supervised learning, what is the goal of the system?

    1. A

      To compute the average of all input values.

    2. B

      To maximize rewards through trial and error.

    3. C

      To group similar data points without labels.

    4. D

      To understand how the output variable Y changes with respect to the input variable X.

    Correct answer
    D

    To understand how the output variable Y changes with respect to the input variable X.

    Explanation

    The goal of supervised learning is to approximate a mapping function from X to Y so that new input data can predict output variables.

  11. 11

    In supervised learning, which variable is considered dependent?

    1. A

      Both X and Y.

    2. B

      The input variable X.

    3. C

      Neither X nor Y.

    4. D

      The output variable Y.

    Correct answer
    D

    The output variable Y.

    Explanation

    The dependent variable in supervised learning is the output variable Y, which depends on the independent input variable X.

  12. 12

    What type of supervised learning is used when the output variable is a continuous numeric value?

    1. A

      Classification.

    2. B

      Clustering.

    3. C

      Reinforcement learning.

    4. D

      Regression.

    Correct answer
    D

    Regression.

    Explanation

    Regression is used when the output is a continuous numeric value, such as predicting the price of an apple.

  13. 13

    What type of supervised learning is used when the output variable is categorical?

    1. A

      Dimensionality reduction.

    2. B

      Regression.

    3. C

      Clustering.

    4. D

      Classification.

    Correct answer
    D

    Classification.

    Explanation

    Classification is used when the output variable is categorical, such as determining whether a person is male or female.

  14. 14

    In logistic regression, what is the shape of the curve?

    1. A

      Straight line.

    2. B

      U-shaped.

    3. C

      Parabolic.

    4. D

      S-shaped.

    Correct answer
    D

    S-shaped.

    Explanation

    Logistic regression produces an S-shaped curve due to its binary categorical output.

  15. 15

    In logistic regression, the dependent variable is typically what?

    1. A

      Multinomial with more than two categories.

    2. B

      Binary or categorical.

    3. C

      Continuous numeric.

    4. D

      Ordinal.

    Correct answer
    B

    Binary or categorical.

    Explanation

    Logistic regression is used when the dependent variable is categorical, often binary (0 or 1).

  16. 16

    The example of predicting whether a student passes or fails based on gender illustrates which concepts?

    1. A

      Reinforcement learning with rewards.

    2. B

      Unsupervised clustering of students.

    3. C

      Regression with continuous output.

    4. D

      Independent variable (gender) and dependent variable (pass/fail).

    Correct answer
    D

    Independent variable (gender) and dependent variable (pass/fail).

    Explanation

    In the example, gender is the independent variable and pass/fail is the dependent variable, demonstrating supervised learning.

  17. 17

    What is a key characteristic of data used in unsupervised learning?

    1. A

      The data has no labels or class labels.

    2. B

      The data is labeled with target values.

    3. C

      The data is always numerical.

    4. D

      The data is preprocessed and cleaned.

    Correct answer
    A

    The data has no labels or class labels.

    Explanation

    Unsupervised learning uses data without any labels, so the algorithm must find patterns on its own.

  18. 18

    What is the main purpose of clustering in unsupervised learning?

    1. A

      To reduce the dimensionality of data.

    2. B

      To predict continuous numeric values.

    3. C

      To group similar data points together.

    4. D

      To classify data into predefined categories.

    Correct answer
    C

    To group similar data points together.

    Explanation

    Clustering aims to group similar data points into clusters, as seen with separating fish and birds.

  19. 19

    In k-means clustering, what does the 'k' represent?

    1. A

      The number of features.

    2. B

      The number of iterations.

    3. C

      The number of data points.

    4. D

      The number of clusters.

    Correct answer
    D

    The number of clusters.

    Explanation

    In k-means, k stands for the number of clusters the algorithm should identify.

  20. 20

    What does intra-cluster similarity and inter-cluster similarity mean in clustering?

    1. A

      Data points within a cluster should be as different as possible; data points between clusters should be as similar as possible.

    2. B

      Clusters must be spherical in shape.

    3. C

      All clusters must have the same number of data points.

    4. D

      Data points within a cluster should be as similar as possible; data points between different clusters should be as different as possible.

    Correct answer
    D

    Data points within a cluster should be as similar as possible; data points between different clusters should be as different as possible.

    Explanation

    High intra-cluster similarity and low inter-cluster similarity ensure meaningful groupings.

  21. 21

    In reinforcement learning, what is the term for the entity that performs actions in an environment?

    1. A

      State.

    2. B

      Policy.

    3. C

      Agent.

    4. D

      Reward.

    Correct answer
    C

    Agent.

    Explanation

    The agent is the entity that interacts with the environment by performing actions.

  22. 22

    In reinforcement learning, what is given to the agent when it performs a correct action?

    1. A

      A new state.

    2. B

      A penalty.

    3. C

      A label.

    4. D

      A reward.

    Correct answer
    D

    A reward.

    Explanation

    The agent receives a reward for correct actions, reinforcing that behavior.

  23. 23

    Which scenario is used as an example of reinforcement learning?

    1. A

      Classifying emails as spam or not spam.

    2. B

      Grouping fish and birds into separate clusters.

    3. C

      Training a dog to give a handshake by giving a biscuit as reward.

    4. D

      Predicting the price of an apple based on its features.

    Correct answer
    C

    Training a dog to give a handshake by giving a biscuit as reward.

    Explanation

    The session uses the example of a dog learning to give a handshake to receive a biscuit as a reward, illustrating reinforcement learning.

  24. 24

    Which dataset was used in the logistic regression demo for heart disease prediction?

    1. A

      Titanic dataset.

    2. B

      Iris dataset.

    3. C

      MNIST dataset.

    4. D

      Framingham dataset.

    Correct answer
    D

    Framingham dataset.

    Explanation

    The demo used the Framingham dataset from Massachusetts to predict 10-year risk of coronary heart disease.

  25. 25

    In the logistic regression demo, what was the approximate model accuracy?

    1. A

      95%.

    2. B

      75%.

    3. C

      88.14%.

    4. D

      50%.

    Correct answer
    C

    88.14%.

    Explanation

    The model achieved an accuracy of about 88.14% as shown in the demo.

  26. 26

    What method was used in the k-means demo to determine the optimal number of clusters?

    1. A

      Gap statistic.

    2. B

      Principal component analysis.

    3. C

      Silhouette analysis.

    4. D

      Elbow method (WCSS).

    Correct answer
    D

    Elbow method (WCSS).

    Explanation

    The demo used the elbow method based on within-cluster sum of squares (WCSS) to find the optimal k.

  27. 27

    In the k-means demo, what Python library function was used to generate sample data?

    1. A

      fetch_california_housing

    2. B

      make_blobs

    3. C

      make_classification

    4. D

      load_iris

    Correct answer
    B

    make_blobs

    Explanation

    The demo used make_blobs from sklearn to generate 300 samples with 4 clusters.

  28. 28

    In the logistic regression demo, what was the dependent variable?

    1. A

      Age of the patient.

    2. B

      10-year CHD (coronary heart disease) risk.

    3. C

      Sex of the patient.

    4. D

      Blood pressure level.

    Correct answer
    B

    10-year CHD (coronary heart disease) risk.

    Explanation

    The dependent variable was the 10-year risk of CHD, with values indicating whether the patient developed heart disease.

  29. 29

    In the logistic regression demo, what percentage of data had missing values that were dropped?

    1. A

      50%.

    2. B

      12%.

    3. C

      5%.

    4. D

      25%.

    Correct answer
    B

    12%.

    Explanation

    The demo stated that about 12% of the data had missing values, which were removed as they would not significantly affect the analysis.

Question 1 of 29
Question 1 of 29

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent