<commit_before># frozen_string_literal: true

require 'svmkit/validation'
require 'svmkit/values'
require 'svmkit/base/base_estimator'
require 'svmkit/base/regressor'
require 'svmkit/tree/decision_tree_regressor'

module SVMKit
  module Ensemble
    # AdaBoostRegressor is a class that implements random forest for regression
    # This class uses decision tree for a weak learner.
    #
    # @example
    #   estimator =
    #     SVMKit::Ensemble::AdaBoostRegressor.new(
    #       n_estimators: 10, criterion: 'mse', max_depth: 3, max_leaf_nodes: 10, min_samples_leaf: 5, random_seed: 1)
    #   estimator.fit(training_samples, traininig_values)
    #   results = estimator.predict(testing_samples)
    #
    # *Reference*
    # - <NAME> and <NAME>, "Experiments with AdaBoost.RT, an Improved Boosting Scheme for Regression," Neural Computation 18 (7), pp. 1678--1710, 2006.
    #
    class AdaBoostRegressor
      include Base::BaseEstimator
      include Base::Regressor
      include Validation

      # Return the set of estimators.
      # @return [Array<DecisionTreeRegressor>]
      attr_reader :estimators

      # Return the weight for each weak learner.<commit_msg>:books: Fix document on AdaBoostRegressor<commit_after># frozen_string_literal: true

require 'svmkit/validation'
require 'svmkit/values'
require 'svmkit/base/base_estimator'
require 'svmkit/base/regressor'
require 'svmkit/tree/decision_tree_regressor'

module SVMKit
  module Ensemble
    # AdaBoostRegressor is a class that implements random forest for regression.
    # This class uses decision tree for a weak learner.
    #
    # @example
    #   estimator =
    #     SVMKit::Ensemble::AdaBoostRegressor.new(
    #       n_estimators: 10, criterion: 'mse', max_depth: 3, max_leaf_nodes: 10, min_samples_leaf: 5, random_seed: 1)
    #   estimator.fit(training_samples, traininig_values)
    #   results = estimator.predict(testing_samples)
    #
    # *Reference*
    # - <NAME> and <NAME>, "Experiments with AdaBoost.RT, an Improved Boosting Scheme for Regression," Neural Computation 18 (7), pp. 1678--1710, 2006.
    #
    class AdaBoostRegressor
      include Base::BaseEstimator
      include Base::Regressor
      include Validation

      # Return the set of estimators.
      # @return [Array<DecisionTreeRegressor>]
      attr_reader :estimators

      # Return the weight for each weak learner.
{'fraction_non_alphanumeric': 0.08748430305567183, 'fraction_numerical': 0.018417748011720386, 'mean_word_length': 3.5961538461538463, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2128356', 'n_tokens_mistral': 826, 'n_tokens_neox': 739, 'n_words': 201}