Configuration
The v2 code exposes configuration through model constructors and option structs rather than one monolithic ElmConfig. The effective configuration surface is the same: feature stack, solver options, backend, and seed.
Common fields
| Field | Type | Default | Applies to | Notes |
|---|---|---|---|---|
numInputs | std::size_t | required | all models | Input dimension |
numHiddenNodes | std::size_t | required | BatchElm, OsElm, OsCelm | Additive hidden-node count |
hiddenNodesPerLayer | std::vector<std::size_t> | required | MlElm, HierarchicalOsElm | One ELM-AE layer per entry |
ActivationFunction / ActivationKind | enum | kSigmoid | additive maps and ELM-AE | kSigmoid, kTanh, kRelu |
Backend | enum | kCpu | all models and feature maps | kCpu or kGpu |
seed | unsigned int | 42u | random maps and ELM-AE | Reproducible initialization |
ridgeAlpha | FloatT | 1e-6 | batch ridge and ELM-AE | Positive regularization |
Batch solver options
SolverOptions<FloatT> controls BatchRidgeSolver.
| Option | Default | Values | Meaning |
|---|---|---|---|
ridgeAlpha | 1e-6 | > 0 | Regularizes HᵀH + αI or HHᵀ + αI |
path | kAuto | kAuto, kPrimal, kDual | Selects primal when samples dominate hidden nodes and dual otherwise |
method | kCholesky | kCholesky, kHouseholderQr | CPU factorization method; Cholesky is the stable default |
Toggle path = kPrimal for many samples and few hidden nodes. Toggle path = kDual for many hidden nodes and few samples. Use kHouseholderQr only for research comparisons because Cholesky is faster on the regularized SPD system.
Online solver options
RlsOptions<FloatT> controls RlsSolver.
| Option | Default | Values | Meaning |
|---|---|---|---|
regularization | 1e-3 | >= 0 | ReOS-ELM covariance regularization |
forgettingFactor | 1 | (0, 1] | FOS-ELM forgetting; 1 is ordinary OS-ELM |
constraint | kNone | kNone, kClassDistance | OS-CELM class-distance constraint |
constraintStrength | 1e-2 | >= 0 | Strength for class-distance constraint |
An omitted extension must reduce to the baseline: forgettingFactor = 1, regularization = 0, and constraint = kNone are the off-switches.
RBF configuration
RbfMap is configured by:
| Parameter | Default | Notes |
|---|---|---|
inputDim | required | Input dimension |
numCenters | required | Output dimension |
width | 1.0 | Shared RBF width σ |
centerInit | kRandom | kRandom or kKMeans |
seed | 42 | Random center initialization |
Demo configuration
DemoConfig controls the demo server. Every field is read from an environment variable by configFromEnvironment(); the demo images set the paths and port for you.
| Field | Environment variable | Default (binary) | Default (images) | Notes |
|---|---|---|---|---|
useGpu | DEMO_USE_GPU | false | CPU 0, GPU 1 | 1/true/yes/on enable it; 0 disables it |
host | DEMO_HOST | 0.0.0.0 | 0.0.0.0 | Bind address |
port | DEMO_PORT, then PORT | 8888 | 7860 | 7860 is the Hugging Face Spaces default |
staticPath | DEMO_STATIC_PATH | demo/ui | /app/ui | Web UI directory |
benchmarkPath | DEMO_BENCHMARK_PATH | data/benchmarks/latest | /app/benchmarks | Benchmark JSON directory |
datasetPath | DEMO_DATASET_PATH | data/datasets/digits_8x8.csv | /app/data/digits_8x8.csv | Digits CSV |
maxHiddenNodes | DEMO_MAX_HIDDEN | 2048 | CPU 1024, GPU 2048 | Upper bound accepted by /api/evaluate |
Drift stream configuration
DriftStream::Config controls synthetic non-stationary streams.
| Field | Default | Notes |
|---|---|---|
inputDim | 2 | Minimum is 2 |
numClasses | 2 | Binary drift stream |
streamLength | 1000 | Samples before exhaustion |
driftPoint | 500 | Sample where the regime changes |
seed | 42 | Reproducible stream |