This repository contains a Jupyter notebook that demonstrates predictive machine learning techniques using Python. The notebook covers various stages of the machine learning workflow, including data loading, exploratory data analysis, model training, and evaluation.
To run this notebook, you need to have Python installed on your machine. You can install the required packages using the following command:
pip install -r requirements.txtThe notebook requires the following Python libraries:
numpypandasmatplotlibscikit-learnscipy
To use this notebook, clone the repository and open the mylearn.ipynb file in Jupyter Notebook or Jupyter Lab:
git clone https://github.com/yellowgoku102/Predictive-ML-using-python.git
cd Predictive-ML-using-python
jupyter notebook mylearn.ipynbThe notebook includes the following sections:
- Library Imports: Importing necessary libraries such as
pandas,matplotlib, andscikit-learn. - Version Check: Checking the versions of
scipyandscikit-learn. - Data Loading: Loading the Iris dataset from a CSV file.
- Data Exploration: Descriptive statistics and visualizations to understand the dataset.
- Data Visualization: Box plots, histograms, and scatter matrix to visualize the data.
- Data Splitting: Splitting the dataset into training and validation sets.
- Model Training: Training various machine learning models including Logistic Regression, Linear Discriminant Analysis, K-Nearest Neighbors, Decision Tree, Naive Bayes, and Support Vector Machine.
- Model Evaluation: Evaluating the models using cross-validation and comparing their performance.
- Final Model: Training the final model using the Support Vector Machine and evaluating its performance on the validation set.
The notebook demonstrates that the Support Vector Machine (SVM) model achieved the highest accuracy on the validation set. The confusion matrix and classification report provide detailed insights into the model's performance.
Feel free to modify this description to better fit your specific needs.