OrdinalGBT
Introduction
OrdinalGBT, which stands for Ordinal gradient boosted trees, is a Python package that implements an ordinal regression loss function using the lightGBM framework. Ordinal regression is a type of regression analysis used for predicting an ordinal variable, i.e. a variable that can be sorted in some order. LightGBM is a gradient boosting framework that uses tree-based learning algorithms and is designed to be distributed and efficient.
Installation
You can install OrdinalGBT using pip:
pip install ordinalgbt
Usage
Here are a few examples on how to use the LGBMOrdinal class:
- Fitting the model
from ordinalgbt.lgb import LGBMOrdinal
import numpy as np
# Create the model
model = LGBMOrdinal()
# Generate some data
X = np.random.rand(100, 10)
y = np.random.randint(0, 3, 100)
# Fit the model
model.fit(X, y)
- Predicting with the model
After fitting the model, you can use it to make predictions:
# Generate some new data
X_new = np.random.rand(10, 10)
# Use the model to make predictions
# the .predict method returns the class prediction rather than raw score or
# probabilities
y_pred = model.predict(X_new)
print(y_pred)
- Predicting probabilities with the model
The predict_proba method can be used to get the probabilities of each class:
# Use the model to predict probabilities
y_proba = model.predict_proba(X_new)
print(y_proba)
Metadata
Release files for ordinalgbt 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ordinalgbt-0.1.2.tar.gz | 10.7 kB | Without provenance | Details for ordinalgbt-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ordinalgbt-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for ordinalgbt-0.1.2-py3-none-any.whl |
Total release size: 19.4 kB
Release files / ordinalgbt-0.1.2.tar.gz
| Download URL | ordinalgbt-0.1.2.tar.gz |
|---|---|
| Size | 10.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a306202d94691e15bf32a81a310b45c272483ffd1406903a86188a554a94953e
|
|
BLAKE2b-256 checksum How to use checksums |
89b5243d1a20aca39a47f646b9ea49bfb1ed4dc7143cb803871a58a29b311278
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Release files / ordinalgbt-0.1.2-py3-none-any.whl
| Download URL | ordinalgbt-0.1.2-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cd8c7e45c53af89c28227d65d0837bbc27179b9d8971c0df972d999133bd2e08
|
|
BLAKE2b-256 checksum How to use checksums |
d82a6bdd43a3b81faabd1c4074881b258e436ec91fd6585c11aaa952f22350d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Security for ordinalgbt 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.