org.apache.ignite.ml.tree.randomforest.data.statistics

## Class RegressionLeafValuesComputer

- java.lang.Object
- - org.apache.ignite.ml.tree.randomforest.data.statistics.LeafValuesComputer<MeanValueStatistic>
  - - org.apache.ignite.ml.tree.randomforest.data.statistics.RegressionLeafValuesComputer

- All Implemented Interfaces:
    Serializable

      public class RegressionLeafValuesComputer
      extends LeafValuesComputer<MeanValueStatistic>

  Implementation of `LeafValuesComputer` for regression task.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RegressionLeafValuesComputer()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `addElementToLeafStatistic(MeanValueStatistic leafStatAggr, BootstrappedVector vec, int sampleId)` Save vector to leaf statistic.
    `protected double` | `computeLeafValue(MeanValueStatistic stat)` Returns the mean value in according to statistic.
    `protected MeanValueStatistic` | `createLeafStatsAggregator(int sampleId)` Creates an instance of leaf statistics aggregator in according to concrete algorithm based on RandomForest.
    `protected MeanValueStatistic` | `mergeLeafStats(MeanValueStatistic leftStats, MeanValueStatistic rightStats)` Merge statistics for same leafs.

    - ### Methods inherited from class org.apache.ignite.ml.tree.randomforest.data.statistics.LeafValuesComputer

      `setValuesForLeaves`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RegressionLeafValuesComputer

          public RegressionLeafValuesComputer()

  - ### Method Detail

    - #### addElementToLeafStatistic

          protected void addElementToLeafStatistic(MeanValueStatistic leafStatAggr,
                                                   BootstrappedVector vec,
                                                   int sampleId)

      Save vector to leaf statistic.
      Specified by:
        `addElementToLeafStatistic` in class `LeafValuesComputer<MeanValueStatistic>`
      Parameters:
        `leafStatAggr` - Leaf statistics aggregator.
        `vec` - Vector.
        `sampleId` - Sample id.

    - #### mergeLeafStats

          protected MeanValueStatistic mergeLeafStats(MeanValueStatistic leftStats,
                                                      MeanValueStatistic rightStats)

      Merge statistics for same leafs.
      Specified by:
        `mergeLeafStats` in class `LeafValuesComputer<MeanValueStatistic>`
      Parameters:
        `leftStats` - First leaf stat aggregator.
        `rightStats` - Second leaf stat aggregator.

    - #### createLeafStatsAggregator

          protected MeanValueStatistic createLeafStatsAggregator(int sampleId)

      Creates an instance of leaf statistics aggregator in according to concrete algorithm based on RandomForest.
      Specified by:
        `createLeafStatsAggregator` in class `LeafValuesComputer<MeanValueStatistic>`
      Parameters:
        `sampleId` - Sample id.

    - #### computeLeafValue

          protected double computeLeafValue(MeanValueStatistic stat)

      Returns the mean value in according to statistic.
      Specified by:
        `computeLeafValue` in class `LeafValuesComputer<MeanValueStatistic>`
      Parameters:
        `stat` - Leaf statistics.

2020 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.9.1
Release Date | : December 9 2020