MindCare AI: Emotion & Sentiment Analysis Models (Trained from Scratch)

This repository hosts serialized machine learning models trained strictly from scratch without pretrained transformer weights, developed as part of the MindCare AI framework.

πŸ“Š Benchmark Results

1. 3-Class Sentiment (Positive, Negative, Neutral)

  • Dataset: GoEmotions (54,258 authentic samples)
  • Best Model: Logistic Regression / Calibrated SVM (LinearSVC)
  • Held-out Test Accuracy: 68.80%
  • Weighted F1 Score: 0.6909

2. 10-Class Fine-Grained Emotion Recognition

  • Classes: Happiness, Sadness, Anger, Fear, Surprise, Disgust, Neutral, Excitement, Frustration, Gratitude
  • Best Model: Custom Bidirectional LSTM with Self-Attention Context Pooling
  • Held-out Test Accuracy: 56.99%
  • Weighted F1 Score: 0.5610

πŸ“¦ Model Files Included

  • sentiment_lr.joblib - Calibrated Logistic Regression for 3-class sentiment
  • sentiment_svm.joblib - Calibrated Linear Support Vector Machine
  • sentiment_nb.joblib - Multinomial Naive Bayes
  • sentiment_rf.joblib - Random Forest Classifier
  • sentiment_vectorizer.joblib - TF-IDF n-gram vectorizer (ngram_range=(1,2), max_features=12,000)
  • sentiment_mlp.pt - PyTorch Multi-Layer Perceptron
  • sentiment_lstm.pt - PyTorch Bidirectional LSTM with Attention
  • emotion_lr.joblib / emotion_svm.joblib / emotion_lstm.pt - 10-class emotion models
  • vocab.json - Tokenizer vocabulary
  • sentiment_metadata.json / emotion_metadata.json - Validation & test performance metrics

πŸš€ Quick Usage (Python)

import joblib

# Load TF-IDF vectorizer and trained Logistic Regression model
vectorizer = joblib.load("sentiment_vectorizer.joblib")
model = joblib.load("sentiment_lr.joblib")

text = "I am grateful for all the support and kindness."
X = vectorizer.transform([text])
prediction = model.predict(X)[0]
probs = model.predict_proba(X)[0]

print(f"Sentiment: {prediction}")
print(f"Probabilities: {dict(zip(model.classes_, probs))}")

βš–οΈ Ethical Boundary & Non-Medical Disclaimer

This model identifies linguistic patterns and sentiment correlations in text. It is not a psychiatric diagnostic instrument or medical device.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support