lib/rumale/ensemble/extra_trees_classifier.rb in rumale-ensemble-0.25.0 vs lib/rumale/ensemble/extra_trees_classifier.rb in rumale-ensemble-0.26.0
- old
+ new
@@ -74,10 +74,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
@classes = Numo::Int32.asarray(y.to_a.uniq.sort)
sub_rng = @rng.dup
# Construct trees.
rng_seeds = Array.new(@params[:n_estimators]) { sub_rng.rand(::Rumale::Ensemble::Value::SEED_BASE) }
@estimators = if enable_parallel?