|
Medial Code Documentation
|
Copyright 2018-2023 by XGBoost Contributors. More...
Data Structures | |
| struct | CoordinateParam |
| class | CoordinateUpdater |
| Coordinate descent algorithm that updates one feature per iteration. More... | |
| class | CyclicFeatureSelector |
| Deterministic selection by cycling through features one at a time. More... | |
| class | FeatureSelector |
| Abstract class for stateful feature selection or ordering in coordinate descent algorithms. More... | |
| class | GreedyFeatureSelector |
| Select coordinate with the greatest gradient magnitude. More... | |
| struct | LinearTrainParam |
| class | RandomFeatureSelector |
| A random (with replacement) coordinate selector. More... | |
| class | ShotgunUpdater |
| class | ShuffleFeatureSelector |
| Similar to Cyclic but with random feature shuffling prior to each update. More... | |
| class | ThriftyFeatureSelector |
| Thrifty, approximately-greedy feature selector. More... | |
Enumerations | |
| enum | FeatureSelectorEnum { kCyclic = 0 , kShuffle , kThrifty , kGreedy , kRandom } |
| A set of available FeatureSelector's. | |
Functions | |
| double | CoordinateDelta (double sum_grad, double sum_hess, double w, double reg_alpha, double reg_lambda) |
| Calculate change in weight for a given feature. | |
| double | CoordinateDeltaBias (double sum_grad, double sum_hess) |
| Calculate update to bias. | |
| std::pair< double, double > | GetGradient (Context const *ctx, int group_idx, int num_group, bst_feature_t fidx, std::vector< GradientPair > const &gpair, DMatrix *p_fmat) |
| Get the gradient with respect to a single feature. | |
| std::pair< double, double > | GetGradientParallel (Context const *ctx, int group_idx, int num_group, int fidx, const std::vector< GradientPair > &gpair, DMatrix *p_fmat) |
| Get the gradient with respect to a single feature. | |
| std::pair< double, double > | GetBiasGradientParallel (int group_idx, int num_group, const std::vector< GradientPair > &gpair, DMatrix *p_fmat, int32_t n_threads) |
| Get the gradient with respect to the bias. | |
| void | UpdateResidualParallel (Context const *ctx, bst_feature_t fidx, int group_idx, int num_group, float dw, std::vector< GradientPair > *in_gpair, DMatrix *p_fmat) |
| Updates the gradient vector with respect to a change in weight. | |
| void | UpdateBiasResidualParallel (Context const *ctx, int group_idx, int num_group, float dbias, std::vector< GradientPair > *in_gpair, DMatrix *p_fmat) |
| Updates the gradient vector based on a change in the bias. | |
| DMLC_REGISTER_PARAMETER (LinearTrainParam) | |
| DMLC_REGISTRY_LINK_TAG (updater_shotgun) | |
| DMLC_REGISTRY_LINK_TAG (updater_coordinate) | |
| DMLC_REGISTER_PARAMETER (CoordinateParam) | |
| DMLC_REGISTRY_FILE_TAG (updater_coordinate) | |
| describe ("Update linear model according to coordinate descent algorithm.") .set_body([]() | |
| DMLC_REGISTRY_FILE_TAG (updater_shotgun) | |
| describe ("Update linear model according to shotgun coordinate descent " "algorithm.") .set_body([]() | |
Copyright 2018-2023 by XGBoost Contributors.
|
inline |
Calculate change in weight for a given feature.
Applies l1/l2 penalty normalised by the number of training instances.
| sum_grad | The sum gradient. |
| sum_hess | The sum hess. |
| w | The weight. |
| reg_alpha | Unnormalised L1 penalty. |
| reg_lambda | Unnormalised L2 penalty. |
|
inline |
Calculate update to bias.
| sum_grad | The sum gradient. |
| sum_hess | The sum hess. |
|
inline |
Get the gradient with respect to the bias.
Row-wise multithreaded.
| group_idx | Zero-based index of the group. |
| num_group | Number of groups. |
| gpair | Gradients. |
| p_fmat | The feature matrix. |
|
inline |
Get the gradient with respect to a single feature.
| group_idx | Zero-based index of the group. |
| num_group | Number of groups. |
| fidx | The target feature. |
| gpair | Gradients. |
| p_fmat | The feature matrix. |
|
inline |
Get the gradient with respect to a single feature.
Row-wise multithreaded.
| group_idx | Zero-based index of the group. |
| num_group | Number of groups. |
| fidx | The target feature. |
| gpair | Gradients. |
| p_fmat | The feature matrix. |
|
inline |
Updates the gradient vector based on a change in the bias.
| group_idx | Zero-based index of the group. |
| num_group | Number of groups. |
| dbias | The change in bias. |
| in_gpair | The gradient vector to be updated. |
| p_fmat | The input feature matrix. |
|
inline |
Updates the gradient vector with respect to a change in weight.
| fidx | The feature index. |
| group_idx | Zero-based index of the group. |
| num_group | Number of groups. |
| dw | The change in weight. |
| in_gpair | The gradient vector to be updated. |
| p_fmat | The input feature matrix. |