6) TCE MOOC-jLinear Regression
6) TCE MOOC-jLinear Regression
y=mx+b
From the given a dataset to find how much a company spends on Radio advertising in each year and its
annual Sales in terms of units sold.
Sales=Weight⋅Radio+Bias
Weight
The coefficient for the Radio independent variable. In machine learning we call
coefficients weights.
Radio
The independent variable. In machine learning we call these variables features.
Bias
The intercept where our line intercepts the y-axis. In machine learning we can
call intercepts bias.
Based on this, we have to find the correct values for Weight and Bias.
Y=mX+c
σ 𝑋−𝑋ത 𝑌−𝑌ത
m = σ(𝑋−𝑋)2
=4/10=0.4
3.6=0.4*3+c
3.6=1.2+c
C=2.4
m=0.4, c=2.4
Y=0.4X+2.4
Lets predict the new Y values for the given X=( 1,2,3,4,5)
Y=0.4*1+2.4=2.8
Y=0.4*2+2.4=3.2
Y=0.4*3+2.4=3.6
Y=0.4*4+2.4=4
Y=0.4*5+2.4=4.4