Question: a) Construct a DataFrame from a file read of the data set. b) Use vector assembler ( or manually) to transform the X1, X2 into

a) Construct a DataFrame from a file read of the data set.

b) Use vector assembler ( or manually) to transform the X1, X2 into Spark vectors

c) Prepare your DataFrame for a Spark regression algorithm

c) Run the Spark Linear regression algorithm

d) Compare with the Scala code == are they the same??

e) SSE=?

f) SST =

g)SSR =

h) r =

I) r2 =

g) RMSE =

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!