lib/svmkit/ensemble/ada_boost_classifier.rb in svmkit-0.7.2 vs lib/svmkit/ensemble/ada_boost_classifier.rb in svmkit-0.7.3

- old
+ new

@@ -107,10 +107,10 @@ ids = SVMKit::Utils.choice_ids(n_samples, observation_weights, @rng) break if y[ids].to_a.uniq.size != n_classes tree = Tree::DecisionTreeClassifier.new( criterion: @params[:criterion], max_depth: @params[:max_depth], max_leaf_nodes: @params[:max_leaf_nodes], min_samples_leaf: @params[:min_samples_leaf], - max_features: @params[:max_features], random_seed: @rng.rand(SVMKit::Values::int_max) + max_features: @params[:max_features], random_seed: @rng.rand(SVMKit::Values.int_max) ) tree.fit(x[ids, true], y[ids]) # Calculate estimator error. proba = tree.predict_proba(x).clip(1.0e-15, nil) p = Numo::Int32.asarray(Array.new(n_samples) { |n| @classes[proba[n, true].max_index] })