lib/rumale/linear_model/elastic_net.rb in rumale-0.20.3 vs lib/rumale/linear_model/elastic_net.rb in rumale-0.21.0
- old
+ new
@@ -8,11 +8,11 @@
# ElasticNet is a class that implements Elastic-net Regression
# with stochastic gradient descent (SGD) optimization.
#
# @example
# estimator =
- # Rumale::LinearModel::ElasticNet.new(reg_param: 0.1, l1_ratio: 0.5, max_iter: 200, batch_size: 50, random_seed: 1)
+ # Rumale::LinearModel::ElasticNet.new(reg_param: 0.1, l1_ratio: 0.5, max_iter: 1000, batch_size: 50, random_seed: 1)
# estimator.fit(training_samples, traininig_values)
# results = estimator.predict(testing_samples)
#
# *Reference*
# - Shalev-Shwartz, S., and Singer, Y., "Pegasos: Primal Estimated sub-GrAdient SOlver for SVM," Proc. ICML'07, pp. 807--814, 2007.
@@ -57,10 +57,10 @@
# This parameter is ignored if the Parallel gem is not loaded.
# @param verbose [Boolean] The flag indicating whether to output loss during iteration.
# @param random_seed [Integer] The seed value using to initialize the random generator.
def initialize(learning_rate: 0.01, decay: nil, momentum: 0.9,
reg_param: 1.0, l1_ratio: 0.5, fit_bias: true, bias_scale: 1.0,
- max_iter: 200, batch_size: 50, tol: 1e-4,
+ max_iter: 1000, batch_size: 50, tol: 1e-4,
n_jobs: nil, verbose: false, random_seed: nil)
check_params_numeric(learning_rate: learning_rate, momentum: momentum,
reg_param: reg_param, l1_ratio: l1_ratio, bias_scale: bias_scale,
max_iter: max_iter, batch_size: batch_size, tol: tol)
check_params_boolean(fit_bias: fit_bias, verbose: verbose)