Hey everyone,
I’m working on a small ML project (~1200 samples) where I’m trying to predict:
- Emotional state (classification — 6 classes)
- Intensity (1–5) of that emotion
The dataset contains:
journal_text(short, noisy reflections)- metadata like:
- stress_level
- energy_level
- sleep_hours
- time_of_day
- previous_day_mood
- ambience_type
- face_emotion_hint
- duration_min
- reflection_quality
🔧 What I’ve done so far
1. Text processing
Using TF-IDF:
max_features = 500 → tried 1000+ as wellngram_range = (1,2)stop_words = 'english'min_df = 2
Resulting shape:
- ~1200 samples × 500–1500 features
2. Metadata
- Converted categorical (
face_emotion_hint) to numeric - Kept others as numerical
- Handled missing values (NaN left for XGBoost / simple filling)
Also added engineered features:
text_lengthword_countstress_energy = stress_level * energy_levelemotion_hint_diff = stress_level - energy_level
Scaled metadata using StandardScaler
Combined with text using:
from scipy.sparse import hstack X_final = hstack([X_text, X_meta_sparse]).tocsr() 3. Models
Emotional State (Classification)
Using XGBClassifier:
- accuracy ≈ 66–67%
Classification report looks decent, confusion mostly between neighboring classes.
Intensity (Initially Classification)
- accuracy ≈ 21% (very poor)
4. Switched Intensity → Regression
Used XGBRegressor:
- predictions rounded to 1–5
Evaluation:
- MAE ≈ 1.22
Current Issues
1. Intensity is not improving much
- Even after feature engineering + tuning
- MAE stuck around 1.2
- Small improvements only (~0.05–0.1)
2. TF-IDF tuning confusion
- Reducing features (500) → accuracy dropped
- Increasing (1000–1500) → slightly better
Not sure how to find optimal balance
3. Feature engineering impact is small
- Added multiple features but no major improvement
- Unsure what kind of features actually help intensity
Observations
- Dataset is small (1200 rows)
- Labels are noisy (subjective emotion + intensity)
- Model confuses nearby classes (expected)
- Text seems to dominate over metadata
Questions
- Are there better approaches for ordinal prediction (instead of plain regression)?
- Any ideas for better features specifically for emotional intensity?
- Should I try different models (LightGBM, linear models, etc.)?
- Any better way to combine text + metadata?
Goal
Not just maximize accuracy — but build something that:
- handles noisy data
- generalizes well
- reflects real-world behavior
Would really appreciate any suggestions or insights 🙏
[link] [comments]




