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 mlpredictor

Install from Source (GitHub)

git clone https://github.com/chrisamerica1995/mlpredictor.git
cd mlpredictor
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

mlpredictorchris-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.

mlpredictorchris-0.1.0-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file mlpredictorchris-0.1.0.tar.gz.

File metadata

  • Download URL: mlpredictorchris-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.12.6

File hashes

Hashes for mlpredictorchris-0.1.0.tar.gz
Algorithm Hash digest
SHA256 91c60d92c1ac9399be9f6914c0355346ee4cb3ad2228b734461f9a981ab9fe97
MD5 8ec9dce8c56234c24702cc01d6ec5caf
BLAKE2b-256 e9475aa351f5fa4f656ab24b8b30a63963c9ef0e25fe249557470dc3e462cad3

See more details on using hashes here.

File details

Details for the file mlpredictorchris-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mlpredictorchris-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6071114b2a6caad6295cdd8b99b4ec17e3e8177d51a178f624c91a57fe0b2e13
MD5 061aae825210509f27e874363f4f179f
BLAKE2b-256 72917ca446d850fe30889114722941ee4433f9deb20cf155d0eb82f2e9001576

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