XBNet - Xtremely Boosted Network
Boosted neural network for tabular data
XBNET that is built on PyTorch combines tree-based models with neural networks to create a robust architecture that is trained by using a novel optimization technique, Boosted Gradient Descent for Tabular Data which increases its interpretability and performance.Boosted Gradient Descent is initialized with the feature importance of a gradient boosted tree, and it updates the weights of each layer in the neural network in two steps:
- Update weights by gradient descent.
- Update weights by using feature importance of a gradient boosted tree in every intermediate layer.
Features
- Better performance, training stability and interpretability for tabular data.
- Easy to implement with rapid prototyping capabilities
- Minimum Code requirements for creating any neural network with or without boosting
Installation :
pip install --upgrade git+https://github.com/Hungry-Hippoos/Ajnabee-server.git
###Example for using
import torch
import numpy as np
import pandas as pd
from sklearn.preprocessing import LabelEncoder
from sklearn.model_selection import train_test_split
from XBNet.models import XBNETClassifier
from XBNet.training_utils import training,predict
from XBNet.run import run_XBNET
data = pd.read_csv('Breast_Cancer.csv')
print(data.shape)
x_data = data[data.columns[2:-1]]
print(x_data.shape)
y_data = data[data.columns[1]]
le = LabelEncoder()
y_data = np.array(le.fit_transform(y_data))
X_train,X_test,y_train,y_test = train_test_split(x_data.to_numpy(),y_data,test_size = 0.3,random_state = 0)
model = XBNETClassifier(X_train,y_train,2)
criterion = torch.nn.BCELoss()
optimizer = torch.optim.Adam(model.parameters(), lr=0.01)
m,acc, lo, val_ac, val_lo = run_XBNET(X_train,X_test,y_train,y_test,model,criterion,optimizer,32,1)
print(predict(m,x_data.to_numpy()[0,:]))
Reference
If you make use of this software for your work, we would appreciate it if you would cite us:
@misc{sarkar2021xbnet,
title={XBNet : An Extremely Boosted Neural Network},
author={Tushar Sarkar},
year={2021},
eprint={2106.05239},
archivePrefix={arXiv},
primaryClass={cs.LG}
}
Features to be added :
- Metrics for different requirements
- Addition of some other types of layers
Metadata
Release files for XBNet 1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| XBNet-1-py3-none-any.whl | Python 3 | none | any | Details for XBNet-1-py3-none-any.whl |
Release files / XBNet-1-py3-none-any.whl
| Download URL | XBNet-1-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9178a19c881ee63788b6cb13a32768214cfe480edc9764bdf6fe5ff92edf66a7
|
|
BLAKE2b-256 checksum How to use checksums |
ed7b272a576cd1c4db1f4cbf90f311cece378ead5e3c3aa27d0d3885095ff409
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.3.0 pkginfo/1.5.0.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
|
Security for XBNet 1
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.