root mean squared error and prediction the root mean squared error corresponds approximately to an estimate of the standard deviation since most of the data is at the most two standard deviations from the meanwe can double our rmse to obtain rough confident interval this is only completely valid if the errors are normally distributedbut it is roughly correct even if they are not multidimensional regression so farwe have only used single variable for predictionthe number of rooms per dwelling we will now use all the data we have to fit model using multidimensional regression we now try to predict single output (the average house pricebased on multiple inputs the code looks very much like beforex boston data we still add bias termbut now we must use np concatenatewhich concatenates two arrays/lists because we have several input variables in np array([np concatenate( ,[ ]for in boston data] boston target ,total_error, , np linalg lstsq( ,ynowthe root mean squared error is only this is better than what we had beforewhich indicates that the extra variables did help unfortunatelywe can no longer easily display the results as we have -dimensional regression cross-validation for regression if you remember when we first introduced classificationwe stressed the importance of cross-validation for checking the quality of our predictions in regressionthis is not always done in factwe only discussed the training error model earlier this is mistake if you want to confidently infer the generalization ability since ordinary least squares is very simple modelthis is often not very serious mistake (the amount of overfitting is slighthoweverwe should still test this empiricallywhich we will do now using scikit-learn we will also use its linear regression classes as they will be easier to replace for more advanced methods later in the from sklearn linear_model import linearregression