Take the first 1000 entries of the training part of the Scikit-learn newsgroups (20 newsgroups) dataset (in the original order) as the training set, and set aside the next 100 entries as the test set. Use the first network from the 5th practice (provided below), make necessary modifications based on the data. Predict whether a post belongs to a political discussion group using a bag-of-words model (the category contains 'talk.politics'). What is the accuracy on the test set, what is the input_shape of the network, and what does the network predict for the last two entries of the test set? here is the model that is provided: model = keras.Sequential() model.add(Dense(128,input_shape=(20000,))) model.add(Dense(64)) model.add(Dense(32)) model.add(Dropout(0.5)) model.add(Dense(4, activation='softmax')) how can i solve this?
Take the first 1000 entries of the training part of the Scikit-learn newsgroups (20 newsgroups) dataset (in the original order) as the training set, and set aside the next 100 entries as the test set. Use the first network from the 5th practice (provided below), make necessary modifications based on the data. Predict whether a post belongs to a political discussion group using a bag-of-words model (the category contains 'talk.politics'). What is the accuracy on the test set, what is the input_shape of the network, and what does the network predict for the last two entries of the test set? here is the model that is provided: model = keras.Sequential() model.add(Dense(128,input_shape=(20000,))) model.add(Dense(64)) model.add(Dense(32)) model.add(Dropout(0.5)) model.add(Dense(4, activation='softmax')) how can i solve this?
Related questions
Question
Take the first 1000 entries of the training part of the Scikit-learn newsgroups (20 newsgroups) dataset (in the original order) as the training set, and set aside the next 100 entries as the test set. Use the first network from the 5th practice (provided below), make necessary modifications based on the data. Predict whether a post belongs to a political discussion group using a bag-of-words model (the category contains 'talk.politics'). What is the accuracy on the test set, what is the input_shape of the network, and what does the network predict for the last two entries of the test set?
here is the model that is provided:
model = keras.Sequential()
model.add(Dense(128,input_shape=(20000,)))
model.add(Dense(64))
model.add(Dense(32))
model.add(Dropout(0.5))
model.add(Dense(4, activation='softmax'))
how can i solve this?
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps