A TabularGRPO classifier package
Project description
TabularGRPO
Overview
TabularGRPO
Dataset
Dataset download url: https://zenodo.org/records/15081413. After you download, please drop in data/ folder
Project Structure
The project structure is as follows:
tabulargrpo: Root directoryREADME.md: the reamdedata: Data directorysynthetic_data_small.csv: Download dataset and drop here
models: Model directoryMoETransformer.py: MoETransformer model
tabulargrpo_classifier.py: Training scriptdemo.py: Demo script
Features
- Tabular Classifier: Tabular Data Training
- MoE Transformer: MoE Transformer
- GRPO: GRPO
Installation
To install the TabularGRPO project, follow these steps:
- Clone the repository:
git clone https://github.com/yourusername/tabulargrpo.git
- Navigate to the project directory:
cd tabulargrpo
- Install the required dependencies:
pip install -r requirements.txt
Usage
To use the TabularGRPO train, run the following command:
from tabulargrpo_classifier import TabularGRPOClassifier
from models.transformer_moe import MoETransformer
from sklearn.datasets import make_classification
from sklearn.model_selection import train_test_split
X, y = make_classification(n_samples=5000, n_features=14, n_classes=2, random_state=42)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
classifier = TabularGRPOClassifier(model_class=MoETransformer,input_dim=14, num_classes=2, epochs=10,group_size=10)
classifier.fit(X_train,y_train)
To use the TabularGRPO evaluate, run the following command:
from tabulargrpo_classifier import TabularGRPOClassifier
from models.transformer_moe import MoETransformer
from sklearn.datasets import make_classification
from sklearn.model_selection import train_test_split
X, y = make_classification(n_samples=5000, n_features=14, n_classes=2, random_state=42)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
classifier = TabularGRPOClassifier(model_class=MoETransformer,input_dim=14, num_classes=2, epochs=10,group_size=10)
classifier.fit(X_train,y_train)
classifier.evaluate(X_test, y_test)
To use the TabularGRPO predict, run the following command:
from tabulargrpo_classifier import TabularGRPOClassifier
from models.transformer_moe import MoETransformer
from sklearn.datasets import make_classification
from sklearn.model_selection import train_test_split
X, y = make_classification(n_samples=5000, n_features=14, n_classes=2, random_state=42)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
classifier = TabularGRPOClassifier(model_class=MoETransformer,input_dim=14, num_classes=2, epochs=10,group_size=10)
classifier.fit(X_train,y_train)
classifier.evaluate(X_test, y_test)
data = [[0,0,0,0]]
p = classifier.predict(data)
print(p)
To use the TabularGRPO demo, run the following command:
python demo.py
Contributing
We welcome contributions to the TabularGRPO project. To contribute, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Commit your changes and push to your branch.
- Create a pull request with a detailed description of your changes.
License
This project is licensed under the MIT License. See the LICENSE file for more details.
Contact
For any questions or inquiries, please contact us at enkhtogtokh.java@gmail.com.
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 tabulargrpo-0.1.3.tar.gz.
File metadata
- Download URL: tabulargrpo-0.1.3.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a70a5b073e05d074c9da9157942bd0c5feb7f2b3dca755ac7ab574df664a22e
|
|
| MD5 |
bbbfd873cef3c057741dcd30848627bc
|
|
| BLAKE2b-256 |
14dda15ce8d7188ff0383813a00e3cb7527e4fbf54cfa231a9c775ac001e193d
|
File details
Details for the file tabulargrpo-0.1.3-py3-none-any.whl.
File metadata
- Download URL: tabulargrpo-0.1.3-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abf2e9c2887091c99ca50acbeeb314b66978b4ebc994ca1a44afca69f312fb01
|
|
| MD5 |
ad32da5493ff7c6a031b5f06361a6267
|
|
| BLAKE2b-256 |
72e0beebd529cb5de3757d28065d36f86947b8901eee7b471028890ab1517694
|