DL_ICP 3 - Saiaishwaryapuppala/CSEE5590_python_Icp GitHub Wiki
Python and Deep Learning: Special Topics
Rajeshwari Sai Aishwarya Puppala
Student ID: 16298162
Class ID: 35
Deep Learning-In class programming: 3
Objectives:
- In the code provided there are three mistake which stop the code to get run successfully; find those mistakes and explain why they need to be corrected to be able to get the code run
- Add embedding layer to the model, did you experience any improvement?
- Apply the code on 20_newsgroup data set we worked in the previous classes from sklearn.datasets importfetch_20newsgroupsnewsgroups_train=fetch_20newsgroups(subset='train', shuffle=True, categories=categories,)
Import Data
- Import the necessary Packages required
- Import the imdb data and load all of the train and test data(including images and labels).
Encoding and Tokenized Data
Label Encoding for the target variable to transform into numerical data
Model
- Deep learning model with one hidden layer with activation function "relu"
- The activation function in the output layer is "softmax" because the target is multi-classification
- The hyperparameters are as follows epochs=5, batchsize=256, optimizer is "Adam"
Accuracy and Loss plot for the history Object
- The accuracy and the loss is plotted for the train and the validation data
Add embedding layer
- Accuracy is 48.1%
Model with Newsgroup dataset
- Import the newsgroup data into the data frame
Model
- Accuracy Is 5.4%