Class: Rumale::LinearModel::SGDEstimator

Inherits:
BaseEstimator show all
Defined in:
rumale-linear_model/lib/rumale/linear_model/sgd_estimator.rb

Overview

SGDEstimator is an abstract class for implementation of linear model with mini-batch stochastic gradient descent (SGD) optimization. This class is used internally.

Direct Known Subclasses

SGDClassifier, SGDRegressor

Instance Attribute Summary

Attributes inherited from BaseEstimator

#bias_term, #weight_vec

Attributes inherited from Base::Estimator

#params

Instance Method Summary collapse

Constructor Details

#initializeSGDEstimator

Create an initial linear model with SGD.



193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
# File 'rumale-linear_model/lib/rumale/linear_model/sgd_estimator.rb', line 193

def initialize
  super()
  @params = {
    learning_rate: 0.01,
    decay: nil,
    momentum: 0.0,
    bias_scale: 1.0,
    fit_bias: true,
    reg_param: 0.0,
    l1_ratio: 0.0,
    max_iter: 1000,
    batch_size: 50,
    tol: 0.0001,
    verbose: false
  }
end