OncoPredict is a project aimed at detecting cancer from blood samples using machine learning and deep learning techniques.
data/: Datasets used for training and testing.notebooks/: Jupyter notebooks for experiments and data exploration.src/: Source code for model training and evaluation.models/: Trained models and their configurations.results/: Results and performance metrics.tests/: Test scripts for validating data and models.
- Clone the repo:
git clone https://github.com/your-username/OncoPredict.git - Install Python dependencies:
pip install tensorflow pandas optuna scikit-learn matplotlib flask gunicorn - Install npm dependencies:
npm install - Run the training script:
npm run train
To run hyperparameter tuning using Optuna, follow these steps:
- Install the required dependencies:
pip install optuna - Run the training script with hyperparameter tuning:
python src/train.py --tune
To generate and view detailed evaluation metrics and visualizations, follow these steps:
- Ensure you have the required dependencies:
pip install scikit-learn matplotlib - Run the training script:
python src/train.py - After training, evaluation metrics will be saved in the
results/metrics.txtfile. - Confusion matrix and ROC curve visualizations will be saved in the
results/directory asconfusion_matrix.pngandroc_curve.pngrespectively.
To deploy the model using Flask, follow these steps:
- Install the required dependencies:
pip install flask gunicorn - Create a
Procfilein the root directory with the following content:web: gunicorn src.app:app - Create a new file
src/app.pywith the Flask application code. - Deploy the application to Heroku or any other cloud platform that supports Flask.
To run the Flask app locally, follow these steps:
- Install the required dependencies:
pip install flask - Run the Flask app:
npm start - Send a POST request to the
/predictendpoint with the input data to get predictions.