4. Future Prediction

If Ad Spend = ,
Then Revenue = 0.00

🧠 How the Machine Learns (The Concepts)

1. The Hypothesis

This is the model's guess. We assume the relationship between Input (X) and Output (Y) is a straight line.

y = mx + b

• m (Slope): The Weight. How much Y changes for every 1 unit of X.
• b (Bias): The Intercept. Where the line starts if X is 0.

2. The Cost Function (Loss)

How does the AI know if the line is wrong? It measures the distance between the line and the dots.

Error = Average(Difference²)

If the error is high, the model is bad. The AI's only goal is to make this number Zero.

3. Gradient Descent

This is how the AI "learns." Imagine being on a mountain (High Error) blindfolded, trying to walk down to the valley (Low Error).

The math calculates the steepness (Gradient) at your feet to figure out which direction is "Down."

4. Learning Rate

When walking down that mountain, how big are your steps?

New_Weight = Old_Weight - (Step_Size * Gradient)

• Too Big: You jump over the valley (Overshoot).
• Too Small: You take forever to get there.