Learning with Subset Stacking
Project description
Learning with Subset Stacking (LESS)
LESS is a 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. You can find the details about LESS in our manuscript.
Installation
Install LESS from PyPI:
pip install less-learn
Getting Started
Below is a simplified example of how to use LESS
from sklearn.datasets import make_regression
from sklearn.model_selection import train_test_split
from sklearn.metrics import mean_squared_error
from less import LESSBRegressor
# Generate a synthetic regression dataset
X, y = make_regression(n_samples=1000, n_features=20, random_state=42)
# Split into training and testing sets
X_train, X_test, y_train, y_test = train_test_split(
X, y, test_size=0.3, random_state=42
)
# Initialize and train the LESS model
less_model = LESSBRegressor(random_state=42)
less_model.fit(X_train, y_train)
# Make predictions and evaluate performance
y_pred = less_model.predict(X_test)
mse = mean_squared_error(y_test, y_pred)
print(f"Test MSE of LESS: {mse:.2f}")
Note: LESS employs Euclidean distances combined with a radial basis function (RBF) kernel by default. It is therefore highly recommended to scale or normalize input features prior to model training to ensure optimal performance.
Citation
Our software can be cited as:
@misc{LESS,
author = "Ilker Birbil",
title = "LESS: Learning with Subset Stacking",
year = 2025,
url = "https://github.com/sibirbil/LESS/"
}
Project details
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 less_learn-0.4.0.tar.gz.
File metadata
- Download URL: less_learn-0.4.0.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50b7055cf852f03b8532496c1ea946d7f72ca3585ab450c345372990968c4dd3
|
|
| MD5 |
bb89bc1e15517070b423136a8d5fa4c1
|
|
| BLAKE2b-256 |
c526b0f65284ae5e886a18fb07d49d30e9ea841a420feb5f8f9f6ba02400378a
|
File details
Details for the file less_learn-0.4.0-py3-none-any.whl.
File metadata
- Download URL: less_learn-0.4.0-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1957613c265c6ac35a24f3d03a5059c30aa5958d45a6b06af375bfd31a61457
|
|
| MD5 |
cb9a81bb2bd2c6f13f324ed8bb8df345
|
|
| BLAKE2b-256 |
35942b3eb1608d62787f42f6172e6804c909b846782fe04f2ab214113fd49842
|