🚀 vidhivaish03/Sentiment_Analysis_Stock_Tweets_FineTuned
This fine - tuned Transformer - based model is designed for sentiment analysis of stock - related tweets, classifying them into Bearish, Bullish, and Neutral sentiments.
🚀 Quick Start
The vidhivaish03/Sentiment_Analysis_Stock_Tweets_FineTuned
model is readily available on the Hugging Face Hub. You can access it via RESTful APIs or integrate it into financial sentiment analysis pipelines for real - time sentiment predictions of stock - related tweets.
✨ Features
- Fine - Tuned Transformer: Based on the [ahmedrachid/FinancialBERT - Sentiment - Analysis](https://huggingface.co/ahmedrachid/FinancialBERT - Sentiment - Analysis) base model, fine - tuned for enhanced performance on financial news tweets.
- Multi - Class Sentiment Analysis: Capable of classifying stock - related tweets into three sentiment categories: Bearish, Bullish, and Neutral.
- Easy Deployment: Available on Hugging Face Hub, facilitating seamless integration into various applications.
📦 Installation
There is no specific installation command provided in the original document. However, you can use the following general steps to use the model from the Hugging Face Hub:
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("vidhivaish03/Sentiment_Analysis_Stock_Tweets_FineTuned")
model = AutoModelForSequenceClassification.from_pretrained("vidhivaish03/Sentiment_Analysis_Stock_Tweets_FineTuned")
📚 Documentation
Model Overview
Property |
Details |
Model Name |
vidhivaish03/Sentiment_Analysis_Stock_Tweets_FineTuned |
Model Type |
Transformer - based, fine - tuned |
Base Model |
[ahmedrachid/FinancialBERT - Sentiment - Analysis](https://huggingface.co/ahmedrachid/FinancialBERT - Sentiment - Analysis) |
Language |
English |
Task |
Sentiment Analysis (Bearish, Bullish, Neutral) |
Dataset
- Dataset Name: [zeroshot/twitter - financial - news - sentiment](https://huggingface.co/datasets/zeroshot/twitter - financial - news - sentiment)
- Description: The dataset consists of financial news tweets annotated with three sentiment labels: Bearish, Bullish, and Neutral. It includes 9,543 training samples and 2,388 validation samples.
- Data Structure:
- Training Set: 9,543 samples
- Validation Set: 2,388 samples
Training Details
- Preprocessing: Text cleaning (removal of URLs, special characters), tokenization, stop word removal, lemmatization, and vectorization using Word2Vec embeddings.
- Training Framework: Hugging Face's Transformers library
- Fine - Tuning Epochs: 5
- Optimizer: AdamW
- Learning Rate: 2e - 5
Model Performance
The classification report provides a detailed performance overview of the fine - tuned FinancialBERT model on the validation set, evaluating its ability to classify stock - related tweets into Bearish, Bullish, and Neutral sentiments.
Class |
Precision |
Recall |
F1 - Score |
Support |
Bearish |
0.83 |
0.69 |
0.76 |
285 |
Bullish |
0.75 |
0.83 |
0.79 |
391 |
Neutral |
0.91 |
0.91 |
0.91 |
1233 |
Accuracy |
- |
- |
0.86 |
1909 |
Macro Avg |
0.83 |
0.81 |
0.82 |
1909 |
Weighted Avg |
0.86 |
0.86 |
0.86 |
1909 |
Use Cases
- Investor Sentiment Analysis: To gauge market sentiment from social media posts and financial news, aiding investment decisions.
- Market Trend Prediction: To anticipate stock movements based on aggregate sentiment analysis from a variety of sources.
- Financial News Monitoring: To automatically categorize financial news articles and tweets into sentiment categories, streamlining information gathering for analysts.
Limitations
- Domain Specificity: The model is fine - tuned specifically for financial news tweets, and may not generalize well to other domains.
- Context Understanding: While FinancialBERT captures financial context well, it might not interpret nuanced sentiments or sarcasm effectively.
- Data Bias: The model's performance is contingent on the quality and representativeness of the training dataset, which might include biases inherent in social media discussions.
Future Work
- Domain Expansion: Fine - tune additional models for other domains such as general news or consumer reviews.
- Multi - Modal Analysis: Integrate sentiment analysis with other data types like images or financial indicators for more comprehensive insights.
- Enhanced Interpretability: Develop methods to better interpret and explain model predictions to non - technical stakeholders.
Deployment
- Hugging Face Hub: The model is available on Hugging Face Hub for easy integration and deployment.
- Inference: The model can be accessed via RESTful APIs or integrated into financial sentiment analysis pipelines for real - time predictions.
Repository Link: vidhivaish03/Sentiment_Analysis_Stock_Tweets_FineTuned
This model card summarizes the key aspects of vidhivaish03/Sentiment_Analysis_Stock_Tweets_FineTuned, providing insights into its training, performance, and applications.