monajm36
commited on
Create __init__.py
Browse files- src/__init__.py +63 -0
src/__init__.py
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
NLP OHCA Classifier
|
| 3 |
+
|
| 4 |
+
A BERT-based classifier for detecting Out-of-Hospital Cardiac Arrest (OHCA)
|
| 5 |
+
cases in medical discharge notes.
|
| 6 |
+
|
| 7 |
+
This package contains two main modules:
|
| 8 |
+
|
| 9 |
+
1. ohca_training_pipeline: Complete training pipeline from annotation to model training
|
| 10 |
+
2. ohca_inference: Apply pre-trained models to new datasets
|
| 11 |
+
"""
|
| 12 |
+
|
| 13 |
+
# Training pipeline imports
|
| 14 |
+
from .ohca_training_pipeline import (
|
| 15 |
+
create_training_sample,
|
| 16 |
+
prepare_training_data,
|
| 17 |
+
train_ohca_model,
|
| 18 |
+
evaluate_model,
|
| 19 |
+
complete_training_pipeline,
|
| 20 |
+
complete_annotation_and_train,
|
| 21 |
+
OHCATrainingDataset
|
| 22 |
+
)
|
| 23 |
+
|
| 24 |
+
# Inference imports
|
| 25 |
+
from .ohca_inference import (
|
| 26 |
+
load_ohca_model,
|
| 27 |
+
run_inference,
|
| 28 |
+
quick_inference,
|
| 29 |
+
process_large_dataset,
|
| 30 |
+
test_model_on_sample,
|
| 31 |
+
get_high_confidence_cases,
|
| 32 |
+
analyze_predictions,
|
| 33 |
+
OHCAInferenceDataset
|
| 34 |
+
)
|
| 35 |
+
|
| 36 |
+
__version__ = "1.0.0"
|
| 37 |
+
__author__ = "Mona Moukaddem"
|
| 38 |
+
__email__ = "your.email@example.com"
|
| 39 |
+
|
| 40 |
+
# Training pipeline functions
|
| 41 |
+
__training_functions__ = [
|
| 42 |
+
"create_training_sample",
|
| 43 |
+
"prepare_training_data",
|
| 44 |
+
"train_ohca_model",
|
| 45 |
+
"evaluate_model",
|
| 46 |
+
"complete_training_pipeline",
|
| 47 |
+
"complete_annotation_and_train",
|
| 48 |
+
"OHCATrainingDataset"
|
| 49 |
+
]
|
| 50 |
+
|
| 51 |
+
# Inference functions
|
| 52 |
+
__inference_functions__ = [
|
| 53 |
+
"load_ohca_model",
|
| 54 |
+
"run_inference",
|
| 55 |
+
"quick_inference",
|
| 56 |
+
"process_large_dataset",
|
| 57 |
+
"test_model_on_sample",
|
| 58 |
+
"get_high_confidence_cases",
|
| 59 |
+
"analyze_predictions",
|
| 60 |
+
"OHCAInferenceDataset"
|
| 61 |
+
]
|
| 62 |
+
|
| 63 |
+
__all__ = __training_functions__ + __inference_functions__
|