Skip to content

This repository contains a machine learning model trained on the Sonar Mine Dataset using Logistic Regression. The project includes data collection, preprocessing, statistical analysis, label encoding, data standardization, model training, evaluation, and visualization of results.

Notifications You must be signed in to change notification settings

Haseebasif7/Sonar-Mine-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Sonar Mine Dataset Project This project demonstrates a comprehensive approach to working with the Sonar Mine Dataset. The primary goal is to classify objects as either mines or rocks using a Logistic Regression model. The project involves data collection, preprocessing, statistical analysis, model training, evaluation, and visualization.

Project Overview • Data Collection • Preprocessing • Statistical Analysis • Label Encoding • Data Standardization • Data Splitting • Model Training • Model Evaluation • Dataset •The dataset used in this project is the Sonar Mine Dataset.

Steps and Workflow

  1. Data Collection The dataset is collected from Kaggle's Sonar Mine DataSet. It consists of 208 instances, each with 60 attributes plus a label indicating whether the instance is a mine (M) or a rock (R).

  2. Preprocessing Data preprocessing involves cleaning the dataset and preparing it for analysis. This step ensures that the data is in a suitable format for further analysis.

  3. Statistical Analysis Basic statistical functions are applied to understand the distribution and characteristics of the data, including mean, median, standard deviation, and correlation.

  4. Label Encoding The categorical labels (M for mines and R for rocks) are converted into numerical format using Label Encoding. This process assigns a unique integer to each category.

  5. Data Standardization The data is standardized to have a mean of 0 and a standard deviation of 1. This step is crucial for ensuring that the features contribute equally to the model's performance.

  6. Data Splitting The dataset is split into training and testing sets. For this project, 90% of the data is used for training, and 10% is used for testing.

  7. Model Training A Logistic Regression model is loaded and trained using the training data. This involves fitting the model to the data and adjusting its parameters to minimize the error.

  8. Model Evaluation The trained model is evaluated on the test data. The evaluation metrics include accuracy, F1 score, and confusion matrix. The classification report provides a detailed breakdown of the model's performance.

Results • Classification Report: Provides precision, recall, and F1 score for each class. • Accuracy: The overall accuracy of the model on the test data. • F1 Score: Harmonic mean of precision and recall, providing a single metric for model performance. • Confusion Matrix: Visual representation of the model's predictions versus actual labels. Contributing Contributions are welcome! Please open an issue or submit a pull request for any enhancements or bug fixes.

About

This repository contains a machine learning model trained on the Sonar Mine Dataset using Logistic Regression. The project includes data collection, preprocessing, statistical analysis, label encoding, data standardization, model training, evaluation, and visualization of results.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published