please code in python, I really need to know this works.. kindly help me out... please use can use any sample dataset for demo You may use PyTorch or Keras libraries for building deep learning models. A) Implement a single-layer neural network model that is used to classify the "CAN intrusion data samples" into normal and anomalous classes (0: normal, 1: attack). Use the standarized training set from Q1E) to train the network. The details of the model are as follows: Use a Sigmoid as the output layer acitivation function to enable non-linearity. Use the binary cross-entropy loss as a training criterion. Use Stochastic gradient descent optimizer with a learning rate of 0.1. Run the model for 10 iterations/epochs. Record the loss for each iteration, and make a plot of iterations/epochs vs loss(Binary Cross Entropy). Print out the precision, recall, and F1-score of the test set. Print out the model execution time (including both training and testing time) in milliseconds. Please keep two decimal places.
please code in python, I really need to know this works.. kindly help me out... please
use can use any sample dataset for demo
You may use PyTorch or Keras libraries for building deep learning models.
A) Implement a single-layer neural network model that is used to classify the "CAN intrusion data samples"<you can you can sample data> into normal and anomalous classes (0: normal, 1: attack). Use the standarized training set from Q1E) to train the network.
The details of the model are as follows:
- Use a Sigmoid as the output layer acitivation function to enable non-linearity.
- Use the binary cross-entropy loss as a training criterion.
- Use Stochastic gradient descent optimizer with a learning rate of 0.1.
- Run the model for 10 iterations/epochs.
Record the loss for each iteration, and make a plot of iterations/epochs vs loss(Binary Cross Entropy). Print out the precision, recall, and F1-score of the test set. Print out the model execution time (including both training and testing time) in milliseconds. Please keep two decimal places.
Step by step
Solved in 2 steps