Model Pipeline - Sentiment analysis
This pipeline reads text reviews, cleans and converts them into numbers, trains a model to learn positive or negative feelings, and then predicts the sentiment of new reviews.
This pipeline reads text reviews, cleans and converts them into numbers, trains a model to learn positive or negative feelings, and then predicts the sentiment of new reviews.
Epoch 1: 0.65 ####### Epoch 2: 0.50 ##### Epoch 3: 0.40 #### Epoch 4: 0.35 ### Epoch 5: 0.30 ##
| Epoch | Loss ↓ | Accuracy ↑ | Observation |
|---|---|---|---|
| 1 | 0.65 | 0.60 | Model starts learning, accuracy above random |
| 2 | 0.50 | 0.75 | Loss decreases, accuracy improves significantly |
| 3 | 0.40 | 0.82 | Model continues to improve |
| 4 | 0.35 | 0.86 | Training converging well |
| 5 | 0.30 | 0.89 | Good accuracy, loss low |
model = tf.keras.Sequential([ tf.keras.layers.Embedding(input_dim=1000, output_dim=16, input_length=10), tf.keras.layers.Dense(1, activation='sigmoid') ])
Pass the test and this pattern moves unknown