Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

D O, N O T TkeDeep Learning by proximity of networking and advanced programming Criteria Points AVOI Part 1 - Question 1 Normalize the train

D O, N O T TkeDeep Learning by proximity of networking and advanced programming Criteria Points AVOI Part 1 - Question 1 Normalize the train and test data 2 Part 1 - Question 2 Build and train a ANN model as per the above mentioned architecture 10 Part 1 - Question 3 observations on the below plot 2 Part 1 - Question 4 Build and train the new ANN model as per the above mentioned architecture 10 Part 1 - Question 5 observations on the below plot 2 Part 1 - Question 6 Print the classification report and the confusion matrix for the test predictions. observations on the final results # Import libraries for data manipulation import pandas as pd import numpy as np # Import libraries for data visualization import matplotlib.pyplot as plt import seaborn as sns from statsmodels.graphics.gofplots import ProbPlot # Import libraries for building linear regression model from statsmodels.formula.api import ols import statsmodels.api as sm from sklearn.linear_model import LinearRegression # Import library for preparing data from sklearn.model_selection import train_test_split # Import library for data preprocessing from sklearn.preprocessing import MinMaxScaler import warnings warnings.filterwarnings("ignore")

Loading the data

In[105]:

df = pd.read_csv("Boston.csv") df.head()

Out[105]:

CRIM ZN INDUS CHAS NOX RM AGE DIS RAD TAX PTRATIO LSTAT MEDV
0 0.00632 18.0 2.31 0 0.538 6.575 65.2 4.0900 1 296 15.3 4.98 24.0
1 0.02731 0.0 7.07 0 0.469 6.421 78.9 4.9671 2 242 17.8 9.14 21.6
2 0.02729 0.0 7.07 0 0.469 7.185 61.1 4.9671 2 242 17.8 4.03 34.7
3 0.03237 0.0 2.18 0 0.458 6.998 45.8 6.0622 3 222 18.7 2.94 33.4
4 0.06905 0.0 2.18 0 0.458 7.147 54.2 6.0622 3 222 18.7 5.33 36.2

Observation:

  • The price of the house indicated by the variable MEDV is the target variable and the rest of the variables are independent variables based on which we will predict the house price (MEDV).

Checking the info of the data

In[106]:

df.info()

