lib/rumale/ensemble/ada_boost_classifier.rb in rumale-ensemble-0.25.0 vs lib/rumale/ensemble/ada_boost_classifier.rb in rumale-ensemble-0.26.0
- old
+ new
@@ -84,10 +84,10 @@
## Initialize some variables.
n_samples, n_features = x.shape
@estimators = []
@feature_importances = Numo::DFloat.zeros(n_features)
@params[:max_features] = n_features unless @params[:max_features].is_a?(Integer)
- @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)
n_classes = @classes.shape[0]
sub_rng = @rng.dup
## Boosting.
classes_arr = @classes.to_a