Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The first column of the below training data set, is an identifier and is not necessary in this analysis Columns 2 & 3 are the

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 . I use lower case letters for the centered vector variables; x1,x2, y

Q1 ( Scala Geometric Regression @ 100 pts)

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 =

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

Database Design And Implementation

Authors: Edward Sciore

2nd Edition

3030338355, 978-3030338350

More Books

Students also viewed these Databases questions