Batch ELM¶
Batch ELM is a single hidden-layer feedforward network with random additive features and a closed-form output layer.
Math¶
For samples X, random additive features compute:
The output weights solve the regularized least-squares problem:
The CPU default solves the primal system when it is cheaper:
When samples are fewer than hidden nodes, BatchRidgeSolver can use the dual form:
API¶
feature_elm::BatchElm<float> model(
numInputs,
numHiddenNodes,
feature_elm::ActivationFunction::kSigmoid,
feature_elm::Backend::kCpu,
1e-6f);
model.train(trainData, trainTargets, numSamples, numOutputs);
auto predictions = model.predictBatch(testData, testSamples);
BatchElm owns a RandomAdditiveMap and a BatchRidgeSolver. The constructor preserves the v1 shape while routing hidden computation through the feature-map layer.
When to use¶
- Strong deterministic baseline.
- Small or medium tabular datasets.
- GPU batch transforms when
numSamples * numHiddenNodesis large. - Comparison baseline for RBF and ML-ELM.
When not to use¶
- Data arrives continuously and full retraining is too expensive: use OS-ELM.
- The feature stack must be learned: use ML-ELM.
- The problem is clearly center-based and local: compare against RBF features.