Artificial Intelligence (BD107) – Assignment Week 4 – Syafira Aulia

Artificial Intelligence 26/27 – BD107

Module Question 4

 

  1. Explain the goal of linear regression using the equation $y = mx + b$. What do $m$ and $b$ represent?
  2. What is the primary difference in the output of a regression model versus a classification model?
  3. How does a decision tree make a prediction?
  4. Give an example of a business problem that could be solved with classification (e.g., spam detection)

Answer:

  1. Linear regression is a supervised learning method used to predict continuous numerical values by finding the best-fitting straight line through data points. Its goal is to understand the relationship between an input variable and an output variable, so the model can make predictions based on that relationship.

The equation is ŷ = mx + b, where:

    • ŷ (y-hat) represents the predicted value.
    • x represents the input or independent variable.
    • m represents the slope of the line, which shows how much the predicted value changes when x increases by one unit.
    • b represents the y-intercept, which is the predicted value of y when x equals zero.

For example, a business can use linear regression to predict sales based on advertising expenses. By analysing past data, the model can estimate how sales may change as advertising expenses increase.

2. The primary difference between a regression model and a classification model is the type of output they produce. A regression model predicts a continuous numerical value, while a classification model predicts a category or class.

For example, a regression model can predict the price of a house based on its size and location, producing an estimated price such as Rp500 million. In contrast, a classification model can predict whether an email is spam or not spam, placing it into one of two categories.

In conclusion, regression is used to predict numerical values, while classification is used to assign data to specific categories.

3. A decision tree makes a prediction by following a series of questions or conditions based on the input data. It starts at the root node, where the first condition is checked, and then follows a branch depending on the result. This process continues through other conditions until the model reaches a leaf node, which provides the final prediction.

For example, a business can use a decision tree to predict whether a customer will purchase a product. The model might consider factors such as the customer’s age, shopping history, and budget. Based on the answers to these conditions, the decision tree predicts whether the customer is likely to buy the product or not.

In conclusion, a decision tree makes predictions by dividing data into smaller groups through a series of conditions until it reaches a final result.

4. One example of a business problem that can be solved using classification is predicting whether a customer will stop using a company’s services. This is known as customer churn prediction.

A company can train a classification model using historical customer data, such as purchase frequency, customer complaints, and subscription activity. Based on these patterns, the model can classify customers into categories such as “likely to leave” or “likely to stay.”

This prediction helps the company identify customers who may stop using its services and take appropriate actions, such as offering discounts or improving customer service, to encourage them to stay.

Therefore, classification can help businesses make better decisions by categorizing customers based on their likelihood of leaving.

 

Status: 100% telah terpenuhi

Keterangan: Modul question dan penjelasan jawabannya sudah tersedia dalam bentuk vidio animasi >> click here

Previous Post Previous Post
Newer Post Newer Post

Leave a comment