|
StochTree 0.5.0.9000
|
Sufficient statistic and associated operations for complementary log-log ordinal BART model. More...
#include <leaf_model.h>
Public Member Functions | |
| CloglogOrdinalSuffStat () | |
| Construct a new CloglogOrdinalSuffStat object, setting all sufficient statistics to zero. | |
| void | IncrementSuffStat (ForestDataset &dataset, Eigen::VectorXd &outcome, ForestTracker &tracker, data_size_t row_idx, int tree_idx) |
Accumulate data from observation row_idx into the sufficient statistics. | |
| void | ResetSuffStat () |
| Reset all of the sufficient statistics to zero. | |
| void | AddSuffStatInplace (CloglogOrdinalSuffStat &suff_stat) |
Increment the value of each sufficient statistic by the values provided by suff_stat | |
| void | AddSuffStat (CloglogOrdinalSuffStat &lhs, CloglogOrdinalSuffStat &rhs) |
Set the value of each sufficient statistic to the sum of the values provided by lhs and rhs | |
| void | SubtractSuffStat (CloglogOrdinalSuffStat &lhs, CloglogOrdinalSuffStat &rhs) |
Set the value of each sufficient statistic to the difference between the values provided by lhs and those provided by rhs | |
| bool | SampleGreaterThan (data_size_t threshold) |
Check whether accumulated sample size, n, is greater than some threshold. | |
| bool | SampleGreaterThanEqual (data_size_t threshold) |
Check whether accumulated sample size, n, is greater than or equal to some threshold. | |
| data_size_t | SampleSize () |
| Return the sample size accumulated by a sufficient stat object. | |
Sufficient statistic and associated operations for complementary log-log ordinal BART model.
|
inline |
Accumulate data from observation row_idx into the sufficient statistics.
| dataset | Data object containing training data, including covariates |
| outcome | Data object containing the original ordinal outcome values, which are used to compute sufficient statistics |
| tracker | Tracking data structures that speed up sampler operations, synchronized with active_forest tracking a forest's state |
| row_idx | Index of the training data observation from which the sufficient statistics should be updated |
| tree_idx | Index of the tree being updated in the course of this sufficient statistic update |
|
inline |
Increment the value of each sufficient statistic by the values provided by suff_stat
| suff_stat | Sufficient statistic to be added to the current sufficient statistics |
|
inline |
Set the value of each sufficient statistic to the sum of the values provided by lhs and rhs
| lhs | First sufficient statistic ("left hand side") |
| rhs | Second sufficient statistic ("right hand side") |
|
inline |
Set the value of each sufficient statistic to the difference between the values provided by lhs and those provided by rhs
| lhs | First sufficient statistic ("left hand side") |
| rhs | Second sufficient statistic ("right hand side") |
|
inline |
Check whether accumulated sample size, n, is greater than some threshold.
| threshold | Value used to compute n > threshold |
|
inline |
Check whether accumulated sample size, n, is greater than or equal to some threshold.
| threshold | Value used to compute n >= threshold |