Vineedhar commited on
Commit
dd1d390
1 Parent(s): 691d7ae

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +44 -43
README.md CHANGED
@@ -9,69 +9,47 @@ pipeline_tag: text-classification
9
 
10
  # Model Card for orYx-models/finetuned-roberta-leadership-sentiment-analysis
11
 
12
- - This model is a finetuned version of, roberta text classifier. The finetuning has been done on the dataset which includes inputs from corporate executives to their therapist.
13
- The sole purpose of the model is to determine wether the statement made from the corporate executives is "Positive, Negative, or Neutral" with which we will also see "Confidence level, i.e the percentage of the sentiment involved in a statement.
14
- The sentiment analysis tool has been particularly built for our client firm called "LDS".
15
- Since it is prototype tool by orYx Models, all the feedback and insights from LDS will be used to finetune the model further.
16
-
17
-
18
 
19
  ## Model Details
20
 
21
- ### Model Description
22
-
23
- - This model is finetuned on a RoBERTa-base model trained on ~124M tweets from January 2018 to December 2021,and finetuned for sentiment analysis with the TweetEval benchmark.
24
- The original Twitter-based RoBERTa model can be found here and the original reference paper is TweetEval.
25
- This model is suitable for English.
26
-
27
 
28
-
29
- - **Developed by:** orYx Models
30
- - **Shared by [optional]:** Vineedhar, relkino, kalhosni
31
- - **Model type:** Text Classifier
32
- - **Language(s) (NLP):** English
33
  - **License:** MIT
34
- - **Finetuned from model [optional]:** cardiffnlp/twitter-roberta-base-sentiment-latest
35
-
36
- ### Model Sources [optional]
37
 
38
- This is HuggingFace modelID - cardiffnlp/twitter-roberta-base-2021-124m
39
 
40
- - **Repository:** More Information Needed
41
- - **Paper [optional]:** TimeLMs - https://arxiv.org/abs/2202.03829
42
 
43
  ## Uses
44
 
45
- -The Sentiment Analysis tool is made domain specific, however since it is a protoype, the depths into domain are still to be ventured.
46
-
47
- - **Use case:** We can analyse the text from any executive, employee, client of an organization and attach a sentiment to it.
48
- - The outcomes of this will be a "Scored sentiment" upon which we can look for likeliness of an event occurring or vice versa.
49
- - The resultant scenario to this will be to generate a rating system based on the sentiments generated by texts from an entity.
50
 
51
  ### Direct Use
52
- ```
53
 
54
- nlp = pipeline("sentiment-analysis", model = model, tokenizer = tokenizer)
 
55
 
56
- nlp("The results don't match but the effort seems to be always high")
57
 
58
  Out[7]: [{'label': 'Positive', 'score': 0.9996090531349182}]
59
-
60
  ```
61
 
62
-
 
63
  ### Recommendations
64
-
65
-
66
-
 
67
 
68
 
69
  ## Training Details
70
-
71
-
72
-
73
-
74
- ### Training Data
75
  ```
76
 
77
  X_train, X_val, y_train, y_val = train_test_split(X,y, test_size = 0.2, stratify = y)
@@ -84,7 +62,11 @@ X_train, X_val, y_train, y_val = train_test_split(X,y, test_size = 0.2, stratify
84
 
85
  ### Training Procedure
86
 
87
-
 
 
 
 
88
 
89
  #### Preprocessing [optional]
90
  ```
@@ -114,11 +96,14 @@ args = TrainingArguments(
114
  )
115
  ```
116
  #### Speeds, Sizes, Times [optional]
117
- ```
118
  - **TrainOutput**
 
119
  global_step=879,
120
  training_loss=0.1825900522650848,
 
121
  - **Metrics**
 
122
  'train_runtime': 101.6309,
123
  'train_samples_per_second': 34.596,
124
  'train_steps_per_second': 8.649,
@@ -129,6 +114,22 @@ training_loss=0.1825900522650848,
129
 
130
  ## Evaluation Metrics Results
131
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
 
133
  **loss**
134
  - train 0.049349
 
9
 
10
  # Model Card for orYx-models/finetuned-roberta-leadership-sentiment-analysis
11
 
12
+ - **Model Description:** This model is a finetuned version of the RoBERTa text classifier. It has been trained on a dataset comprising communications from corporate executives to their therapists. Its primary function is to determine whether statements from corporate executives convey a "Positive," "Negative," or "Neutral" sentiment, accompanied by a confidence level indicating the percentage of sentiment expressed in a statement. The sentiment analysis tool is specifically developed for our client firm called "LDS." Being a prototype tool by orYx Models, all feedback and insights from LDS will be used to further refine the model.
 
 
 
 
 
