预测分析代写 Predictive Analytics代写 Homework代写
506ISE 529 Predictive Analytics Homework 预测分析代写 1.Use the Boston dataset from datasets to fit the following models to predict the price of houses in the Boston area. Read boston.dat...
View detailsSearch the whole station
预测分析课业代写 Submit a report on a pdf with white background. 1.Use the Boston dataset from sklearn.datasets to fit the following models to predict the price of
Submit a report on a pdf with white background.
Use the Boston dataset from sklearn.datasets to fit the following models to predict the price of houses in the Boston area. Read boston.data into a DataFrame using
X = pd.DataFrame(boston.data,columns = boston.feature_names).
Before modeling let us rename some features. Rename features RM and CHAS with
X.rename(columns = {’RM’:’MR’,’CHAS’:’HAS’},inplace=True). Then use X.columns.str[:1]
to rename all 13 columns by their first letter. Whenever needed (use random_state = 0 and default test, train sizes). Use sklearn to fit all models.
Use MinMaxScaler() to scale all features in (0, 1). Split the data into train and test set .
Fit a linear regression model. Report test R2 , test MSPE.
Use poly = PolynomialFeatures() to add 93 features in a new array X3.
• Use poly.get_feature_names(X.columns) to review the names of the old and new columns.
• Convert array X3 to a DataFrame using
X3 = pd.DataFrame(X3,columns=poly.get_feature_names(X.columns))
We will call X3 the extended Boston dataset.
• Use MinMaxScaler() to scale all 104 features in (0, 1), call it X4.
• Split X4 into train and test set. Use these sets for all of the following parts in this homework.
Fit a linear regression model. Report test R2 , test MSPE.
Use Ridge(alpha = 0.1,normalize = True).fit(X_train,y_train) to fit a RR model.
Notice that we are normalzing the already scaled data in X4. Report test R2 , test MSPE.
Search for the best alpha value then fit the RR model again. Report test R2 , test MSPE.
Fit a Random Forest model on 500 trees with max_features = 10, max_depth = 6, random_state=0. Report test R2 , test MSPE.
Find most important features in the extended Boston dataset identified by the RF. Report the top seven. What original features are most important?
Use GridSearchCV to find best values for max_features, max_depth. Fit the RF with these values and report test R2 , test MSPE.
更多代写:CS曼彻斯特网课代上 gre网考代考 英国伦理学代考 article美国高中作业代写 论文商科网课作业 report英文代写
合作平台:essay代写 论文代写 写手招聘 英国留学生代写
ISE 529 Predictive Analytics Homework 预测分析代写 1.Use the Boston dataset from datasets to fit the following models to predict the price of houses in the Boston area. Read boston.dat...
View detailsAlgorithm in Action CSCI-570 Homework 4 算法作业代写 1 Compute Max-Flow And Min-Cut 2 Escape From the Building In this problem, we need to decide whether there is a feasible plan for all th...
View detailsUnit 3 Marketing 营销课业代写 Unit 3 - Introduction to marketing Situation: You work in the marketing department of Cadbury as a trainee. As part of your training, you have been Checklis...
View detailshomework代写公司可以提供什么服务?有免费修改次数吗? homework代写 现在很多家庭的孩子都有了去国外留学的机会,因为现在国外留学的条件逐渐放宽,很多都是可以直接保送过去。而留学有一个难题就是毕...
View details