Add Model Card.
Browse files
README.md
CHANGED
@@ -1,3 +1,82 @@
|
|
1 |
---
|
2 |
license: cc0-1.0
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: cc0-1.0
|
3 |
---
|
4 |
+
|
5 |
+
# Advanced Suicidality Classifier Model
|
6 |
+
|
7 |
+
## Introduction
|
8 |
+
|
9 |
+
Welcome to the Suicidality Detection AI Model! This project aims to provide a machine learning solution for detecting sequences of words indicative of suicidality in text. By utilizing the ELECTRA architecture and fine-tuning on a diverse dataset, we have created a powerful classification model that can distinguish between suicidal and non-suicidal text expressions.
|
10 |
+
|
11 |
+
## Training
|
12 |
+
|
13 |
+
The model was fine-tuned using the ELECTRA architecture on a carefully curated dataset. Our training process involved cleaning and preprocessing various text sources to create a comprehensive training set. The training results indicate promising performance, with metrics including:
|
14 |
+
|
15 |
+
## Performance
|
16 |
+
|
17 |
+
The model's performance on the validation dataset is as follows:
|
18 |
+
|
19 |
+
- Accuracy: 0.939432
|
20 |
+
- Recall: 0.937164
|
21 |
+
- Precision: 0.92822
|
22 |
+
- F1 Score: 0.932672
|
23 |
+
|
24 |
+
These metrics demonstrate the model's ability to accurately classify sequences of text as either indicative of suicidality or non-suicidal.
|
25 |
+
|
26 |
+
|
27 |
+
|
28 |
+
## Data Sources
|
29 |
+
|
30 |
+
We collected data from multiple sources to create a rich and diverse training dataset:
|
31 |
+
|
32 |
+
- [Source 1](https://www.kaggle.com/datasets/thedevastator/c-ssrs-labeled-suicidality-in-500-anonymized-red)
|
33 |
+
- [Source 2](https://www.kaggle.com/datasets/amangoyl/reddit-dataset-for-multi-task-nlp)
|
34 |
+
- [Source 3](https://www.kaggle.com/datasets/imeshsonu/suicideal-phrases)
|
35 |
+
- [Source 4](https://raw.githubusercontent.com/laxmimerit/twitter-suicidal-intention-dataset/master/twitter-suicidal_data.csv)
|
36 |
+
- [Source 5](https://www.kaggle.com/datasets/mohanedmashaly/suicide-notes)
|
37 |
+
- [Source 6](https://www.kaggle.com/datasets/natalialech/suicidal-ideation-on-twitter)
|
38 |
+
|
39 |
+
The data underwent thorough cleaning and preprocessing before being used for training the model.
|
40 |
+
|
41 |
+
## How to Use
|
42 |
+
|
43 |
+
### Installation
|
44 |
+
|
45 |
+
To use the model, you need to install the Transformers library:
|
46 |
+
|
47 |
+
```bash
|
48 |
+
pip install transformers
|
49 |
+
```
|
50 |
+
|
51 |
+
### Using the Model
|
52 |
+
|
53 |
+
You can utilize the model for text classification using the following code snippets:
|
54 |
+
|
55 |
+
1. Using the pipeline approach:
|
56 |
+
|
57 |
+
```python
|
58 |
+
from transformers import pipeline
|
59 |
+
|
60 |
+
classifier = pipeline("sentiment-analysis", model="sentinetyd/suicidality")
|
61 |
+
|
62 |
+
result = classifier("text to classify")
|
63 |
+
print(result)
|
64 |
+
```
|
65 |
+
|
66 |
+
2. Using the tokenizer and model programmatically:
|
67 |
+
|
68 |
+
```python
|
69 |
+
from transformers import AutoTokenizer, AutoModel
|
70 |
+
|
71 |
+
tokenizer = AutoTokenizer.from_pretrained("sentinetyd/suicidality")
|
72 |
+
model = AutoModel.from_pretrained("sentinetyd/suicidality")
|
73 |
+
|
74 |
+
# Perform tokenization and prediction using the tokenizer and model
|
75 |
+
```
|
76 |
+
|
77 |
+
## Ethical Considerations
|
78 |
+
Suicidality is a sensitive and serious topic. It's important to exercise caution and consider ethical implications when using this model. Predictions made by the model should be handled with care and used to complement human judgment and intervention.
|
79 |
+
|
80 |
+
## Contributions
|
81 |
+
We welcome contributions and feedback from the community to further improve the model's performance, enhance the dataset, and ensure its responsible deployment.
|
82 |
+
|