lib/svmkit/ensemble/random_forest_classifier.rb in svmkit-0.3.1 vs lib/svmkit/ensemble/random_forest_classifier.rb in svmkit-0.3.2
- old
+ new
@@ -1,10 +1,11 @@
# frozen_string_literal: true
require 'svmkit/validation'
require 'svmkit/base/base_estimator'
require 'svmkit/base/classifier'
+require 'svmkit/tree/decision_tree_classifier'
module SVMKit
# This module consists of the classes that implement ensemble-based methods.
module Ensemble
# RandomForestClassifier is a class that implements random forest for classification.
@@ -30,10 +31,10 @@
# Return the importance for each feature.
# @return [Numo::DFloat] (size: n_features)
attr_reader :feature_importances
- # Return the random generator for performing random sampling in the Pegasos algorithm.
+ # Return the random generator for random selection of feature index.
# @return [Random]
attr_reader :rng
# Create a new classifier with random forest.
#