Files changed (1) hide show
  1. README.md +171 -0
README.md ADDED
@@ -0,0 +1,171 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets:
3
+ - hackathon-somos-nlp-2023/DiagTrast
4
+ language:
5
+ - es
6
+ metrics:
7
+ - accuracy
8
+ ---
9
+
10
+ # Model Card for "DiagTrast-xlm-roberta-base"
11
+
12
+ This model is a fine-tuned version of [xlm-roberta-base](https://huggingface.co/xlm-roberta-base) that is a multilingual version of RoBERTa and it is pre-trained on 2.5TB of filtered CommonCrawl data containing 100 languages.
13
+
14
+ DiagTrast-xlm-roberta-base was trained with [hackathon-somos-nlp-2023/DiagTrast](https://huggingface.co/datasets/hackathon-somos-nlp-2023/DiagTrast) dataset to classify statements with each of the 5 selected mental disorders of the DSM-5. While this task is classically approached with neural network-based models, the goal of implementing a transformer model is that instead of basing the classification criteria on keyword search, it is expected to understand natural language through the bidirectional learning of the sentences that the xlm-roberta-base model has.
15
+
16
+ ## Uses
17
+
18
+ The model can be used to classify statements written by professionals who have detected unusual behaviors or characteristics in their patients that would indicate the presence of a mental disorder; at the moment it only provides support for five of the disorders described in the DSM-5. It should be noted that the model aims to identify the predominant disorder, so it would be part of the professional's job to group the symptoms before entering them into the model for cases in which multiple disorders are presumed to be present at the same time.
19
+
20
+ ### Direct Use
21
+
22
+ DiagTrast-xlm-roberta-base is already a fine-tuned model so it could be used directly to classify the statements.
23
+
24
+ ### Out-of-Scope Use
25
+
26
+ This model should not be used as a replacement for a mental health professional because it is always necessary that each situation be evaluated responsibly and using all human intellectual capacity. Initially this model is designed as an auxiliary tool to facilitate the use of the DSM-5 by health professionals.
27
+
28
+ ## Bias, Risks, and Limitations
29
+
30
+ The main limitation of the model is that it is restricted to the identification of only 5 of the DSM-5 disorders.
31
+
32
+ ### Recommendations
33
+
34
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
35
+
36
+ [More Information Needed]
37
+
38
+ ## How to Get Started with the Model
39
+
40
+ Use the code below to get started with the model.
41
+
42
+ ```python
43
+ >>> from transformers import pipeline
44
+ >>> classifier = pipeline("text-classification", model='hackathon-somos-nlp-2023/DiagTrast-xlm-roberta-base')
45
+ >>> text = ["Gasta más dinero de lo que tiene, a menudo, su falta de control hace que esté en deudas",
46
+ "Le gusta estar solo y le molesta la gente a su alrededor, solo piensa en él",
47
+ "Tiene pocas habilidades sociales, ignora normas de convivencia",
48
+ "Siempre que está en falta, culpa a los demás de sus problemas" ]
49
+ >>> classifier.predict(text)
50
+ [{'label': 'Trastornos de la personalidad antisocial',
51
+ 'score': 0.7664140462875366},
52
+ {'label': 'Trastornos de la personalidad esquizotípica',
53
+ 'score': 0.9502732157707214},
54
+ {'label': 'Trastornos de la personalidad antisocial',
55
+ 'score': 0.9722056984901428},
56
+ {'label': 'Trastornos de la personalidad antisocial',
57
+ 'score': 0.49087557196617126}]
58
+ ```
59
+
60
+ ## Training Details
61
+
62
+ ### Training Data
63
+
64
+ We use the [hackathon-somos-nlp-2023/DiagTrast](https://huggingface.co/datasets/hackathon-somos-nlp-2023/DiagTrast) dataset, it was split with 90% of records for the training set and 10% for the test set using the 'datasets' library of hugging face.
65
+
66
+ ### Training Procedure
67
+
68
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
69
+ [More Information Needed]
70
+
71
+ #### Preprocessing [optional]
72
+
73
+ [More Information Needed]
74
+
75
+
76
+ #### Training Hyperparameters
77
+
78
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
79
+
80
+ #### Speeds, Sizes, Times [optional]
81
+
82
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
83
+
84
+ [More Information Needed]
85
+
86
+ ## Evaluation
87
+
88
+ <!-- This section describes the evaluation protocols and provides the results. -->
89
+
90
+ ### Testing Data, Factors & Metrics
91
+
92
+ #### Testing Data
93
+
94
+ <!-- This should link to a Data Card if possible. -->
95
+
96
+ [More Information Needed]
97
+
98
+ #### Factors
99
+
100
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
101
+
102
+ [More Information Needed]
103
+
104
+ #### Metrics
105
+
106
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
107
+
108
+ [More Information Needed]
109
+
110
+ ### Results
111
+
112
+ [More Information Needed]
113
+
114
+ #### Summary
115
+
116
+
117
+
118
+ ## Model Examination [optional]
119
+
120
+ <!-- Relevant interpretability work for the model goes here -->
121
+
122
+ [More Information Needed]
123
+
124
+ ## Environmental Impact
125
+
126
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
127
+
128
+ Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
129
+
130
+ - **Hardware Type:** [More Information Needed]
131
+ - **Hours used:** [More Information Needed]
132
+ - **Cloud Provider:** [More Information Needed]
133
+ - **Compute Region:** [More Information Needed]
134
+ - **Carbon Emitted:** [More Information Needed]
135
+
136
+ ## Technical Specifications [optional]
137
+
138
+ ### Model Architecture and Objective
139
+
140
+ [More Information Needed]
141
+
142
+ ### Compute Infrastructure
143
+
144
+ [More Information Needed]
145
+
146
+ #### Hardware
147
+
148
+ [More Information Needed]
149
+
150
+ #### Software
151
+
152
+ [More Information Needed]
153
+
154
+ ## Citation [optional]
155
+
156
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
157
+
158
+ **BibTeX:**
159
+
160
+ [More Information Needed]
161
+
162
+ **APA:**
163
+
164
+ [More Information Needed]
165
+
166
+ ## Team members
167
+
168
+ - [Alberto Martín Garrido](https://huggingface.co/Stremie)
169
+ - [Edgar Mencia]()
170
+ - [Miguel Ángel Solís Orozco](https://huggingface.co/homosapienssapiens)
171
+ - [Jose Carlos Vílchez Villegas](https://huggingface.co/JCarlos)