Predict Parkinson’s, Heart Disease, and Breast Cancer from medical inputs using trained ML models.
This project uses three different machine learning models trained on respective biomedical datasets to predict the likelihood of three diseases:
- Parkinson’s Disease
- Heart Disease
- Breast Cancer (Malignant or Benign)
Each model takes a specific set of clinical features and outputs whether the disease is likely to be present.
Here is a snapshot of the working Streamlit site:
- Source: UCI Machine Learning Repository
- Samples: 195 voice recordings from 31 individuals
- Features: 22 voice-measurement features
- Target: 0 = Healthy, 1 = Parkinson’s
- Source: UCI Cleveland Heart Disease Dataset
- Samples: 303 patient records
- Features: 13 numerical/categorical health indicators
- Target: 0 = No Heart Disease, 1 = Heart Disease Present
- Source: sklearn.datasets.load_breast_cancer()
- Samples: 569 cases
- Features: 30 tumor-related metrics
- Target: 0 = Malignant, 1 = Benign
numpy– Numerical operationspandas– Data manipulationscikit-learn– Model training & evaluationpickle– Model serializationmatplotlib(optional) – Visualization
Each model was trained independently on its dataset. Preprocessing steps included:
- Handling missing values
- Encoding categorical variables (if needed)
- Feature scaling
- Model selection via cross-validation
Trained models were saved as .sav files using pickle.
The final script:
- Loads each
.savfile usingpickle - Accepts user input for relevant features
- Converts input into correct format
- Makes prediction via the loaded model
Each disease has its own input format and prediction logic.
input_data = [119.992, 157.302, 74.997, 0.00784, 0.00007, 0.00370, 0.00554,
0.00921, 0.04374, 0.426, 0.0204, 0.0095, 0.0135, 0.0179, 0.0037,
21.033, 0.414783, 0.815285, -4.813031, 0.266482, 2.301442, 0.284654]
model = pickle.load(open('parkinsons_model.sav', 'rb'))
prediction = model.predict([input_data])output
[1] → The person has Parkinson's Disease- Python 3.8 or higher
- pip (Python package manager)
git clone https://github.com/your-username/parkinsons-disease-prediction.git
cd parkinsons-disease-predictionpython -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activatepip install -r requirements.txtdownload the multiple-disease-pred.py file in your folder from the repo.
streamlit run \your\saved\py\script\path