Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Q . 1 . Consider the following streaming version of linear regression algorithm. Algorithm StreamingSimpleLinearRegresssionModel Double sumX = 0 . 0 , sumY = 0
Q Consider the following streaming version of linear regression algorithm.
Algorithm StreamingSimpleLinearRegresssionModel
Double sumX sumY sumXY sumX a b
Double n
Boolean dirty true
Update
If dirty then return
b sumXY sumX sumY n sumXsumX sumX n
a sumY nb sumX n
dirty false
observe double y double x
sumX x
sumY y
sumXY x y
sumX x x
n
dirty true
double getB
update
return b
double getA
update
return a
Following pairs of stream data values are passed through the above model.
X
Y
AWhat will be the coefficients a and b after model has processed second tuple?
BWhat will be the model expression when the model has processed first four tuples?
CAfter processing all the five tuples, what will be the prediction done by model for x
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started