Question

In: Statistics and Probability

Using the boston_housing.xls data do the ff., (you can access it online if you search in...

Using the boston_housing.xls data do the ff., (you can access it online if you search in google: bostonhousing.xl) data can't be uploaded here in chegg

a.) Use the appropriate regression procedure

possible regression procedures: (coefficient of multiple determination criterion/adjusted r-square criterion/Mallow's cp statistic criterion/ prediction sum of squares criterion/ backward elimination procedure/ forward selection procedure/stepwise selection procedure)

b.) obtain a final model

Solutions

Expert Solution

Please run programme in python

import pandas as pd
import numpy as np
import seaborn as sns
from matplotlib import pyplot as plt
%matplotlib inline
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LinearRegression
from sklearn import metrics
from sklearn.metrics import r2_score

from sklearn.datasets import load_boston
boston = load_boston()
boston

print(boston['DESCR'])

boston['target']

x=pd.DataFrame(boston['data'],columns=boston['feature_names'])

y=boston.target

x.isnull().sum()

x_train,x_test,y_train,y_test=train_test_split(x,y,test_size=.25)

x_train.shape

x_test.shape

lr = LinearRegression()

lr.fit(x_train,y_train)

pred=lr.predict(x_test)

print('MAE', metrics.mean_absolute_error(y_test, pred))
print('MSE', metrics.mean_squared_error(y_test, pred))
print('RMSE', np.sqrt(metrics.mean_squared_error(y_test, pred)))
print('R squared error', r2_score(y_test, pred))

conclusion

  hence R Squared value is 0.73589 is slightly near to 1 hence our model fitting is good .
we can further influnce the accuracy of model using various techniqe .


Related Solutions

When using Microsoft Visio or Access, what is the importance of data validation, and how can...
When using Microsoft Visio or Access, what is the importance of data validation, and how can user data entry errors be reduced or eliminated?
There is a difference between Information Management and Data Management. For this week's topic search online...
There is a difference between Information Management and Data Management. For this week's topic search online for "information and data management". Read about the differences between the two. 1) What is the difference between "information management" and "data management"? 2) Pick one of the following to research. What about policies and procedures required in Data Management? What about people, processes, and technology required for Information Management in an enterprise or company? please can I get the links to the article...
Access medline University account. Click on catalog. Using the search box type in the name of...
Access medline University account. Click on catalog. Using the search box type in the name of this module. A. Falls prevention. Tools and strategies _ 20_393882. Create a teaching plan for a patient or coworker,where the learning module you just completed would be appropriate. The teaching plan must include; 1.The importance of the topic being discussed. 2.Risk factors for harm associated with this issue. 3.Strategies to prevent or ensure that appropriate interventions are in place.. Add/Modify the teaching plan to...
Search the Internet for services that provide access to business angels or informal investors. How do...
Search the Internet for services that provide access to business angels or informal investors. How do these sites work? If you were an entrepreneur looking for funding, how much would it cost to use this service? How many business angels are registered on the typical database? How many entrepreneurs are registered on the typical database? How effective do you believe these services are? (Use data where possible to back up your answer.)
a) you can see a program for using bisection search to find the square root of...
a) you can see a program for using bisection search to find the square root of x: x = 25 epsilon = 0.01 low = 0.0 high = max(1.0, x) guess = (low + high) / 2 numberofguesses = 1 while abs(guess ** 2 - x) > epsilon : print('low =', low, 'high = ', high, 'guess = ', guess) if guess** 2 > x : # the guess is too high, so move high down to guess high =...
Middletown Marketing wants to switch to QuickBooks Online and needs 3 people to access the data....
Middletown Marketing wants to switch to QuickBooks Online and needs 3 people to access the data. They would like to set up recurring billing for their retainer based clients. Based on this information, which QuickBooks Online product would be the best fit? A. QuickBooks Online Plus B. QuickBooks Self-Employed C. QuickBooks Online Essentials D. QuickBooks Online Simple Start E. None - QuickBooks Online does not support these features
in ACL (access control List) : 1.How do you determine who can access object x? 2....
in ACL (access control List) : 1.How do you determine who can access object x? 2. How do you determine which objects user y can access? 3. What happens if a file is deleted?
Create a 2-bit Gray Code Counter using: a)FF Type-D b)FF Type-T c)FF JK-MS.
Create a 2-bit Gray Code Counter using: a)FF Type-D b)FF Type-T c)FF JK-MS.
Using the data from boston_housing.xls (accessible online) a.) do the appropriate multiple linear regression model procedures...
Using the data from boston_housing.xls (accessible online) a.) do the appropriate multiple linear regression model procedures to obtain a final model
what ethical concerns do you have about the sharing of health data online
what ethical concerns do you have about the sharing of health data online
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT