AI Linear Regression Model
Have you remembered the formula "y = ax + b"? This is called Linear Regression Model.
Definition
Linear regression is a way to find a rule that helps us predict something based on another thing. It draws a straight line to show how one thing changes when another thing changes.
The linear regression model to predict earnings based on hours worked is: Earnings=10×(Hours Worked). Since 10 is the wage per hour.
Simple AI Example
You want to predict the price of a house based on its size (square footage). Here’s how the linear regression model would work:
The price of house = a*Square_Feet + b.
Let's say from the data, we can see that for every additional 100 square feet, the price increases by $50,000. So the slope (a) is $50 per square foot.
The y-intercept (b), which represents the base price of a house with no square footage, is $100,000.
The model: y=50x+100,000
This means: If the house is 500 sq. ft., the price is 50×500+100,000=150,000.
- Linear regression is a great model when the relationship between input and output is simple and linear, with minimal noise or outliers.
- It’s useful for predictive analysis, provides interpretable results, and is computationally efficient.
- However, it’s limited in handling non-linear relationships, complex interactions, and large amounts of noise or outliers.
- In more complex scenarios, other models like decision trees, support vector machines, or neural networks may be more suitable.