- Python 3.x
- Docker (for TensorFlow Serving)
- Operating system: Ubuntu 20.04
-
Description: This dataset is designed for predicting in-hospital mortality and may include patient records, clinical measurements, and outcomes.
-
Data Format: [Specify the format of the dataset, e.g., CSV, JSON.]
-
Data Fields: [List and describe the key fields or columns in the dataset. You can find this information on the Kaggle dataset page.]
-
Data Usage: This dataset can be used for predicting in-hospital mortality, healthcare analytics, and machine learning research.
-
License: Please refer to the Kaggle dataset page for information regarding the dataset's license and terms of use.
-
Download Link: You can download the dataset from the Kaggle dataset page.
[Include any specific guidelines or instructions for users who want to use the dataset, such as data preprocessing steps or ethical considerations.]
-
setup the project:
virtualenv venv source venv/bin/activate
-
run the code@
```bash python in_hospital_mortality/lr/main.py --l2 --C 0.001 --output_dir in_hospital_mortality/lr/ ```
```bash python ptbdb/baseline.py ```
```bash python xgboost/main.py --output_dir in_hospital_mortality/xgboost/ ```
Train
python phenotyping/rnn/main.py --network models/lstm.py --dim 256 --timestep 1.0 --depth 1 --dropout 0.3 --mode train --batch_size 8 --output_dir phenotyping/
Train & Test
python phenotyping/xgboost/main.py --output_dir phenotyping/xgboost/
Train & Test
python phenotyping/lightgbm/main.py --output_dir phenotyping/lightgbm/
Train & Test
python phenotyping/xgboost_FBFE/main.py --timestep 1.0 --output_dir phenotyping/xgboost_FBFE/
-
Deploy into tf_serving:
Download the TensorFlow Serving Docker image
docker pull tensorflow/serving
Location of demo models
model="$(pwd)/export_tf/moritality"
Start TensorFlow Serving container and open the REST API port
docker run -t --rm -p 8501:8501 \ -v "$model:/models" \ -e MODEL_NAME=ann_baseline \ tensorflow/serving &
-
Query the model using the predict API
curl -d '{"instances": [[1.0, 2.0, 5.0]]}' \ -X POST http://localhost:8501/v1/models/cnn_baseline:predict
Returns => { "predictions": [2.5, 3.0, 4.5] }