dformoso /
sklearn-classification
Data Science Notebook on a Classification Task, using sklearn and Tensorflow.
Loading repository data…
MEROO1010 / repository
A machine learning project to predict 42 diseases from 132 medical parameters using Decision Tree, Random Forest, and SVM. Built with Python, Scikit-learn, and Jupyter Notebook.
This project aims to predict 42 different types of diseases based on 132 medical parameters using machine learning techniques. The model assists physicians in diagnosing diseases accurately and efficiently by analyzing patient symptoms and medical history.
The project includes:
disease-prediction-ml/
│
├── data/
│ ├── Training_data.csv # Training dataset (4920 samples, 133 features)
│ └── Testing_data.csv # Testing dataset (42 samples, 132 features)
│
├── notebooks/
│ └── disease_prediction.ipynb # Jupyter Notebook for EDA, preprocessing, training, and evaluation
│
├── models/
│ └── disease_prediction_model.pkl # Saved trained model (Decision Tree)
│
├── src/
│ ├── prediction.py # Script for making predictions on new data
│ └── utils.py # Utility functions (e.g., preprocessing)
│
├── requirements.txt # Python dependencies
├── README.md # Project documentation
└── .gitignore # Files to ignore in Git
requirements.txt)Clone the repository:
git clone https://github.com/your-username/disease-prediction-ml.git
cd disease-prediction-ml
Install dependencies:
pip install -r requirements.txt
Open the Jupyter Notebook:
jupyter notebook
Navigate to the notebooks/ folder and open disease_prediction.ipynb.
Open disease_prediction.ipynb and run the cells in Step 1 to explore the dataset. Visualize feature distributions, correlations, and target variable distributions. 2. Data Preprocessing
Run the cells in Step 2 to:
Handle missing values. Encode categorical variables. Normalize numerical features. Split the data into training and testing sets.
Run the cells in Step 3 to train the following models:
Decision Tree Random Forest SVM (Support Vector Machine)
The best model is saved as disease_prediction_model.pkl in the models/ folder. 4. Model Evaluation
Run the cells in Step 4 to evaluate the models using:
Accuracy Classification report (precision, recall, F1-score) Confusion matrix
Use the prediction.py script to predict diseases for new patient data:
python src/prediction.py
-Ensure the new data is in the same format as the training data (132 features, no target column).
Description
Source: Kaggle - Disease Prediction Dataset Features: 132 medical parameters (symptoms, medical history, etc.) Target: 42 disease types (e.g., Fungal infection, Allergy, Diabetes, etc.) Training Data: 4920 samples Testing Data: 42 samples Features The dataset includes symptoms and medical observations such as:
itching, skin_rash, nodal_skin_eruptions fever, cough, headache fatigue, weight_loss, anxiety And 129 other parameters. Target Variable
prognosis: The predicted disease (42 unique classes).
| Model | Accuracy (Expected) | Description |
|---|---|---|
| Decision Tree | ~98% | Simple, interpretable model for classification. |
| Random Forest | ~99% | Ensemble of decision trees for improved accuracy. |
| SVM (Support Vector Machine) | ~97% | Effective for high-dimensional data. |
Example Output
Decision Tree Accuracy: 0.9876 Classification Report: precision recall f1-score support Fungal infection 1.00 1.00 1.00 10 Allergy 1.00 1.00 1.00 10 ...
A confusion matrix is generated for each model to visualize performance.
Contributions are welcome! Here’s how you can contribute:
Areas for Improvement
This project is licensed under the MIT License. See the LICENSE file for details.
For questions or feedback, feel free to reach out:
Selected from shared topics, language and repository description—not editorial ratings.
dformoso /
Data Science Notebook on a Classification Task, using sklearn and Tensorflow.
AlexIoannides /
Python Machine Learning (ML) project that demonstrates the archetypal ML workflow within a Jupyter notebook, with automated model deployment as a RESTful service on Kubernetes.
dr-mushtaq /
A complete A-Z guide to Machine Learning and Data Science using Python. Includes implementation of ML algorithms, statistical methods, and feature selection techniques in Jupyter Notebooks. Follow Coursesteach for tutorials and updates.
Apaulgithub /
This project showcases iris flower classification using machine learning. It's a beginner-friendly example of data science and classification techniques. Explore the code, Jupyter Notebook, and enhance your data science skills.
yrtnsari /
The project is a simple sentiment analysis using NLP. The project in written in python with Jupyter notebook. It shows how to do text preprocessing (removing of bad words, stop words, lemmatization, tokenization). It further shows how to save a trained model, and use the model in a real life suitation. The machine learning model used here is k-Nearest Neighbor which is used to build the model. Various performance evaluation techniques are used, and they include confusion matrix, and Scikit-learn libraries classification report which give the accuracy, precision, recall and f1- score preformance of the model. The target values been classified are positive and negative review.
SiddheshBangar /
The "Learn-Machine-Learning" repository on GitHub is a collection of resources and code examples aimed at helping beginners learn the basics of machine learning. The repository includes various Jupyter notebooks and Python scripts that cover topics such as data preprocessing, regression, classification and clustering.