{% extends "layout.html" %} {% block content %}
Polynomial Regression is a type of regression analysis that models the relationship between the independent variable x and the dependent variable y as an n-th degree polynomial. It extends simple linear regression by considering higher-degree terms.
y = θ0 + θ1x + θ2x2 + θ3x3 + ... + θnxn
Here, theta_0, theta_1, ..., theta_n are the coefficients learned by the model.
To illustrate how the equation y = x^2 + 2x creates a curve, let's substitute a few values for x:
An input of 0 results in an output of 0.
An input of 1 yields an output of 3.
With an input of 3, the output becomes 15.
For an input of 5, the predicted output is 35.
These examples show how the relationship between x and y is curved, not linear.
PolynomialFeatures from sklearn.preprocessing.Equation: y = x^2 + 2x
Our model learned coefficients for:
(These coefficients correspond to the formula y = θ₀ + θ₁x + θ₂x²)
{{ prediction }}