amonfortc commited on
Commit
7a9d3f2
·
verified ·
1 Parent(s): 0a108ee

Delete README.md.txt

Browse files
Files changed (1) hide show
  1. README.md.txt +0 -154
README.md.txt DELETED
@@ -1,154 +0,0 @@
1
- ---
2
- title: FibroPred Predictive System
3
- emoji: 🩺
4
- colorFrom: indigo
5
- colorTo: blue
6
- sdk: gradio
7
- sdk_version: "3.35.0"
8
- app_file: app.py
9
- pinned: false
10
- ---
11
-
12
- ### README: **FibroPred Predictive System**
13
-
14
- ---
15
-
16
- #### **Description**
17
- FibroPred is a predictive system designed to analyze clinical data and provide predictions for specific medical outcomes related to fibrosis. The tool employs machine learning models, primarily Random Forest classifiers, to forecast the likelihood of various events or conditions, such as mortality, necessity for transplantation, and progressive disease.
18
-
19
- The system provides an easy-to-use interface built with Gradio, allowing users to input feature values and obtain predictions. Models and their configurations are stored and loaded dynamically, ensuring modularity and adaptability.
20
-
21
- ---
22
-
23
- #### **Features**
24
- 1. **Prediction Targets**:
25
- - **Death**: Likelihood of patient mortality based on clinical and diagnostic features.
26
- - **Binary Diagnosis**: Classification of patients into specific diagnostic categories.
27
- - **Necessity of Transplantation**: Assessment of whether a patient is likely to need a transplant.
28
- - **Progressive Disease**: Prediction of disease progression based on longitudinal data.
29
-
30
- 2. **Dynamic Model Loading**: Models and feature sets are loaded dynamically from a pre-configured directory (`models`).
31
-
32
- 3. **Gradio Interface**: A tabbed interface for each prediction target, where users can input values interactively and receive predictions in real-time.
33
-
34
- ---
35
-
36
- #### **Predictive Features**
37
- Below are the features used for prediction across all targets:
38
-
39
- 1. **Pedigree** (0 - 67):
40
- Represents the familial history related to fibrotic conditions. Higher values indicate a greater genetic predisposition.
41
-
42
- 2. **Age at diagnosis** (36.0 - 92.0):
43
- Age of the patient at the time of diagnosis. A critical factor as progression and treatment response vary with age.
44
-
45
- 3. **FVC (L) at diagnosis** (0.0 - 5.0):
46
- Forced vital capacity in liters at the time of diagnosis, reflecting lung function.
47
-
48
- 4. **FVC (%) at diagnosis** (0.0 - 200.0):
49
- Forced vital capacity as a percentage of the expected value for the patient’s age and sex.
50
-
51
- 5. **DLCO (%) at diagnosis** (0.0 - 200.0):
52
- Diffusion capacity for carbon monoxide as a percentage, measuring gas exchange efficiency in the lungs.
53
-
54
- 6. **RadioWorsening2y** (0 - 3):
55
- Radiological assessment of lung deterioration over two years. Higher values indicate significant progression.
56
-
57
- 7. **Severity of telomere shortening - Transform 4** (1 - 6):
58
- Indicates the degree of telomere shortening. Higher values reflect greater telomeric damage.
59
-
60
- 8. **Progressive disease** (0 - 1):
61
- Binary variable indicating whether the disease is progressive (1) or stable (0).
62
-
63
- 9. **Antifibrotic Drug** (0 - 1):
64
- Binary variable representing the use of antifibrotic drugs. 1 indicates use; 0 indicates none.
65
-
66
- 10. **Prednisone** (0 - 1):
67
- Binary variable reflecting prednisone usage. 1 indicates use; 0 indicates none.
68
-
69
- 11. **Mycophenolate** (0 - 1):
70
- Binary variable indicating mycophenolate usage. 1 indicates use; 0 indicates none.
71
-
72
- 12. **FVC (L) 1 year after diagnosis** (0.0 - 5.0):
73
- Forced vital capacity in liters one year after diagnosis, used to evaluate changes in lung function.
74
-
75
- 13. **FVC (%) 1 year after diagnosis** (0.0 - 200.0):
76
- Forced vital capacity as a percentage one year after diagnosis.
77
-
78
- 14. **DLCO (%) 1 year after diagnosis** (0.0 - 200.0):
79
- Diffusion capacity for carbon monoxide as a percentage one year after diagnosis.
80
-
81
- 15. **Genetic mutation studied in patient** (0 - 1):
82
- Binary variable indicating the presence of specific genetic mutations. 1 indicates mutation found; 0 indicates none.
83
-
84
- 16. **Comorbidities** (0 - 1):
85
- Binary variable representing the presence of relevant comorbidities. 1 indicates presence; 0 indicates absence.
86
-
87
- ---
88
-
89
- #### **Setup Instructions**
90
- 1. Clone or download the repository.
91
- 2. Ensure Python 3.8+ is installed.
92
- 3. Install dependencies using the command:
93
- ```bash
94
- pip install -r requirements.txt
95
- ```
96
- 4. Place trained models in the `models` directory. Models should be `.pkl` files containing:
97
- - `model`: Trained Random Forest model.
98
- - `features`: Feature list used during model training.
99
-
100
- ---
101
-
102
- #### **Usage**
103
- 1. Run the application:
104
- ```bash
105
- python app.py
106
- ```
107
- 2. Access the Gradio interface through the displayed local or public URL.
108
- 3. Select a prediction tab, input feature values, and click "Submit" to get predictions.
109
-
110
- ---
111
-
112
- #### **Key Scripts**
113
- 1. **app.py**:
114
- - Implements the Gradio interface.
115
- - Maps user-friendly model names to actual models and their features.
116
-
117
- 2. **fibropred_model.py**:
118
- - Contains the preprocessing pipeline, including imputation and feature selection.
119
- - Includes functions for training, evaluation, and visualization.
120
-
121
- 3. **model_utils.py**:
122
- - Functions to load models and their features dynamically.
123
- - Handles predictions using preloaded models.
124
-
125
- 4. **requirements.txt**:
126
- - Lists the Python dependencies required for the system.
127
-
128
- ---
129
-
130
- #### **Technical Highlights**
131
- - **Machine Learning Framework**: Models are built using `scikit-learn`, leveraging Random Forest classifiers for robust predictions.
132
- - **Visualization**: The script includes utilities for plotting feature importance, ROC-AUC curves, and overfitting diagnostics.
133
- - **Dynamic Handling**: Feature lists and models are dynamically linked, ensuring flexibility when adding new prediction targets.
134
-
135
- ---
136
-
137
- #### **Future Improvements**
138
- - Expand model capabilities with additional machine learning algorithms (e.g., Gradient Boosting).
139
- - Integrate longitudinal data analysis for enhanced prediction accuracy.
140
- - Add options for model retraining with new data directly through the interface.
141
-
142
- ---
143
-
144
- This README provides a comprehensive guide to understanding and using the **FibroPred** predictive system effectively.
145
-
146
- ---
147
-
148
- #### **Setup Instructions**
149
- 1. Clone or download the repository.
150
- 2. Ensure Python 3.8+ is installed.
151
- 3. Install dependencies using the command:
152
- ```bash
153
- pip install -r requirements.txt
154
-