10.Introduction to Artificial Intelligence
10.Introduction to Artificial Intelligence
House Price
output variables, the output value is
continuous numbers.
• In Regression the output values are
continuous values within a specified
range.
House Space, Square Feet
Regression
House Price
• The input variables are called
independent variables, also known as
explanatory variables.
• The output variables are called
dependent variables, also known as
response or outcome variables House Space, Square Feet
Regression
Y= dependent variable
the outcomes and the inputs to predict
the values of the results.
• The relationship can be represented by
The straight-line function :
𝒚 = 𝒙𝒘 + 𝒃 w= Slope
• y: It is the dependent variable and is
called the response or outcome variable
• X: It is the independent variable or the
explanatory variable b=Intercept x= independent variable
• b: Is the segment or intersection point
with Y (y-intercept)
• w: is the slope in the straight-line
function.
Linear Regression and Straight-Line Function
Y= dependent variable
• The example in the graph represents
a deterministic relationship that can
be represented by
w= Slope
𝑦 = 0.5𝑥 + 1.
• The deterministic relationship is a
rare but is more common in the fields b=Intercept x= independent variable
of business administration and
sociology.
Example: Assets = Liabilities + Equity
Linear Regression
7 0.96
Linear Regression
∑𝑦 𝑤∑𝑥
𝑏 = 𝑦ത − 𝑤𝑥ҧ = −
𝑛 𝑛
Where 𝑦ത and 𝑥ҧ are the average values of both 𝑦 and 𝑥.
Exercise: Simple Linear Regression
𝑛∑ 𝑥𝑦 − ∑𝑥 ∑𝑦
𝑤=
𝑛∑𝑥2 − ∑𝑥 2
9×31.1−35×7.7 10.4
𝑤= = = 0.03
9×171−(35)2 314
7.7 35
𝑏= − 0.03 × = 0.726
9 9
Measuring Error
𝒙 is explanatory variables.
ෝ is response/ outcome variables.
𝒚
𝒘 is Coefficients or weights of explanatory variables.
Multivariate Linear Regression