Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In this part, you need to apply a simple ANN model ( same as in part 1 ) on the MobilePriceDataset , which has 2
In this part, you need to apply a simple ANN model same as in part on the MobilePriceDataset which has features and one label pricerangeas category range between to Your task is: Simply use the same steps in the previous part to implement ANN. Note that: a After reading the dataset you need to change dataframe to numpy by using this code: #Changing pandas dataframe to numpy array Xdata data.iloc::values y data.iloc::values b You need to split the dataset into train set and test set. c To normalize the data, you can use this method: #Normalizing the data from sklearn.preprocessing import StandardScaler sc StandardScaler Xtrain scfittransformXtrain Xtest scfittransformXtest d No need to flatten the data because it is already in one dimensional shape. e Define the ANN model with this setting: model keras.Sequential model.addkeraslayers.Dense inputshape activation'sigmoid' model.addkeraslayers.Dense activation'sigmoid' model.addkeraslayers.Dense activation'softmax' f When you train the model change the number of epochs to be any number of your choice between and
In this part, you need to apply a simple ANN model same as in part on the
MobilePriceDataset which has features and one label pricerangeas category range
between to Your task is:
Simply use the same steps in the previous part to implement ANN.
Note that:
a After reading the dataset you need to change dataframe to numpy by using this code:
#Changing pandas dataframe to numpy array
Xdata data.iloc::values
y data.iloc::values
b You need to split the dataset into train set and test set.
c To normalize the data, you can use this method:
#Normalizing the data
from sklearn.preprocessing import StandardScaler
sc StandardScaler
Xtrain scfittransformXtrain
Xtest scfittransformXtest
d No need to flatten the data because it is already in one dimensional shape.
e Define the ANN model with this setting:
model keras.Sequential
model.addkeraslayers.Dense inputshape activation'sigmoid'
model.addkeraslayers.Dense activation'sigmoid'
model.addkeraslayers.Dense activation'softmax'
f When you train the model change the number of epochs to be any number of your
choice between and
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started