Skip to main content

Ellipsoidal RBF network regressor with gradient-optimized anisotropic widths

Project description

erbf

Ellipsoidal RBF network regressor with gradient-optimised anisotropic widths.

PyPI version Tests

Installation

pip install erbf

Quick start

from erbf import ERBFRegressor
from sklearn.datasets import make_friedman1
from sklearn.model_selection import train_test_split

X, y = make_friedman1(n_samples=1000, random_state=42)
X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=42)

model = ERBFRegressor(n_rbf=40, random_state=42)
model.fit(X_train, y_train)
print(f"R2: {model.score(X_test, y_test):.3f}")

Key features

  • Anisotropic widths --- per-feature per-RBF width parameters capture axis-aligned structure
  • Gradient optimisation --- L-BFGS-B in log-space with analytical gradients; O(n K d) per iteration
  • Modular initialisation --- Lipschitz-guided centre placement, local-Ridge width initialisation
  • scikit-learn compatible --- fit/predict/score, clone(), get_params()/set_params()

How it works

ERBFRegressor places K radial basis functions in the feature space, each with a per-dimension width vector that controls sensitivity along each axis. Centres are initialised by sampling from high-gradient regions (Lipschitz-guided), widths are initialised via local Ridge regression coefficients, then both widths and output weights are jointly refined. Width optimisation operates in log-space via L-BFGS-B with analytical gradients, preventing width collapse and ensuring a smooth loss landscape.

Parameters

Parameter Default Description
n_rbf 40 Number of RBF centres ('auto' for adaptive)
center_init 'lipschitz' Centre placement: 'lipschitz', 'kmeans', 'random'
width_init 'local_ridge' Width initialisation: 'local_ridge', 'local_variance', 'uniform'
width_mode 'full' Parameterisation: 'full' (K*d), 'shared' (d), 'isotropic' (K)
width_optim 'gradient' Optimisation: 'gradient' (L-BFGS-B) or None
alpha 1.0 Ridge regularisation strength
standardize True Standardise features before fitting

Citation

@article{gerber2026revisiting,
  title={Revisiting Chebyshev Polynomial and Anisotropic RBF Models for Tabular Regression},
  author={Gerber, Luciano and Lloyd, Chris},
  year={2026}
}

Licence

MIT

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

erbf-0.1.0.tar.gz (20.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

erbf-0.1.0-py3-none-any.whl (22.7 kB view details)

Uploaded Python 3

File details

Details for the file erbf-0.1.0.tar.gz.

File metadata

  • Download URL: erbf-0.1.0.tar.gz
  • Upload date:
  • Size: 20.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for erbf-0.1.0.tar.gz
Algorithm Hash digest
SHA256 82d15d2b32110a63debb964419d74cfe0bb40ad5432795be39de15b6f1de8f48
MD5 d0c1977060b1bdf1df4158ec6cd6bf2a
BLAKE2b-256 4eda9b93f8dd750bbcc0f3ae27607d72117612a1110aa19c8a8b77a6c05054b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for erbf-0.1.0.tar.gz:

Publisher: publish.yml on gerberl/erbf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file erbf-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: erbf-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 22.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for erbf-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6f6f5963fbee1e88dece39d390aeb7667c5c7ae0e8c3aa8a39e53a2a33af1fe0
MD5 f0a23604d92db9c75b8ef9733a16b9f6
BLAKE2b-256 563a535d3cb378b59ef721def6fafbd9d2ddb8b876242ab4c6a832093547d6ca

See more details on using hashes here.

Provenance

The following attestation bundles were made for erbf-0.1.0-py3-none-any.whl:

Publisher: publish.yml on gerberl/erbf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page