lib/rumale/ensemble/extra_trees_regressor.rb in rumale-ensemble-0.25.0 vs lib/rumale/ensemble/extra_trees_regressor.rb in rumale-ensemble-0.26.0

- old
+ new

@@ -70,10 +70,10 @@ ::Rumale::Validation.check_sample_size(x, y) # Initialize some variables. n_features = x.shape[1] @params[:max_features] = Math.sqrt(n_features).to_i if @params[:max_features].nil? - @params[:max_features] = [[1, @params[:max_features]].max, n_features].min + @params[:max_features] = [[1, @params[:max_features]].max, n_features].min # rubocop:disable Style/ComparableClamp sub_rng = @rng.dup # Construct forest. rng_seeds = Array.new(@params[:n_estimators]) { sub_rng.rand(::Rumale::Ensemble::Value::SEED_BASE) } @estimators = if enable_parallel? parallel_map(@params[:n_estimators]) { |n| plant_tree(rng_seeds[n]).fit(x, y) }