Skip to content
Snippets Groups Projects
Commit 76060944 authored by ivan.pavlovic's avatar ivan.pavlovic
Browse files

Petite recherche sur gpt et models Zero-shot/Few-shot

parent 98b09722
No related branches found
No related tags found
No related merge requests found
......@@ -15,3 +15,8 @@
- ~~Etudier les operateur (A or B and C) (A or B) and C A or (B and C)~~
- Service qui tourne en arriere plan qui récupere les données
- Reflechire sur la structure de stockage
- Créer un ensemble de validation qui permet de tester la qualité d'un modèle (vrai, proche de vrai, proche de vrai mais faux et complettement faux). Donnée provenantente de pubmed et autre part. Source longue et courte.
- Créer un model de score
- Créer un script de test
\ No newline at end of file
......@@ -231,3 +231,15 @@ When using these operators, they are applyed in order. For exemple:
## Source
https://www.ncbi.nlm.nih.gov/home/develop/api/
https://www.ncbi.nlm.nih.gov/books/NBK25501/ (All the books)
### API Source
https://pmc.ncbi.nlm.nih.gov/articles/PMC10220169/#R2
https://www.ncbi.nlm.nih.gov/mesh
https://www.youtube.com/watch?v=uyF8uQY9wys
https://library.bath.ac.uk/pubmed/keyword-search
https://research.library.gsu.edu/c.php?g=115556&p=753156
https://en.wikipedia.org/wiki/PubMed
https://library-guides.ucl.ac.uk/pubmed/simple-search-explained
https://www.youtube.com/watch?v=ZdfAd_xFNDw
https://hslguides.osu.edu/pubmed/automatic-term-mapping
\ No newline at end of file
api/model/img/GptClassificationResult.png

33.9 KiB

......@@ -11,3 +11,16 @@ The model performs a task without having seen any specific examples for that tas
### Few-shot learning
The model performs a task by being given a few examples (a handful of labeled data points) for that specific task.
## Models
### GPT
Il est possible d'utiliser le model d'OpenAI pour faire de la classification de texte.
#### Query:
Voici un texte : Cardiovascular events are frequent among individuals with prediabetes. And the relationship between cardiovascular diseases and elevated serum uric acid (SUA) levels has been supported by extensive scientific evidence. However, there remains controversy regarding the correlation between elevated SUA and prediabetes. The aim of this study was to investigate the association between elevated SUA levels and the prevalence of prediabetes and gender differences in the association. A total of 190,891 individuals who participated in health checkups at the Health Promotion Center of Sir Run Run Shaw Hospital of Zhejiang University from January 2017 to December 2021 were included in this cross-sectional study. The health checkups were carried out by trained general practitioners and nurses. The diagnostic criteria for diabetes and prediabetes are defined in the Standards of Medical Care in Diabetes-2022. The association between SUA levels and diabetes and prediabetes was examined based on logistic regression analysis. The dose-response effect between SUA levels and diabetes and prediabetes in both sexes was assessed using a restricted cubic spline (RCS) regression model. Among 190,891 participants, this study included 106,482 males (55.8%) and 84,409 females (44.2%). There were 46,240 (24.2%) patients with prediabetes and 20,792 (10.9%) patients with diabetes. SUA was divided into quartiles (Q). Compared to the SUA Q1 group, the prevalence of prediabetes was elevated in the SUA Q4 group (OR = 1.378, 95% CI = 1.321-1.437), but diabetes risk was decreased in the SUA Q4 group (OR = 0.690, 95% CI = 0.651-0.730). We found that SUA levels were correlated with prediabetes more significantly in male subjects (OR = 1.328, 95% CI = 1.272-1.386) than in female subjects (OR = 1.184, 95% CI = 1.122-1.249) (P for interaction < .001). Higher SUA levels were strongly related to an elevated prevalence of prediabetes but a decreased prevalence of diabetes. The association of SUA in prediabetes was more significant in men. Évalue la probabilité que ce texte parle de : ["Diabetes", "Cancer", "Chronic respiratory disease", "Cardiovascular diseases", "Mental Health", "Diabetes type 1", "Diabetes type 2"]. Donne un pourcentage pour chaque mot-clé.
#### Résultat
![GPT text classification request](./img/GptClassificationResult.png)
\ No newline at end of file
......@@ -23,7 +23,7 @@ label_dictionary = Dictionary()
for label in mots_cles:
label_dictionary.add_item(label)
#tars.add_and_switch_to_new_task("classification_par_mots_cles", label_dictionary=label_dictionary, label_type="classification")
tars.add_and_switch_to_new_task("classification_par_mots_cles", label_dictionary=mots_cles, label_type="classification")
texte = """
Medicine
......@@ -33,7 +33,7 @@ Cardiovascular events are frequent among individuals with prediabetes. And the r
sentence = Sentence(texte)
tars.predict_zero_shot(sentence, mots_cles)
tars.predict(sentence)
print(sentence.labels)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment