Discover why logistic regression is the best machine learning algorithm for modeling the relationship between study hours and passing an exam. Ace your IBM Artificial Intelligence Fundamentals certification with expert insights.
Table of Contents
Question
You want to know how many hours to study to pass an exam. The “hours of studying” data forms a sigmoid function, or an S-shaped curve, between “fail” and “pass”.
Which learning algorithm could you use?
A. Decision tree
B. Stochastic learning
C. Unsupervised learning
D. Logistic regression
Answer
D. Logistic regression
Explanation
Logistic regression is the algorithm you could use to solve problems like this when the data relationship forms an S-curve, called a sigmoid function, and has a limited outcome, such as “fail” and “pass”.
Logistic regression is the most appropriate machine learning algorithm to use when you want to predict a binary outcome (like pass/fail) based on input data that has a sigmoidal relationship with the output.
A sigmoid function, also known as an S-shaped curve, is characterized by a slow change in the output value at the extreme ends of the input range, but a rapid change in the middle of the input range. This is exactly the type of relationship described between study hours and exam outcome – a student is very likely to fail with few study hours, very likely to pass with many study hours, and there is a critical intermediate range of study hours where the probability of passing increases rapidly.
Logistic regression is designed to model this kind of S-shaped relationship. It transforms the input using the logistic function to generate a probability between 0 and 1 of the binary outcome. The model can then be trained to optimize the decision boundary – the point on the curve where the probability switches from fail to pass.
The other algorithms listed are not ideal for this task:
- Decision trees are better suited for problems with many input features that interact in complex, nonlinear ways. They are not ideal for modeling a simple sigmoidal relationship.
- Stochastic learning refers to optimization algorithms that introduce randomness, not a specific model. These could potentially be used to train a logistic regression model but do not constitute a type of model themselves.
- Unsupervised learning algorithms like clustering try to find hidden structure in unlabeled data. They are not applicable for making predictions based on labeled training examples.
In summary, logistic regression is the best choice for predicting a binary outcome from input data that has a sigmoidal relationship with the output probability. It is commonly used for problems like exam result prediction and is a fundamental algorithm to master for the IBM AI Fundamentals certification.
IBM Artificial Intelligence Fundamentals certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the Artificial Intelligence Fundamentals graded quizzes and final assessments, earn IBM Artificial Intelligence Fundamentals digital credential and badge.