Learning with Subset Stacking
Project description
Learning with Subset Stacking (LESS)
LESS is a new supervised learning algorithm that is based on training many local estimators on subsets of a given dataset, and then passing their predictions to a global estimator.
Installation
pip install git+https://github.com/sibirbil/LESS.git
Testing
Here is how you can use LESS for regression (we are working on classification):
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.metrics import mean_squared_error
from less import LESSRegressor
# Synthetic dataset (X, y)
xvals = np.arange(-10, 10, 0.1) # domain
num_of_samples = 200
X = np.zeros((num_of_samples, 1))
y = np.zeros(num_of_samples)
for i in range(num_of_samples):
xran = -10 + 20*np.random.rand()
X[i] = xran
y[i] = 10*np.sin(xran) + 2.5*np.random.randn()
# Train and test split
X_train, X_test, y_train, y_test = \
train_test_split(X, y, test_size=0.3)
# LESS fit() & predict()
LESS_model = LESSRegressor()
LESS_model.fit(X_train, y_train)
y_pred = LESS_model.predict(X_test)
print('Test error of LESS: {0:.2f}'.format(mean_squared_error(y_pred, y_test)))
Tutorials
Our two-part tutorial aims at getting you familiar with LESS. If you want to try the tutorials on your own computer, then you also need to install the following additional packages: pandas
, matplotlib
, and seaborn
.
Citation
Our software can be cited as:
@misc{LESS,
author = "Ilker Birbil",
title = "LESS: LEarning with Subset Stacking",
year = 2021,
url = "https://github.com/sibirbil/LESS/"
}
Acknowledgments
We thank Oguz Albayrak for his help with structuring our Python scripts.
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
File details
Details for the file less-learn-0.1.0.tar.gz
.
File metadata
- Download URL: less-learn-0.1.0.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/3.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34522621f15a6a4d2d683db70b05e9c69d71d49db5c7333c0004dec7b1ea97b6 |
|
MD5 | 1ec23e07024f96d3607059800a21207a |
|
BLAKE2b-256 | 0d3e56215300343ce01f00d981ec8c0b42643660c42837be28fbbb86225d9cce |
File details
Details for the file less_learn-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: less_learn-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/3.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 275a29f6ff724c280e8019185d8bbd6d419694b788a634e6203274e72d55eb95 |
|
MD5 | 6edacabad52f9b428445bc1a684ded8f |
|
BLAKE2b-256 | 70f1118ac2d0ced30021a1668b6e02a92a38bab60301301f936a4eb06c52612a |