Acerca de
XCSF learning classifier system: rule-based online evolutionary machine learning
IA y aprendizaje automáticoCrecimiento de estrellas medido
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 0
Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.
README.md
OriginalXCSF learning classifier system
XCSF is an accuracy-based learning classifier system for online supervised and reinforcement learning. Rather than fitting a single global model, it uses an evolutionary algorithm to design a population of rules, each of which matches a region of the input space and predicts with its own simple model (for example, a linear regression or a small neural network).
This repository provides a C implementation that can be built as a stand-alone binary or used as a Python library with a scikit-learn-style interface. See the project wiki for features, build instructions, and usage.
Quick start
Installation
pip install xcsf
Minimal example
Fit y = sin(2πx) using local linear models:
import numpy as np
import xcsf
def f(x):
return np.sin(2 * np.pi * x)
rng = np.random.default_rng(1)
X_train = rng.random((1000, 1))
X_test = np.linspace(0, 1, 200).reshape(-1, 1)
xcs = xcsf.XCS(
x_dim=1,
y_dim=1,
n_actions=1,
pop_size=500,
max_trials=20000,
random_state=1,
loss_func="mse",
e0=0.0001,
alpha=1,
prediction={"type": "rls_linear"},
)
xcs.fit(X_train, f(X_train), verbose=False)
print(f"Test MSE: {xcs.score(X_test, f(X_test)):.1e}") # ~3.1e-05
For more Python examples, see the python folder, which contains scripts and the equivalent notebooks.
Contributing
Contributions to this repository are very welcome.
See our contributing guide for details.
Explorar proyectos relacionados
Cargando…