Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

harryplotter-0.1.0.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

harryplotter-0.1.0-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

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

Hashes for harryplotter-0.1.0.tar.gz
Algorithm Hash digest
SHA256 02bfec9a1f1bf2e6037229af69e55477568efbbf94187d6cf2e6d27d5f57bb15
MD5 b2fe30d6bb65f73b5e136b77dac72269
BLAKE2b-256 0dbc60a05874655cf16491a78b606df0e780465fdfc200cefda89ee221b9f458

See more details on using hashes here.

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

Hashes for harryplotter-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6478a4b88998369f74939c0840ab71e5082f614c94eb28ef6d9ab96422941264
MD5 09e16ca82e6752698d53a4b96873041d
BLAKE2b-256 5a7cd0b0cab1f62107f1124541594b97c1bb60ea32bc3c3ae6fda7848690e71c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page