Skip to content

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 ​

FieldTypeDefaultApplies toNotes
numInputsstd::size_trequiredall modelsInput dimension
numHiddenNodesstd::size_trequiredBatchElm, OsElm, OsCelmAdditive hidden-node count
hiddenNodesPerLayerstd::vector<std::size_t>requiredMlElm, HierarchicalOsElmOne ELM-AE layer per entry
ActivationFunction / ActivationKindenumkSigmoidadditive maps and ELM-AEkSigmoid, kTanh, kRelu
BackendenumkCpuall models and feature mapskCpu or kGpu
seedunsigned int42urandom maps and ELM-AEReproducible initialization
ridgeAlphaFloatT1e-6batch ridge and ELM-AEPositive regularization

Batch solver options ​

SolverOptions<FloatT> controls BatchRidgeSolver.

OptionDefaultValuesMeaning
ridgeAlpha1e-6> 0Regularizes HᵀH + αI or HHᵀ + αI
pathkAutokAuto, kPrimal, kDualSelects primal when samples dominate hidden nodes and dual otherwise
methodkCholeskykCholesky, kHouseholderQrCPU 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.

OptionDefaultValuesMeaning
regularization1e-3>= 0ReOS-ELM covariance regularization
forgettingFactor1(0, 1]FOS-ELM forgetting; 1 is ordinary OS-ELM
constraintkNonekNone, kClassDistanceOS-CELM class-distance constraint
constraintStrength1e-2>= 0Strength 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:

ParameterDefaultNotes
inputDimrequiredInput dimension
numCentersrequiredOutput dimension
width1.0Shared RBF width σ
centerInitkRandomkRandom or kKMeans
seed42Random 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.

FieldEnvironment variableDefault (binary)Default (images)Notes
useGpuDEMO_USE_GPUfalseCPU 0, GPU 11/true/yes/on enable it; 0 disables it
hostDEMO_HOST0.0.0.00.0.0.0Bind address
portDEMO_PORT, then PORT888878607860 is the Hugging Face Spaces default
staticPathDEMO_STATIC_PATHdemo/ui/app/uiWeb UI directory
benchmarkPathDEMO_BENCHMARK_PATHdata/benchmarks/latest/app/benchmarksBenchmark JSON directory
datasetPathDEMO_DATASET_PATHdata/datasets/digits_8x8.csv/app/data/digits_8x8.csvDigits CSV
maxHiddenNodesDEMO_MAX_HIDDEN2048CPU 1024, GPU 2048Upper bound accepted by /api/evaluate

Drift stream configuration ​

DriftStream::Config controls synthetic non-stationary streams.

FieldDefaultNotes
inputDim2Minimum is 2
numClasses2Binary drift stream
streamLength1000Samples before exhaustion
driftPoint500Sample where the regime changes
seed42Reproducible stream

Released under the MIT License.