A simple machine learning package using scikit-learn
Project description
MLPredictor
MLPredictor is a simple machine learning package that trains a RandomForest model using the Iris dataset and enables users to make predictions. The package is built using scikit-learn and is intended as a demonstration of packaging Python machine learning projects for distribution.
Features
- Train a RandomForestClassifier on the Iris dataset.
- Make predictions on new data after training.
- Save and load trained models.
Installation
You can install the package via PyPI or from source.
Install from PyPI
pip install harryplotter
Install from Source (GitHub)
git clone https://github.com/RahulSwami01/Harryplotter.git
cd harryplotter
pip install .
Usage
After installation, you can use MLPredictor to train a model and make predictions.
Example: Training and Making Predictions
from mlpredictor import MLPredictor
# Initialize the predictor
predictor = MLPredictor()
# Train the model on the Iris dataset
predictor.train()
# Make a prediction on a sample input
sample_input = [5.1, 3.5, 1.4, 0.2]
prediction = predictor.predict(sample_input)
print(f"Predicted class: {prediction}")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file harryplotter-0.1.0.tar.gz.
File metadata
- Download URL: harryplotter-0.1.0.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02bfec9a1f1bf2e6037229af69e55477568efbbf94187d6cf2e6d27d5f57bb15
|
|
| MD5 |
b2fe30d6bb65f73b5e136b77dac72269
|
|
| BLAKE2b-256 |
0dbc60a05874655cf16491a78b606df0e780465fdfc200cefda89ee221b9f458
|
File details
Details for the file harryplotter-0.1.0-py3-none-any.whl.
File metadata
- Download URL: harryplotter-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6478a4b88998369f74939c0840ab71e5082f614c94eb28ef6d9ab96422941264
|
|
| MD5 |
09e16ca82e6752698d53a4b96873041d
|
|
| BLAKE2b-256 |
5a7cd0b0cab1f62107f1124541594b97c1bb60ea32bc3c3ae6fda7848690e71c
|