RangeIndex: 506 entries, 0 to 505 Data columns (total 13 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 CRIM 506 non-null float64 1 ZN 506 non-null float64 2 INDUS 506 non-null float64 3 CHAS 506 non-null int64 4 NOX 506 non-null float64 5 RM 506 non-null float64 6 AGE 506 non-null float64 7 DIS 506 non-null float64 8 RAD 506 non-null int64 9 TAX 506 non-null int64 10 PTRATIO 506 non-null float64 11 LSTAT 506 non-null float64 12 MEDV 506 non-null float64 dtypes: float64(10), int64(3) memory usage: 51.5 KB

Observations:

  • There are a total of 506 non-null observations in each of the columns. This indicates that there are no missing values in the data.
  • There are 13 columns in the dataset and every column is of numeric data type.

Exploratory Data Analysis and Data Preprocessing Part 2 - Question 1 Complete the below code to visualize the first 10 images from the training data 1 Part 2 - Question 2 One-hot encode the labels in the target variable y_train and y_test 2 Part 2 - Question 3 Build and train a CNN model as per the above mentioned architecture 10 Part 2 - Question 4 observations on the below plot 2 Part 2 - Question 5 Build and train the second CNN model as per the above mentioned architecture 10 Part 2 - Question 6 observations on the below plot 2 Part 2 - Question 7 Make predictions on the test data using the second model 1 Part 2 - Question 8 ur final observations on the performance of the model on the test dataDeep Learning Criteria Points Part 1 - Question 1 Normalize the train and test data 2 Part 1 - Question 2 Build and train a ANN model as per the above mentioned architecture 10 Part 1 - Question 3 your observations on the below plot 2 Part 1 - Question 4 Build and train the new ANN model as per the above mentioned architecture 10 Part 1 - Question 5 observations on the below plot 2 Part 1 - Question 6 Print the classification report and the confusion matrix for the test predictions. observations on the final results 4 Part 2 - Question 1 Complete the below code to visualize the first 10 images from the training data 1 Part 2 - Question 2 One-hot encode the labels in the target variable y_train and y_test 2 Part 2 - Question 3 Build and train a CNN model as per the above mentioned architecture 10 Part 2 - Question 4 observations on the below plot 2 Part 2 - Question 5 Build and train the second CNN model as per the above mentioned architecture 10 Part 2 - Question 6 observations on the below plot 2 Part 2 - Question 7 Make predictions on the test data using the second model 1 Part 2 - Question 8 final observations on the performance of the model on the test dataDeep Learning Criteria Points Part 1 - Question 1 Normalize the train and test data 2 Part 1 - Question 2 Build and train a ANN model as per the above mentioned architecture 10 Part 1 - Question 3 bservations on the below plot 2 Part 1 - Question 4 Build and train the new ANN model as per the above mentioned architecture 10 Part 1 - Question 5 servations on the below plot 2 Part 1 - Question 6 Print the classification report and the confusion matrix for the test predictions. observations on the final results 4 Part 2 - Question 1 Complete the below code to visualize the first 10 images from the training data 1 Part 2 - Question 2 One-hot encode the labels in the target variable y_train and y_test 2 Part 2 - Question 3 Build and train a CNN model as per the above mentioned architecture 10 Part 2 - Question 4 observations on the below plot 2 Part 2 - Question 5 Build and train the second CNN model as per the above mentioned architecture 10 Part 2 - Question 6 vations on the below plot 2 Part 2 - Question 7 Make predictions on the test data using the second model 1 Part 2 - Question 8 observations on the performance of the model on the test dataDeep Learning Criteria Points Part 1 - Question 1 Normalize the train and test data 2 Part 1 - Question 2 Build and train a ANN model as per the above mentioned architecture 10 Part 1 - Question 3 r observations on the below plot 2 Part 1 - Question 4 Build and train the new ANN model as per the above mentioned architecture 10 Part 1 - Question 5 rvations on the below plot 2 Part 1 - Question 6 Print the classification report and the confusion matrix for the test predictions. observations on the final results 4 Part 2 - Question 1 Complete the below code to visualize the first 10 images from the training data 1 Part 2 - Question 2 One-hot encode the labels in the target variable y_train and y_test 2 Part 2 - Question 3 Build and train a CNN model as per the above mentioned architecture 10 Part 2 - Question 4 r observations on the below plot 2 Part 2 - Question 5 Build and train the second CNN model as per the above mentioned architecture 10 Part 2 - Question 6 r observations on the below plot 2 Part 2 - Question 7 Make predictions on the test data using the second model 1 Part 2 - Question 8 final observations on the performance of the model on the test dataD O, N O T TkeDeep Learning by proximity of networking and advanced programming Criteria Points AVOI Part 1 - Question 1 Normalize the train and test data 2 Part 1 - Question 2 Build and train a ANN model as per the above mentioned architecture 10 Part 1 - Question 3 observations on the below plot 2 Part 1 - Question 4 Build and train the new ANN model as per the above mentioned architecture 10 Part 1 - Question 5 observations on the below plot 2 Part 1 - Question 6 Print the classification report and the confusion matrix for the test predictions. observations on the final results # Import libraries for data manipulation import pandas as pd import numpy as np # Import libraries for data visualization import matplotlib.pyplot as plt import seaborn as sns from statsmodels.graphics.gofplots import ProbPlot # Import libraries for building linear regression model from statsmodels.formula.api import ols import statsmodels.api as sm from sklearn.linear_model import LinearRegression # Import library for preparing data from sklearn.model_selection import train_test_split # Import library for data preprocessing from sklearn.preprocessing import MinMaxScaler import warnings warnings.filterwarnings("ignore")

Loading the data

In[105]:

df = pd.read_csv("Boston.csv") df.head()

Out[105]:

CRIM ZN INDUS CHAS NOX RM AGE DIS RAD TAX PTRATIO LSTAT MEDV
0 0.00632 18.0 2.31 0 0.538 6.575 65.2 4.0900 1 296 15.3 4.98 24.0
1 0.02731 0.0 7.07 0 0.469 6.421 78.9 4.9671 2 242 17.8 9.14 21.6
2 0.02729 0.0 7.07 0 0.469 7.185 61.1 4.9671 2 242 17.8 4.03 34.7
3 0.03237 0.0 2.18 0 0.458 6.998 45.8 6.0622 3 222 18.7 2.94 33.4
4 0.06905 0.0 2.18 0 0.458 7.147 54.2 6.0622 3 222 18.7 5.33 36.2

Observation:

  • The price of the house indicated by the variable MEDV is the target variable and the rest of the variables are independent variables based on which we will predict the house price (MEDV).

Checking the info of the data

In[106]:

df.info()

RangeIndex: 506 entries, 0 to 505 Data columns (total 13 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 CRIM 506 non-null float64 1 ZN 506 non-null float64 2 INDUS 506 non-null float64 3 CHAS 506 non-null int64 4 NOX 506 non-null float64 5 RM 506 non-null float64 6 AGE 506 non-null float64 7 DIS 506 non-null float64 8 RAD 506 non-null int64 9 TAX 506 non-null int64 10 PTRATIO 506 non-null float64 11 LSTAT 506 non-null float64 12 MEDV 506 non-null float64 dtypes: float64(10), int64(3) memory usage: 51.5 KB

Observations:

  • There are a total of 506 non-null observations in each of the columns. This indicates that there are no missing values in the data.
  • There are 13 columns in the dataset and every column is of numeric data type.

Exploratory Data Analysis and Data Preprocessing Part 2 - Question 1 Complete the below code to visualize the first 10 images from the training data 1 Part 2 - Question 2 One-hot encode the labels in the target variable y_train and y_test 2 Part 2 - Question 3 Build and train a CNN model as per the above mentioned architecture 10 Part 2 - Question 4 observations on the below plot 2 Part 2 - Question 5 Build and train the second CNN model as per the above mentioned architecture 10 Part 2 - Question 6 observations on the below plot 2 Part 2 - Question 7 Make predictions on the test data using the second model 1 Part 2 - Question 8 ur final observations on the performance of the model on the test dataDeep Learning Criteria Points Part 1 - Question 1 Normalize the train and test data 2 Part 1 - Question 2 Build and train a ANN model as per the above mentioned architecture 10 Part 1 - Question 3 your observations on the below plot 2 Part 1 - Question 4 Build and train the new ANN model as per the above mentioned architecture 10 Part 1 - Question 5 observations on the below plot 2 Part 1 - Question 6 Print the classification report and the confusion matrix for the test predictions. observations on the final results 4 Part 2 - Question 1 Complete the below code to visualize the first 10 images from the training data 1 Part 2 - Question 2 One-hot encode the labels in the target variable y_train and y_test 2 Part 2 - Question 3 Build and train a CNN model as per the above mentioned architecture 10 Part 2 - Question 4 observations on the below plot 2 Part 2 - Question 5 Build and train the second CNN model as per the above mentioned architecture 10 Part 2 - Question 6 observations on the below plot 2 Part 2 - Question 7 Make predictions on the test data using the second model 1 Part 2 - Question 8 final observations on the performance of the model on the test dataDeep Learning Criteria Points Part 1 - Question 1 Normalize the train and test data 2 Part 1 - Question 2 Build and train a ANN model as per the above mentioned architecture 10 Part 1 - Question 3 bservations on the below plot 2 Part 1 - Question 4 Build and train the new ANN model as per the above mentioned architecture 10 Part 1 - Question 5 servations on the below plot 2 Part 1 - Question 6 Print the classification report and the confusion matrix for the test predictions. observations on the final results 4 Part 2 - Question 1 Complete the below code to visualize the first 10 images from the training data 1 Part 2 - Question 2 One-hot encode the labels in the target variable y_train and y_test 2 Part 2 - Question 3 Build and train a CNN model as per the above mentioned architecture 10 Part 2 - Question 4 observations on the below plot 2 Part 2 - Question 5 Build and train the second CNN model as per the above mentioned architecture 10 Part 2 - Question 6 vations on the below plot 2 Part 2 - Question 7 Make predictions on the test data using the second model 1 Part 2 - Question 8 observations on the performance of the model on the test dataDeep Learning Criteria Points Part 1 - Question 1 Normalize the train and test data 2 Part 1 - Question 2 Build and train a ANN model as per the above mentioned architecture 10 Part 1 - Question 3 r observations on the below plot 2 Part 1 - Question 4 Build and train the new ANN model as per the above mentioned architecture 10 Part 1 - Question 5 rvations on the below plot 2 Part 1 - Question 6 Print the classification report and the confusion matrix for the test predictions. observations on the final results 4 Part 2 - Question 1 Complete the below code to visualize the first 10 images from the training data 1 Part 2 - Question 2 One-hot encode the labels in the target variable y_train and y_test 2 Part 2 - Question 3 Build and train a CNN model as per the above mentioned architecture 10 Part 2 - Question 4 r observations on the below plot 2 Part 2 - Question 5 Build and train the second CNN model as per the above mentioned architecture 10 Part 2 - Question 6 r observations on the below plot 2 Part 2 - Question 7 Make predictions on the test data using the second model 1 Part 2 - Question 8 final observations on the performance of the model on the test data

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Computer Networking A Top-Down Approach

Authors: James Kurose, Keith Ross

7th edition

978-0133594140

More Books

Students also viewed these Computer Network questions

Question

1. Let a, b R, a Answered: 1 week ago

Answered: 1 week ago