nowlike saidwe're going to split our data in half usbjo ftu egsboepn qmju usbjojoh%usbjo ftu uftu%usbjo ftu we're going to do / split between training data and test data this returns back two dataframesone that ' going to use to actually create my modeland one that ' going to use to evaluate my model will next create my actual linear regression model with few standard parameters here that 've set mjs -jofbs fhsfttjpo nby*ufs sfh bsbn fmbtujd/fu bsbn we're going to call mjs -jofbs fhsfttjpoand then will fit that model to the set of data that held aside for trainingthe training data framenpefm mjsgju usbjojoh%that gives me back model that can use to make predictions from let' go ahead and do that gvmm sfejdujpot npefmusbotgpsn uftu%dbdif will call npefmusbotgpsn uftu%and what that' going to do is predict the heights based on the weights in my testing dataset actually have the known labelsthe actualcorrect heightsand this is going to add new column to that dataframe called predictionsthat has the predicted values based on that linear model ' going to cache those resultsand now can just extract them and compare them together solet' pull out the prediction columnjust using tfmfdu like you would in sqland then ' going to actually transform that dataframe and pull out the rdd from itand use that to map it to just plain old rdd full of floating point heights in this caseqsfejdujpot gvmm sfejdujpottfmfdu qsfejdujposeenbq mbnceby these are the predicted heights nextwe're going to get the actual heights from the label columnmbcfmt gvmm sfejdujpottfmfdu mbcfmseenbq mbnceby