Module Question 4
- Explain the goal of linear regression using the equation $y = mx + b$. What do $m$ and $b$ represent?
- What is the primary difference in the output of a regression model versus a classification model?
- How does a decision tree make a prediction?
- Give an example of a business problem that could be solved with classification (e.g., spam detection)
Status: 100% tercapai
Keterangan: saya sudah mengerjakan essay ini dengan baik dan benar
Bukti:
Answers:
1.linear regression tries to find the best-fitting straight line that describes the relationship between an input variable x and output variable y.
The equation is:
y= mx+b
-m= slope: tells us how much y changes when x increases by 1.
-B=intercept: the predicted value of y when x= 0.
For example, if y =2x + 10, then m= 2 means y increases by 2for every 1-unit increase in x, while b=10 means the line crosses the y-axis at 10.
2.The primary difference is the type of output:
-Regression: produces a continuous numerical value, such as predicting a house price of $350,000.
-Classification: produces a category or class, such as predicting whether an email is spam or not spam.
3.A decision tree makes predictions by asking a series of if/then questions about the input data.
For example, to predict whether a customer will buy a product:
1.Is the customer’s age greater than 30?
2.If yes, has the customer purchased before?
3.Follow the appropriate branch based on each answer.
4.Eventually reach a leaf, which contains the prediction.
So, a decision tree works by splitting data into smaller groups based on features until it reaches a final prediction.
4.Customer churn prediction: A company could use classification to predict whether a customer is likely to cancel their subscription.
The model might use information such as:
-Number of months as a customer
-Number of support requests
-Monthly spending
-Recent activity
The output could be:
“Likely to churn” or “Likely to stay.”
