Skip to main content

Got it! Here's the full README.md as one continuous markdown block, without unnecessary spacing between sections — just like your screenshot style.

# PyCodeML
**PyCodeML** is a Python package designed to automate the training, evaluation, tuning, and selection of the best-performing machine learning models for regression, classification, and clustering tasks. It simplifies the process of model training, comparison, tuning, and deployment.

## ✅ Features
- Supports **Regression**, **Classification**, and **Clustering** tasks  
- Evaluates multiple models and selects the best one  
- **Hyperparameter tuning** support for optimized performance  
- Saves and loads trained models for future use  
- Simple and intuitive API for fast prototyping and deployment  
## 📦 Installation

pip install PyCodeML

💻 Usage

1️⃣ Train and Save the Best Regression Model

import pandas as pd
from PyCodeML.regressor import RegressorTrainer  # For regression tasks

df = pd.read_csv("data.csv")

trainer = RegressorTrainer(df, "target", data_sample_percent=100)
best_model = trainer.train_and_get_best_model()

trainer.save_best_model("best_regression_model.pkl")

2️⃣ Train and Save the Best Classification Model

import pandas as pd
from PyCodeML.classifire import ClassifierTrainer  # For classification tasks

df = pd.read_csv("classification_data.csv")

trainer = ClassifierTrainer(df, "label", data_sample_percent=100)
best_model = trainer.train_and_get_best_model()

trainer.save_best_model("best_classifier_model.pkl")

3️⃣ Tune the Best Regression Model

from PyCodeML.tunner import RegressorTuner

tuner = RegressorTuner(
    dataset=df,
    target_column="target",
    model_name="Random Forest"  # Must match one of the supported models
)

tuned_model, score = tuner.tune()

4️⃣ Tune the Best Classification Model

from PyCodeML.tunner import ClassifierTuner

tuner = ClassifierTuner(
    dataset=df,
    target_column="label",
    model_name="Random Forest Classifier"
)

tuned_model = tuner.tune()

5️⃣ Train and Save the Best Clustering Model

import pandas as pd
from PyCodeML.clustering import ClusteringTrainer

df = pd.read_csv("unsupervised_data.csv")

trainer = ClusteringTrainer(df, n_clusters=3, data_sample_percent=100)
best_model = trainer.train_and_get_best_model()

trainer.save_best_model("best_clustering_model.pkl")

6️⃣ Load and Use the Saved Model

import pandas as pd
from PyCodeML.utils import load_model

model = load_model("best_model.pkl")

new_data = pd.read_csv("new_data.csv")
predictions = model.predict(new_data)

print("Predicted Values:", predictions)

7️⃣ Label Data Using Clustering

labeled_df = trainer.label_data()
print(labeled_df.head())

📊 Supported Models

Regression

  • Linear Regression
  • Decision Tree Regressor
  • Random Forest Regressor
  • Support Vector Regressor (SVR)
  • Gradient Boosting Regressor
  • Ridge Regression
  • Lasso Regression
  • Elastic Net

Classification

  • Logistic Regression
  • Random Forest Classifier
  • Support Vector Machine (SVM)
  • Decision Tree Classifier
  • Gradient Boosting Classifier
  • K-Nearest Neighbors (KNN)

Clustering

  • KMeans
  • DBSCAN
  • Agglomerative Clustering

🤝 Contributing

Contributions are welcome! If you'd like to improve this package, feel free to fork the repository and submit a pull request.

🔗 GitHub

https://github.com/Nachiket858/PyCodeML

Release files for pycodeml 0.0.20

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pycodeml 0.0.20
File Size Uploaded
pycodeml-0.0.20.tar.gz 8.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pycodeml 0.0.20
File Interpreter ABI Platform
pycodeml-0.0.20-py3-none-any.whl Python 3 none any Details

Total release size: 17.6 kB

Release files / pycodeml-0.0.20.tar.gz

Download URL pycodeml-0.0.20.tar.gz
Size 8.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c45adafa6a36bc7abb6d4dcbdb79595462875b42fb16ba67d309d296faeb31b6
BLAKE2b-256 checksum
How to use checksums
8521cc03d6505653050369b4b17d1a145f7ed87889451069bdbefce8ec0db0c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.7

Release files / pycodeml-0.0.20-py3-none-any.whl

Download URL pycodeml-0.0.20-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
76996d52bb472ff451c5aa7462f91a7666e3a3180a5db57d3ead2db96dcc5fc5
BLAKE2b-256 checksum
How to use checksums
d895cf96571544fb511eabb3be68b8edba59572d7e7866e3a1f37d71595e09e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.7

Release history Release notifications | RSS feed

This release

0.0.20 This release

2 release files

0.0.19

2 release files

0.0.18

2 release files

0.0.16

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.10

2 release files

0.0.9

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page