*Univariate* Regression Model: a regression model that **only has one input** variable.
**Parameters**: parameters of a model is the variable you can adjust during training in order to improve your model. Also known as *coefficients* or *weights*.
### Definition
Formally function $f$ is the defined and for linear regression and we try to find the vector $w$:
$ f_{\vec{w}, b} (\vec{x}) = \vec{w} \cdot \vec{x} + b $
which can be written as:
$ = w_1x_1 + w_2x_2 + w_3x_3+ \cdots + w_nx_n + b$
#### Polynomial Regression
Sometimes by transforming a feature, combining more features intuitively, we can make new features that are more relatable. Also, we can make them in polynomial form based on the curve we want to make. e.g.
$ f_{{w}, b} (\vec{x}) = w_1x^2 + w_2x + b $
### Cost Function
**Squared Error** cost function:
$
J(w,b) = \frac{1}{2m}\sum_{i=1}^{m}(\hat{y}^{(i)} - y^{(i)})^2
$
$m$: number training example
$w, b$: parameters
---
![[Pasted image 20250317153933.png]]If we visualize the cost function itself by the input variables, it is a **continuous** function. This helps to find its **minimum**.