Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/massimilianovisintainer/rock-vs-mine-prediction
Rock vs. Mine classification using Logistic Regression
https://github.com/massimilianovisintainer/rock-vs-mine-prediction
machine-learning model numpy pandas sklearn
Last synced: about 23 hours ago
JSON representation
Rock vs. Mine classification using Logistic Regression
- Host: GitHub
- URL: https://github.com/massimilianovisintainer/rock-vs-mine-prediction
- Owner: MassimilianoVisintainer
- Created: 2024-07-24T14:37:00.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-07-24T14:44:54.000Z (2 months ago)
- Last Synced: 2024-09-23T06:32:44.259Z (5 days ago)
- Topics: machine-learning, model, numpy, pandas, sklearn
- Language: Python
- Homepage:
- Size: 33.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rock vs. Mine Prediction
This project implements a machine learning model using Logistic Regression to classify objects as either "Rock" or "Mine" based on sonar data.
## Functionality
Leverages the scikit-learn library for data manipulation and model training.
Loads sonar data from a CSV file.
Preprocesses the data by handling missing values and converting non-numeric data.
Splits the data into training and testing sets for model evaluation.
Trains a Logistic Regression model on the training data.
Evaluates the model's accuracy on both training and testing data.
Provides a prediction system for classifying a new data point as "Rock" or "Mine."
## Dependencies- numpy
- pandas
- scikit-learn
## UsageInstall dependencies:
```Bash
pip install numpy pandas scikit-learn
```Run the script:
```Bash
python Rock_vs_Mine_Prediction.ipynb
```This will execute the code in the Jupyter Notebook, performing data loading, training, evaluation, and prediction.
## Input Data Format
The prediction system expects a list of 60 floating-point numbers representing sonar readings for a single object. You can replace the provided input_data example with your own data.
## Output
The script will print the model's accuracy on the training and testing data, followed by the predicted class ("Rock" or "Mine") for the input data.
## Additional Notes
Ensure the data in your CSV file matches the format expected by the script (60 columns of numeric values, with the last column representing the class label).
## Contributing
Feel free to submit pull requests with improvements or additional functionalities.