options object
regression model
var incrSGDRegression = require( `@stdlib/streams/ml/incr/sgd-regression` );
var accumulator = incrSGDRegression({
'intercept': true
'lambda': 1e-5
});
// Update model as observations come in:
var y = 3.5;
var x = [ 2.3, 1.0, 5.0 ];
accumulator( x, y );
// Predict new observation:
var yHat = accumulator.predict( x );
// Retrieve coefficients:
var coefs = accumulator.coefs;
Online learning for regression using stochastic gradient descent (SGD).
Method
The sub-gradient of the loss function is estimated for each datum and the regression model is updated incrementally, with a decreasing learning rate and regularization of the feature weights based on L2 regularization.
References
must provide valid options