Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Perform a Scala analysis on this regression question using Scala code and the geometric approach. This was described in class and in accompanying docs sent

Perform a Scala analysis on this regression question using Scala code and the geometric approach. This was described in class and in accompanying docs sent around

a) Write the variance of x1, x2, y in terms of the dot product. What is the variance in terms of a centered vectors length? ( ignoring the scaling constant N-1)! So, what is all the fuss about accounting for total variance SST = dot(y,y)?

b) Write the correlation between x1 and x2 ( if they were co-linear, or say, separated by say, < 10 degrees) what kind of prediction could they make?

c) Write the two geometric regression equations ( aka normal equations), not the calculus derived equations. I.e perpendicularity governs these equations., i.e. x1 & s2 are perpendicular to the error vector: y- (?x1 + ?x2)

d) Solve for the regression coefficients (please use b1 and b2 for the two regression coefficients) This is a 2x2 system of equations and I ask you to solve this in Scala.

(Remember the simple rule for a 2 x 2 inverse). Interchange the diagonals, minus the diagonal elements, and divide by the determinant).

e) What is y = b1 x1 + b2 x2, with known b1 & b2

f) Draw the statistical triangle( this is still only 2-dimensional, label the legs of the triangle plus the correlation coefficient)

g)Calculate:

SSE

MSE

RMSE

SSR

SST

r,

r^2

h) for the final regression equation, you need the intercept.

(See the geometric regression paper for this calculation)

Final regression equation =

The first column of the below training data set, is an identifier and is not necessary in this analysis

Columns 2 & 3 are the predictor and column 4 is the label

I would label these raw predictor values X1, X2, and Y

Data Set

d1,2,3,15

d2,2,5,16

d3,4,4,15

d4,4,7,10

d5,5,5,13

d6,5,8,9

d7,5,9,8

d8,6,8,7

d9,7,7,8

d10,7,10,5

d11,8,11,4

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database 19c DBA By Examples Installation And Administration

Authors: Ravinder Gupta

1st Edition

B09FC7TQJ6, 979-8469226970

More Books

Students also viewed these Databases questions