13
 
14
  ## Model Details
15
 
16
+ ### Model Information
 
 
 
 
 
17
 
18
+ - **Model Type:** Text Classifier
19
+ - **Language(s):** English
 
 
 
20
  - **License:** MIT
21
+ - **Finetuned from Model:** cardiffnlp/twitter-roberta-base-sentiment-latest
 
 
22
 
23
+ ### Model Sources
24
 
25
+ - **HuggingFace Model ID:** cardiffnlp/twitter-roberta-base-2021-124m
26
+ - **Paper:** TimeLMs - [Link](https://arxiv.org/abs/2202.03829)
27
 
28
  ## Uses
29
 
30
+ - **Use case:** This sentiment analysis tool can analyze text from any entity within an organization, such as executives, employees, or clients, and assign a sentiment to it.
31
+ - **Outcomes:** The tool generates a "Scored sentiment" which can be used to assess the likelihood of events occurring or vice versa. It can also facilitate the creation of a rating system based on the sentiments expressed in texts.
 
 
 
32
 
33
  ### Direct Use
 
34
 
35
+ ```python
36
+ nlp = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)
37
 
38
+ nlp("The results don't match, but the effort seems to be always high")
39
 
40
  Out[7]: [{'label': 'Positive', 'score': 0.9996090531349182}]
 
41
  ```
42
 
43
+ - Based on the text the outcomes can be "Positive, Negative, Neutral" along with their confidence score.
44
+ -
45
  ### Recommendations
46
+ - Continuous Monitoring: Regularly monitor the model's performance on new data to ensure its effectiveness and reliability over time.
47
+ - Error Analysis: Conduct thorough error analysis to identify common patterns of misclassifications and areas for improvement.
48
+ - Fine-Tuning: Consider fine-tuning the model further based on feedback and insights from users, especially from LDS, to enhance its domain-specific performance.
49
+ - Model Interpretability: Explore techniques for explaining the model's predictions, such as attention mechanisms or feature importance analysis, to increase trust and understanding of its decisions.
50
 
51
 
52
  ## Training Details
 
 
 
 
 
53
  ```
54
 
55
  X_train, X_val, y_train, y_val = train_test_split(X,y, test_size = 0.2, stratify = y)
 
62
 
63
  ### Training Procedure
64
 
65
+ **Dataset Split:** Data divided into 80% training and 20% validation sets.
66
+ **Preprocessing:** Input data tokenized into 'input_ids' and 'attention_mask' tensors.
67
+ **Training Hyperparameters:** Set for training, evaluation, and optimization, including batch size, epochs, and logging strategies.
68
+ **Training Execution:** Model trained with specified hyperparameters, monitored with metrics, and logged for evaluation.
69
+ **Evaluation Metrics:** Model evaluated on loss, accuracy, F1 score, precision, and recall for both training and validation sets.
70
 
71
  #### Preprocessing [optional]
72
  ```
 
96
  )
97
  ```
98
  #### Speeds, Sizes, Times [optional]
99
+
100
  - **TrainOutput**
101
+ ```
102
  global_step=879,
103
  training_loss=0.1825900522650848,
104
+ ```
105
  - **Metrics**
106
+ - ```
107
  'train_runtime': 101.6309,
108
  'train_samples_per_second': 34.596,
109
  'train_steps_per_second': 8.649,
 
114
 
115
  ## Evaluation Metrics Results
116
 
117
+ ```
118
+ # Assuming you have a list of evaluation results q and want to create a DataFrame with it
119
+ q = [Trainer.evaluate(eval_dataset=df) for df in [train_dataset, val_dataset]]
120
+
121
+ # Create DataFrame with index and select only the first 5 columns
122
+ result_df = pd.DataFrame(q, index=["train", "val"]).iloc[:,:5]
123
+
124
+ # Display the resulting DataFrame
125
+ print(result_df)
126
+
127
+ ______________________________________________________________________
128
+ eval_loss eval_Accuracy eval_F1 eval_Precision eval_Recall
129
+ train 0.049349 0.988908 0.987063 0.982160 0.992357
130
+ val 0.108378 0.976136 0.972464 0.965982 0.979861
131
+ ______________________________________________________________________
132
+ ```
133
 
134
  **loss**
135
  - train 0.049349