Question: a. Using the code below, load Boston Housing data and pre-process the training and test data set and pre-process them. Identify the objects that contain

a. Using the code below, load Boston Housing data and pre-process the training and test data set and pre-process them. Identify the objects that contain X and Y variables for training and test data. Explain how the test data are normalized in the last few lines. \begin{tabular}{|l|} \hline from keras.datasets import boston_housing \\ (train_data, train_targets), (test_data, test_targets) = boston_housing.load_data() \\ mean = train_data.mean(axis=0) \\ train_data -= mean \\ std = train_data.std(axis=0) \\ train_data /= std \end{tabular} b. Create a deep neural network model with 3 fully connected layers with the following widths for each layer: 256,128,64. Please make sure that a drop rate of 20% and the ReLU activation function are used for each layer. c. Using summary() method, inspect the model object created in part b. What is the number of parameters for the second dense layer? Based on the number of nodes (or units) in the current and previous layers, explain how the number of parameters is determined for the second dense layer. d. Compile the model using compile() method. Explain the reason for your choice of loss and metric. e. Fit the compiled model to the training data using fit() method. Note that you have to set up a proper early stopping rule to prevent overfitting. f. Evaluate the prediction performance of the fitted model using the test dataset, through a scatter plot for the original response values (on x-axis) and the predicted values (on y axis). Is there any notable patterns or outliers
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
