You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stopwords are pre-downloaded from nltk.corpus and used
nltk.word_tokenize for tokenization
Vocabulary is built assuming the padding (0) and unknown words(1) as tokens. vocab[""] = 0 vocab[""] = 1
Took the max value for padding to be 29 (largest size from train dataset given)
Dataset:
Used pandas and sklearn.preprocessing.OneHotEncoder to get one hot representation for ratings and provided this as the target labels.
Softmax:
This function is written in such a way that it handles the exploding and vanishing gradients problem. The input to softmax function is normalised by subtracting by maximum value in the input tensor and divided by reasonably big value ~10,000
Model architecture:
tf.keras.Input and tf.keras.layers.Dense are used in the model architecture.
Used sklearn.metrics to get accuracy_score,precision_score,recall_score,f1_score,confusion_matrix