SlideShare a Scribd company logo
1 of 2
Download to read offline
https://colab.research.google.com/drive/13cof4XUULbUqO0s5h-cd17FskWjpyMkm P1 (40pt):
In the following code example explained in Lecture 5,
https://colab.research.google.com/drive/13cof4XUULbUq00s5h-cd17FskWjpyMkm, make the
following changes to the neural network model sequentially in the example: 1. Change the
number of neurons on the hidden layer to 256 units. (10pt) 2. Use the tanh activation (an
activation that was popular in the early days of neural networks) instead of relu for the hidden
layer. (10pt) 3. Add an additional hidden layer with 256 units and tanh activation function. (10pt)
Retrain the newly defined model and evaluate the trained model on the testing dataset to get the
accuracy. (10pt) P2 (60pt): Write a Python code in Colab using NumPy, Panda, Scikit-Learn and
Keras to complete the following tasks: 1. Import the Auto MPG dataset using pandas.read_csv(),
use the attribute names as explained in the dataset description as the column names, view the
strings '?' as the missing value, and whitespace (i.e., ' Is+ ') as the column delimiter. Print out the
shape and first 5 rows of the DataFrame. (5pt) a. Dataset source file:
http://archive.ics.uci.edu/ml/machine-learning-databases/auto-mpg/auto-mpg.data b. Dataset
description: http://archive.ics.uci.edu/ml/datasets/Auto+MPG [ ] import matplotlib.pyplot as plt
import pandas as pd import tensorflow as tf from tensorflow import keras import numpy as np
np.random. seed (100) tf.random.set_seed (100)[1 put your answer here 2. Delete the "car_name"
column using .drop() and drop the rows containing NULL value using .dropna(). Print out the
shape of the DataFrame. (5pt) & put your answer here 3. For the 'origin' column with categorical
attribute, replace it with the columns with numerical attributes using one-hot encoding. Print out
the shape and first 5 rows of the new DataFrame. (5pt) [ 1 put your answer here 4. Separate the
"mpg" column from other columns and view it as the label vector and others as the feature
matrix. Split the data into a training set (80%) and testing set (20%) using train_test_split and
print out their shapes. Print out the statistics of your training feature matrix using describe 0.(5pt)
[ ] from sklearn.model_selection import train_test_split * put your answer here 5. Normalize the
feature columns in both training and testing datasets so that their means equal to zero and
variances equal to one. Note that the testing set can only be scaled by the mean and standard
deviation values obtained from the training set. Describe the statistics of your normalized feature
matrix of training dataset using describe() in Pandas. (5pt) - Option 1: You can follow the
normalization steps in the code example of "Predicting house prices: a regression example" in
Lecture 6. - Option 2: You can use StandardScaler() in Scikit-Learn as in Homework 2 but you
may need to transform a NumPy array back to Pandas DataFrame using pd.DataFrame( before
calling describe0. [1 put your answer here 6. Build a sequential neural network model in Keras
with two densely connected hidden layers ( 32 neurons and ReLU activation function for each
hidden layer), and an output layer that returns a single, continuous value. Print out the model
summary using .summary0. (10pt) - Hint: You can follow the "Classifying movie reviews"
example in Lecture 6, but need to change input_shape and last layer activation function correctly
in the model definition. [ & put your answer here 7. Define the appropriate loss function,
optimizer, and metrics for this specific problem and compile the NN model. (10pt) [ & put your
answer here 8. Put aside 20% of the normalized training data as the validation dataset by setting
validation_split =0.2 and set verbose =0 to compress the model training status in Keras .fit().
Train the NN model for 100 epochs and batch size of 32 and plot the training and validation loss
progress with respect to the epoch number. (10pt) - Remember to use GPU for training in Colab.
Otherwise, you may find out of memory error or slow execution. - There is no need to do K-fold
cross-validation for this step. [1 put your answer here 9. Use the trained NN model to make
predictions on the normalized testing dataset and observe the prediction error. (5pt)

More Related Content

Similar to httpscolab.research.google.comdrive13cof4XUULbUqO0s5h-cd17FskWj.pdf

Objectives Assignment 09 Applications of Stacks COS.docx
Objectives Assignment 09 Applications of Stacks COS.docxObjectives Assignment 09 Applications of Stacks COS.docx
Objectives Assignment 09 Applications of Stacks COS.docx
dunhamadell
 
SMP4 Thread Scheduler (PART 1)======================INS.docx
SMP4 Thread Scheduler (PART 1)======================INS.docxSMP4 Thread Scheduler (PART 1)======================INS.docx
SMP4 Thread Scheduler (PART 1)======================INS.docx
pbilly1
 
AIML4 CNN lab256 1hr (111-1).pdf
AIML4 CNN lab256 1hr (111-1).pdfAIML4 CNN lab256 1hr (111-1).pdf
AIML4 CNN lab256 1hr (111-1).pdf
ssuserb4d806
 
SMP4 Thread Scheduler (PART 1)======================INSTR.docx
SMP4 Thread Scheduler (PART 1)======================INSTR.docxSMP4 Thread Scheduler (PART 1)======================INSTR.docx
SMP4 Thread Scheduler (PART 1)======================INSTR.docx
pbilly1
 
House Price Estimation as a Function Fitting Problem with using ANN Approach
House Price Estimation as a Function Fitting Problem with using ANN ApproachHouse Price Estimation as a Function Fitting Problem with using ANN Approach
House Price Estimation as a Function Fitting Problem with using ANN Approach
Yusuf Uzun
 

Similar to httpscolab.research.google.comdrive13cof4XUULbUqO0s5h-cd17FskWj.pdf (20)

StackNet Meta-Modelling framework
StackNet Meta-Modelling frameworkStackNet Meta-Modelling framework
StackNet Meta-Modelling framework
 
Shifu plugin-trainer and pmml-adapter
Shifu plugin-trainer and pmml-adapterShifu plugin-trainer and pmml-adapter
Shifu plugin-trainer and pmml-adapter
 
BPstudy sklearn 20180925
BPstudy sklearn 20180925BPstudy sklearn 20180925
BPstudy sklearn 20180925
 
Machine Learning Guide maXbox Starter62
Machine Learning Guide maXbox Starter62Machine Learning Guide maXbox Starter62
Machine Learning Guide maXbox Starter62
 
An eternal question of timing
An eternal question of timingAn eternal question of timing
An eternal question of timing
 
Assignment 2 linear regression predicting car mpg
Assignment 2 linear regression predicting car mpg Assignment 2 linear regression predicting car mpg
Assignment 2 linear regression predicting car mpg
 
Machinelearning Spark Hadoop User Group Munich Meetup 2016
Machinelearning Spark Hadoop User Group Munich Meetup 2016Machinelearning Spark Hadoop User Group Munich Meetup 2016
Machinelearning Spark Hadoop User Group Munich Meetup 2016
 
Objectives Assignment 09 Applications of Stacks COS.docx
Objectives Assignment 09 Applications of Stacks COS.docxObjectives Assignment 09 Applications of Stacks COS.docx
Objectives Assignment 09 Applications of Stacks COS.docx
 
Matopt
MatoptMatopt
Matopt
 
SMP4 Thread Scheduler (PART 1)======================INS.docx
SMP4 Thread Scheduler (PART 1)======================INS.docxSMP4 Thread Scheduler (PART 1)======================INS.docx
SMP4 Thread Scheduler (PART 1)======================INS.docx
 
Training course lect2
Training course lect2Training course lect2
Training course lect2
 
AIML4 CNN lab256 1hr (111-1).pdf
AIML4 CNN lab256 1hr (111-1).pdfAIML4 CNN lab256 1hr (111-1).pdf
AIML4 CNN lab256 1hr (111-1).pdf
 
I want to sell a PVS-Studio license to the Intel company
I want to sell a PVS-Studio license to the Intel companyI want to sell a PVS-Studio license to the Intel company
I want to sell a PVS-Studio license to the Intel company
 
K-Fashion 경진대회 3등 수상자 솔루션
K-Fashion 경진대회 3등 수상자 솔루션K-Fashion 경진대회 3등 수상자 솔루션
K-Fashion 경진대회 3등 수상자 솔루션
 
SMP4 Thread Scheduler (PART 1)======================INSTR.docx
SMP4 Thread Scheduler (PART 1)======================INSTR.docxSMP4 Thread Scheduler (PART 1)======================INSTR.docx
SMP4 Thread Scheduler (PART 1)======================INSTR.docx
 
Xgboost
XgboostXgboost
Xgboost
 
eam2
eam2eam2
eam2
 
PL/SQL User-Defined Functions in the Read World
PL/SQL User-Defined Functions in the Read WorldPL/SQL User-Defined Functions in the Read World
PL/SQL User-Defined Functions in the Read World
 
AI optimizing HPC simulations (presentation from 6th EULAG Workshop)
AI optimizing HPC simulations (presentation from  6th EULAG Workshop)AI optimizing HPC simulations (presentation from  6th EULAG Workshop)
AI optimizing HPC simulations (presentation from 6th EULAG Workshop)
 
House Price Estimation as a Function Fitting Problem with using ANN Approach
House Price Estimation as a Function Fitting Problem with using ANN ApproachHouse Price Estimation as a Function Fitting Problem with using ANN Approach
House Price Estimation as a Function Fitting Problem with using ANN Approach
 

More from allystraders

Suponga que las tasas de inter�s en los Estados Unidos, pero no aume.pdf
Suponga que las tasas de inter�s en los Estados Unidos, pero no aume.pdfSuponga que las tasas de inter�s en los Estados Unidos, pero no aume.pdf
Suponga que las tasas de inter�s en los Estados Unidos, pero no aume.pdf
allystraders
 
How would I create this diagramRentTool Viewpoints � Technology .pdf
How would I create this diagramRentTool Viewpoints � Technology .pdfHow would I create this diagramRentTool Viewpoints � Technology .pdf
How would I create this diagramRentTool Viewpoints � Technology .pdf
allystraders
 
How well did Thaldorf interact with each member of the DMUOn what.pdf
How well did Thaldorf interact with each member of the DMUOn what.pdfHow well did Thaldorf interact with each member of the DMUOn what.pdf
How well did Thaldorf interact with each member of the DMUOn what.pdf
allystraders
 

More from allystraders (20)

Supplemental knowledge conversion processes have been added to the E.pdf
Supplemental knowledge conversion processes have been added to the E.pdfSupplemental knowledge conversion processes have been added to the E.pdf
Supplemental knowledge conversion processes have been added to the E.pdf
 
Supongamos que Musashi, un economista de un programa de radio AM, y .pdf
Supongamos que Musashi, un economista de un programa de radio AM, y .pdfSupongamos que Musashi, un economista de un programa de radio AM, y .pdf
Supongamos que Musashi, un economista de un programa de radio AM, y .pdf
 
Suponga que las tasas de inter�s en los Estados Unidos, pero no aume.pdf
Suponga que las tasas de inter�s en los Estados Unidos, pero no aume.pdfSuponga que las tasas de inter�s en los Estados Unidos, pero no aume.pdf
Suponga que las tasas de inter�s en los Estados Unidos, pero no aume.pdf
 
Suponga que la ARN polimerasa estaba transcribiendo un gen eucari�ti.pdf
Suponga que la ARN polimerasa estaba transcribiendo un gen eucari�ti.pdfSuponga que la ARN polimerasa estaba transcribiendo un gen eucari�ti.pdf
Suponga que la ARN polimerasa estaba transcribiendo un gen eucari�ti.pdf
 
Suppose researchers are about to draw a sample of 1450 observations .pdf
Suppose researchers are about to draw a sample of 1450 observations .pdfSuppose researchers are about to draw a sample of 1450 observations .pdf
Suppose researchers are about to draw a sample of 1450 observations .pdf
 
Suponga que el Congreso est� considerando un proyecto de ley que imp.pdf
Suponga que el Congreso est� considerando un proyecto de ley que imp.pdfSuponga que el Congreso est� considerando un proyecto de ley que imp.pdf
Suponga que el Congreso est� considerando un proyecto de ley que imp.pdf
 
Suppose that there are two groups of people in the economy. In group.pdf
Suppose that there are two groups of people in the economy. In group.pdfSuppose that there are two groups of people in the economy. In group.pdf
Suppose that there are two groups of people in the economy. In group.pdf
 
Suppose that the Fed will increase the money supply. Which of the fo.pdf
Suppose that the Fed will increase the money supply. Which of the fo.pdfSuppose that the Fed will increase the money supply. Which of the fo.pdf
Suppose that the Fed will increase the money supply. Which of the fo.pdf
 
Suppose that the body weights of Roborovski dwarf hamsters are norma.pdf
Suppose that the body weights of Roborovski dwarf hamsters are norma.pdfSuppose that the body weights of Roborovski dwarf hamsters are norma.pdf
Suppose that the body weights of Roborovski dwarf hamsters are norma.pdf
 
Suppose that in a particular country, the TFR fell to zero and remai.pdf
Suppose that in a particular country, the TFR fell to zero and remai.pdfSuppose that in a particular country, the TFR fell to zero and remai.pdf
Suppose that in a particular country, the TFR fell to zero and remai.pdf
 
Suppose that disposable income, consumption, and saving in some coun.pdf
Suppose that disposable income, consumption, and saving in some coun.pdfSuppose that disposable income, consumption, and saving in some coun.pdf
Suppose that disposable income, consumption, and saving in some coun.pdf
 
Suppose that 60 of students at Kansas State University have listene.pdf
Suppose that 60 of students at Kansas State University have listene.pdfSuppose that 60 of students at Kansas State University have listene.pdf
Suppose that 60 of students at Kansas State University have listene.pdf
 
Suppose Maria and Jamal both face the following individual loss dist.pdf
Suppose Maria and Jamal both face the following individual loss dist.pdfSuppose Maria and Jamal both face the following individual loss dist.pdf
Suppose Maria and Jamal both face the following individual loss dist.pdf
 
Suppose a random variable X has the following probability distributi.pdf
Suppose a random variable X has the following probability distributi.pdfSuppose a random variable X has the following probability distributi.pdf
Suppose a random variable X has the following probability distributi.pdf
 
Suppose a country had a smaller increase in debt in 2011 than it had.pdf
Suppose a country had a smaller increase in debt in 2011 than it had.pdfSuppose a country had a smaller increase in debt in 2011 than it had.pdf
Suppose a country had a smaller increase in debt in 2011 than it had.pdf
 
how would implement empowerment techniques within a service Choose .pdf
how would implement empowerment techniques within a service Choose .pdfhow would implement empowerment techniques within a service Choose .pdf
how would implement empowerment techniques within a service Choose .pdf
 
How were the management controls at Siemens prior to the Bribery sca.pdf
How were the management controls at Siemens prior to the Bribery sca.pdfHow were the management controls at Siemens prior to the Bribery sca.pdf
How were the management controls at Siemens prior to the Bribery sca.pdf
 
How would I create this diagramRentTool Viewpoints � Technology .pdf
How would I create this diagramRentTool Viewpoints � Technology .pdfHow would I create this diagramRentTool Viewpoints � Technology .pdf
How would I create this diagramRentTool Viewpoints � Technology .pdf
 
How well did Thaldorf interact with each member of the DMUOn what.pdf
How well did Thaldorf interact with each member of the DMUOn what.pdfHow well did Thaldorf interact with each member of the DMUOn what.pdf
How well did Thaldorf interact with each member of the DMUOn what.pdf
 
How do increasing atmospheric CO2 emissions threaten sea creatures, .pdf
How do increasing atmospheric CO2 emissions threaten sea creatures, .pdfHow do increasing atmospheric CO2 emissions threaten sea creatures, .pdf
How do increasing atmospheric CO2 emissions threaten sea creatures, .pdf
 

Recently uploaded

Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
AnaAcapella
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
httgc7rh9c
 

Recently uploaded (20)

Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Economic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food AdditivesEconomic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food Additives
 
Simple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfSimple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdf
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Introduction to TechSoup’s Digital Marketing Services and Use Cases
Introduction to TechSoup’s Digital Marketing  Services and Use CasesIntroduction to TechSoup’s Digital Marketing  Services and Use Cases
Introduction to TechSoup’s Digital Marketing Services and Use Cases
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
 
Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdfUGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
 
PANDITA RAMABAI- Indian political thought GENDER.pptx
PANDITA RAMABAI- Indian political thought GENDER.pptxPANDITA RAMABAI- Indian political thought GENDER.pptx
PANDITA RAMABAI- Indian political thought GENDER.pptx
 
Play hard learn harder: The Serious Business of Play
Play hard learn harder:  The Serious Business of PlayPlay hard learn harder:  The Serious Business of Play
Play hard learn harder: The Serious Business of Play
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 

httpscolab.research.google.comdrive13cof4XUULbUqO0s5h-cd17FskWj.pdf

  • 1. https://colab.research.google.com/drive/13cof4XUULbUqO0s5h-cd17FskWjpyMkm P1 (40pt): In the following code example explained in Lecture 5, https://colab.research.google.com/drive/13cof4XUULbUq00s5h-cd17FskWjpyMkm, make the following changes to the neural network model sequentially in the example: 1. Change the number of neurons on the hidden layer to 256 units. (10pt) 2. Use the tanh activation (an activation that was popular in the early days of neural networks) instead of relu for the hidden layer. (10pt) 3. Add an additional hidden layer with 256 units and tanh activation function. (10pt) Retrain the newly defined model and evaluate the trained model on the testing dataset to get the accuracy. (10pt) P2 (60pt): Write a Python code in Colab using NumPy, Panda, Scikit-Learn and Keras to complete the following tasks: 1. Import the Auto MPG dataset using pandas.read_csv(), use the attribute names as explained in the dataset description as the column names, view the strings '?' as the missing value, and whitespace (i.e., ' Is+ ') as the column delimiter. Print out the shape and first 5 rows of the DataFrame. (5pt) a. Dataset source file: http://archive.ics.uci.edu/ml/machine-learning-databases/auto-mpg/auto-mpg.data b. Dataset description: http://archive.ics.uci.edu/ml/datasets/Auto+MPG [ ] import matplotlib.pyplot as plt import pandas as pd import tensorflow as tf from tensorflow import keras import numpy as np np.random. seed (100) tf.random.set_seed (100)[1 put your answer here 2. Delete the "car_name" column using .drop() and drop the rows containing NULL value using .dropna(). Print out the shape of the DataFrame. (5pt) & put your answer here 3. For the 'origin' column with categorical attribute, replace it with the columns with numerical attributes using one-hot encoding. Print out the shape and first 5 rows of the new DataFrame. (5pt) [ 1 put your answer here 4. Separate the "mpg" column from other columns and view it as the label vector and others as the feature matrix. Split the data into a training set (80%) and testing set (20%) using train_test_split and print out their shapes. Print out the statistics of your training feature matrix using describe 0.(5pt) [ ] from sklearn.model_selection import train_test_split * put your answer here 5. Normalize the feature columns in both training and testing datasets so that their means equal to zero and variances equal to one. Note that the testing set can only be scaled by the mean and standard deviation values obtained from the training set. Describe the statistics of your normalized feature matrix of training dataset using describe() in Pandas. (5pt) - Option 1: You can follow the normalization steps in the code example of "Predicting house prices: a regression example" in Lecture 6. - Option 2: You can use StandardScaler() in Scikit-Learn as in Homework 2 but you may need to transform a NumPy array back to Pandas DataFrame using pd.DataFrame( before calling describe0. [1 put your answer here 6. Build a sequential neural network model in Keras with two densely connected hidden layers ( 32 neurons and ReLU activation function for each hidden layer), and an output layer that returns a single, continuous value. Print out the model
  • 2. summary using .summary0. (10pt) - Hint: You can follow the "Classifying movie reviews" example in Lecture 6, but need to change input_shape and last layer activation function correctly in the model definition. [ & put your answer here 7. Define the appropriate loss function, optimizer, and metrics for this specific problem and compile the NN model. (10pt) [ & put your answer here 8. Put aside 20% of the normalized training data as the validation dataset by setting validation_split =0.2 and set verbose =0 to compress the model training status in Keras .fit(). Train the NN model for 100 epochs and batch size of 32 and plot the training and validation loss progress with respect to the epoch number. (10pt) - Remember to use GPU for training in Colab. Otherwise, you may find out of memory error or slow execution. - There is no need to do K-fold cross-validation for this step. [1 put your answer here 9. Use the trained NN model to make predictions on the normalized testing dataset and observe the prediction error. (5pt)