data
Max Sentence Length: 178
Min Sentence Length: 1
WARNING:matplotlib.font_manager:findfont: Font family ['serif'] not found. Falling back to DejaVu Sans.
WARNING:matplotlib.font_manager:findfont: Generic family 'serif' not found because none of the following families were found: Arial
precision recall f1-score support
0 0.71 0.80 0.75 76
1 0.63 0.82 0.71 65
2 0.76 0.50 0.60 32
3 0.50 0.20 0.29 20
4 1.00 0.14 0.25 7
accuracy 0.68 200
macro avg 0.72 0.49 0.52 200
weighted avg 0.68 0.68 0.65 200
The model's accuracy is: 0.675
review
emotions_text
anger 342.300000
joy 463.317203
love 392.088889
sadness 400.590244
Name: Calories, dtype: float64
emotions_text
anger 15.700000
joy 23.380868
love 21.511111
sadness 19.399187
Name: FatContent, dtype: float64
emotions_text
anger 29.950000
joy 46.202572
love 25.144444
sadness 41.258537
Name: CarbohydrateContent, dtype: float64
emotions_text
anger 2.000000
joy 3.255895
love 2.544444
sadness 3.173171
Name: FiberContent, dtype: float64
precision recall f1-score support
0 0.08 0.32 0.13 22
1 0.87 0.57 0.69 178
accuracy 0.54 200
macro avg 0.48 0.44 0.41 200
weighted avg 0.78 0.54 0.63 200
calorie
0 / 10000
fat
0 / 800
sodium
0 / 3000
carbs
0 / 1500
fiber
0 / 20
predict_sentiment(calorie, fat, sodium, carbs, fiber)
/shared-libs/python3.7/py/lib/python3.7/site-packages/sklearn/base.py:442: UserWarning:
X does not have valid feature names, but RandomForestClassifier was fitted with feature names