View Source EXGBoost.Parameters (EXGBoost v0.5.1)

Parameters are used to configure the training process and the booster.

Global Parameters

You can set the following params either using a global application config (preferred) or using the EXGBoost.set_config/1 function. The global config is set using the :exgboost key. Note that using the EXGBoost.set_config/1 function will override the global config for the current instance of the application.

config :exgboost,
  verbosity: :info,
  use_rmm: true,
  • :verbosity - Verbosity of printing messages. Valid values are: :silent, :warning, :info, :debug. The default value is :silent.

  • :use_rmm (boolean/0) - Whether to use RAPIDS Memory Manager for memory allocation. This option is only applicable when XGBoost is built (compiled) with the RMM plugin enabled. Valid values are true and false. The default value is false.

General Parameters

  • :booster - Which booster to use. Valid values are :gbtree, :gblinear, :dart

    • :gbtree - tree-based models
    • :gblinear - linear models
    • :dart - tree-based models with dropouts The default value is :gbtree.
  • :device - Device for XGBoost to run. User can set it to one of the following values:

    • :cpu - Use a CPU.
    • :cuda - Use a GPU (CUDA device).
    • {:cuda, ordinal} - ordinal is an integer that specifies the ordinal of the GPU (which GPU do you want to use if you have more than one devices).
    • :gpu - Default GPU device selection from the list of available and supported devices. Only cuda devices are supported currently.
    • {:gpu, ordinal} - Default GPU device selection from the list of available and supported devices. Only cuda devices are supported currently.

    For more information about GPU acceleration, see XGBoost GPU Support. In distributed environments, ordinal selection is handled by distributed frameworks instead of XGBoost. As a result, using {:cuda, ordinal} will result in an error. Use :cuda instead.

    The default value is :cpu.

  • :verbosity - Verbosity of printing messages. Valid values are: :silent, :warning, :info, :debug The default value is :silent.

  • :validate_parameters (boolean/0) - Whether to perform validation of parameters. If set to true, an error will be raised if an invalid parameter is passed to the booster, and EXGBoost will take care of formatting all parameters to the expected input of XGBoost. If set to false, the user is responsible for ensuring that all parameters are valid strings which is what XGBoost is expecting. The default value is true.

  • :nthread (non_neg_integer/0) - Number of threads to use for training and prediction. If 0, then the number of threads is set to the number of cores. This can be set globally using the :exgboost application environment variable :nthread or on a per booster basis. If set globally, the value will be used for all boosters unless overridden by a specific booster. To set the number of threads globally, add the following to your config.exs: config :exgboost, nthread: n. The default value is 0.

  • :disable_default_eval_metric (boolean/0) - Whether to disable the default metric. If set to true, then the default metric is not used for evaluation. This is useful when using custom evaluation metrics. The default value is false.

  • :num_features (non_neg_integer/0) - Feature dimension used in boosting, set to maximum dimension of the feature

Tree Booster Parameters

  • :eta - Step size shrinkage used in update to prevents overfitting. After each boosting step, we can directly get the weights of new features. and eta actually shrinks the feature weights to make the boosting process more conservative. Valid range is [0,1]. The default value is 0.3.

  • :gamma - Minimum loss reduction required to make a further partition on a leaf node of the tree. The larger gamma is, the more conservative the algorithm will be. Valid range is [0, $\infty$]. The default value is 0.0.

  • :max_depth (non_neg_integer/0) - Maximum depth of a tree. Increasing this value will make the model more complex and more likely to overfit. 0 indicates no limit on depth. Beware that XGBoost aggressively consumes memory when training a deep tree. exact tree method requires non-zero value. The default value is 6.

  • :min_child_weight - Minimum sum of instance weight (hessian) needed in a child. If the tree partition step results in a leaf node with the sum of instance weight less than min_child_weight, then the building process will give up further partitioning. In linear regression task, this simply corresponds to minimum number of instances needed to be in each node. The larger min_child_weight is, the more conservative the algorithm will be. Valid range is [0, $\infty$]. The default value is 1.

  • :max_delta_step - Maximum delta step we allow each tree's weight estimation to be. If the value is set to 0, it means there is no constraint. If it is set to a positive value, it can help making the update step more conservative. Usually this parameter is not needed, but it might help in logistic regression when class is extremely imbalanced. Set it to value of 1-10 might help control the update. Valid range is [0, $\infty$]. The default value is 0.

  • :subsample - Subsample ratio of the training instance. Setting it to 0.5 means that XGBoost randomly collected half of the data instances to grow trees and this will prevent overfitting. Subsampling will occur once in every boosting iteration. Valid range is (0, 1]. The default value is 1.0.

  • :sampling_method - The method to use to sample the training instances.

    • :uniform - each training instance has an equal probability of being selected. Typically set :subsample $\ge$ 0.5 for good results. The default value is :uniform.
  • :colsample_by - This is a family of parameters for subsampling of columns. All colsample_by parameters have a range of (0, 1], the default value of 1, and specify the fraction of columns to be subsampled. colsample_by parameters work cumulatively. For instance, the combination col_sampleby: [tree: 0.5, level: 0.5, node: 0.5] with 64 features will leave 8.

    • :tree - The subsample ratio of columns when constructing each tree. Subsampling occurs once for every tree constructed. Valid range is (0, 1]. The default value is 1.
    • :level - The subsample ratio of columns for each level. Subsampling occurs once for every new depth level reached in a tree. Columns are subsampled from the set of columns chosen for the current tree. Valid range is (0, 1]. The default value is 1.
    • :node - The subsample ratio of columns for each node (split). Subsampling occurs once every time a new split is evaluated. Columns are subsampled from the set of columns chosen for the current level. Valid range is (0, 1]. The default value is 1.
  • :lambda - L2 regularization term on weights. Increasing this value will make model more conservative. Valid range is [0, $\infty$]. The default value is 1.

  • :alpha - L1 regularization term on weights. Increasing this value will make model more conservative. Valid range is [0, $\infty$]. The default value is 0.

  • :tree_method - The tree construction algorithm used in XGBoost. This is a combination of commonly used updaters. For other updaters like refresh, set the parameter updater directly.

    • :auto - Use heuristic to choose the fastest method.
      • For small dataset, exact greedy (exact) will be used.
      • For larger dataset, approximate algorithm (approx) will be chosen. It’s recommended to try hist for higher performance with large dataset.
      • Because old behavior is always use exact greedy in single machine, user will get a message when approximate algorithm is chosen to notify this choice.
    • :exact - Exact greedy algorithm. Enumerates all split candidates.
    • :approx - Approximate greedy algorithm using sketching and histogram.
    • :hist - Faster histogram optimized approximate greedy algorithm. The default value is :auto.
  • :scale_pos_weight (float/0) - Control the balance of positive and negative weights, useful for unbalanced classes. A typical value to consider: sum(negative instances) / sum(positive instances). The default value is 1.0.

  • :updater - A list defining the sequence of tree updaters to run, providing a modular way to construct and to modify the trees. This is an advanced parameter that is usually set automatically, depending on some other parameters. However, it could be also set explicitly by a user. The following updaters exist:

    • :grow_colmaker - non-distributed column-based construction of trees.
    • :grow_histmaker - distributed tree construction with row-based data splitting based on global proposal of histogram counting.
    • :grow_quantile_histmaker - Grow tree using quantized histogram.
    • :sync - synchronizes trees in all distributed nodes.
    • :refresh - refreshes tree’s statistics and/or leaf values based on the current data. Note that no random subsampling of data rows is performed.
    • :prune - prunes the splits where loss < min_split_loss (or gamma) and nodes that have depth greater than max_depth.
  • :refresh_leaf - This is a parameter of the refresh updater. When this flag is 1, tree leafs as well as tree nodes’ stats are updated. When it is 0, only node stats are updated. The default value is 1.

  • :process_type - The type of boosting process to run

    • :default - The normal boosting process which creates new trees.
    • :update - Starts from an existing model and only updates its trees. In each boosting iteration, a tree from the initial model is taken, a specified sequence of updaters is run for that tree, and a modified tree is added to the new model. The new model would have either the same or smaller number of trees, depending on the number of boosting iterations performed. Currently, the following built-in updaters could be meaningfully used with this process type: refresh, prune. With process_type: update, one cannot use updaters that create new trees. The default value is :default.
  • :grow_policy - Controls a way new nodes are added to the tree. Currently supported only if tree_method is set to :hist or :approx.

    • :depthwise - split at nodes closest to the root.
    • :lossguide - split at nodes with highest loss change. The default value is :depthwise.
  • :max_leaves (non_neg_integer/0) - Maximum number of nodes to be added. Not used by exact tree method. The default value is 0.

  • :max_bin (pos_integer/0) - Maximum number of discrete bins to bucket continuous features. Used only if tree_method is set to :hist or :approx. Maximum number of discrete bins to bucket continuous features. Increasing this number improves the optimality of splits at the cost of higher computation time. The default value is 256.

  • :predictor - The type of predictor algorithm to use. Provides the same results but allows the use of GPU or CPU.

    • :auto - Configure predictor based on heuristics.
    • :cpu_predictor - Multicore CPU prediction algorithm. The default value is :auto.
  • :num_parallel_tree (non_neg_integer/0) - Number of parallel trees constructed during each iteration. This option is used to support boosted random forest. The default value is 1.

  • :monotone_constraints - Constraint of variable monotonicity. See Monotonic Constraints for more information.

  • :interaction_constraints (list of list of integer/0) - Constraints for interaction representing permitted interactions. The constraints must be specified in the form of a nested list, e.g. [[0, 1], [2, 3, 4]], where each inner list is a group of indices of features that are allowed to interact with each other. See Feature Interaction Constraints for more information.

  • :multi_strategy - The strategy used for training multi-target models, including multi-target regression and multi-class classification. See Multiple Outputs for more information.

    • :one_output_per_tree - One model for each target.
    • :multi_output_tree - Use multi-target trees. The default value is :one_output_per_tree.
  • :max_cached_hist_node (non_neg_integer/0) - Maximum number of cached nodes for CPU histogram. For most of the cases this parameter should not be set except for growing deep trees on CPU. The default value is 65536.

Linear Booster Parameters

  • :lambda (float/0) - L2 regularization term on weights. Increasing this value will make model more conservative. Normalised to number of training examples. The default value is 0.0.

  • :alpha (float/0) - L1 regularization term on weights. Increasing this value will make model more conservative. Normalised to number of training examples. The default value is 0.0.

  • :updater - Choice of algorithm to fit linear model

    • :shotgun - Parallel coordinate descent algorithm based on shotgun algorithm. Uses ‘hogwild’ parallelism and therefore produces a nondeterministic solution on each run.
    • :coord_descent - Ordinary coordinate descent algorithm. Also multithreaded but still produces a deterministic solution. The default value is :shotgun.
  • :feature_selector - Feature selection and ordering method

    • :cyclic - Deterministic selection by cycling through features one at a time. Used with the :shotgun updater.
    • :shuffle - Similar to :cyclic but with random feature shuffling prior to each update. Used with the :shotgun updater.
    • :random - A random (with replacement) coordinate selector. Used with the :coord_descent updater.
    • :greedy - Select coordinate with the greatest gradient magnitude. It has $O(num_feature^2)$ complexity. It is fully deterministic. It allows restricting the selection to :top_k features per group with the largest magnitude of univariate weight change, by setting the :top_k parameter. Doing so would reduce the complexity to $O(num_feature^{topk})$. Used by :coord_descent updater.
    • :thrifty - Thrifty, approximately-greedy feature selector. Prior to cyclic updates, reorders features in descending magnitude of their univariate weight changes. This operation is multithreaded and is a linear complexity approximation of the quadratic greedy selection. It allows restricting the selection to :top_k features per group with the largest magnitude of univariate weight change, by setting the :top_k parameter. Used by :coord_descent updater. The default value is :cyclic.
  • :top_k (non_neg_integer/0) - The number of top features to select in :greedy and :thrifty feature selector. The value of 0 means using all the features. The default value is 0.

Dart Booster Parameters

  • :eta - Step size shrinkage used in update to prevents overfitting. After each boosting step, we can directly get the weights of new features. and eta actually shrinks the feature weights to make the boosting process more conservative. Valid range is [0,1]. The default value is 0.3.

  • :gamma - Minimum loss reduction required to make a further partition on a leaf node of the tree. The larger gamma is, the more conservative the algorithm will be. Valid range is [0, $\infty$]. The default value is 0.0.

  • :max_depth (non_neg_integer/0) - Maximum depth of a tree. Increasing this value will make the model more complex and more likely to overfit. 0 indicates no limit on depth. Beware that XGBoost aggressively consumes memory when training a deep tree. exact tree method requires non-zero value. The default value is 6.

  • :min_child_weight - Minimum sum of instance weight (hessian) needed in a child. If the tree partition step results in a leaf node with the sum of instance weight less than min_child_weight, then the building process will give up further partitioning. In linear regression task, this simply corresponds to minimum number of instances needed to be in each node. The larger min_child_weight is, the more conservative the algorithm will be. Valid range is [0, $\infty$]. The default value is 1.

  • :max_delta_step - Maximum delta step we allow each tree's weight estimation to be. If the value is set to 0, it means there is no constraint. If it is set to a positive value, it can help making the update step more conservative. Usually this parameter is not needed, but it might help in logistic regression when class is extremely imbalanced. Set it to value of 1-10 might help control the update. Valid range is [0, $\infty$]. The default value is 0.

  • :subsample - Subsample ratio of the training instance. Setting it to 0.5 means that XGBoost randomly collected half of the data instances to grow trees and this will prevent overfitting. Subsampling will occur once in every boosting iteration. Valid range is (0, 1]. The default value is 1.0.

  • :sampling_method - The method to use to sample the training instances.

    • :uniform - each training instance has an equal probability of being selected. Typically set :subsample $\ge$ 0.5 for good results. The default value is :uniform.
  • :colsample_by - This is a family of parameters for subsampling of columns. All colsample_by parameters have a range of (0, 1], the default value of 1, and specify the fraction of columns to be subsampled. colsample_by parameters work cumulatively. For instance, the combination col_sampleby: [tree: 0.5, level: 0.5, node: 0.5] with 64 features will leave 8.

    • :tree - The subsample ratio of columns when constructing each tree. Subsampling occurs once for every tree constructed. Valid range is (0, 1]. The default value is 1.
    • :level - The subsample ratio of columns for each level. Subsampling occurs once for every new depth level reached in a tree. Columns are subsampled from the set of columns chosen for the current tree. Valid range is (0, 1]. The default value is 1.
    • :node - The subsample ratio of columns for each node (split). Subsampling occurs once every time a new split is evaluated. Columns are subsampled from the set of columns chosen for the current level. Valid range is (0, 1]. The default value is 1.
  • :lambda - L2 regularization term on weights. Increasing this value will make model more conservative. Valid range is [0, $\infty$]. The default value is 1.

  • :alpha - L1 regularization term on weights. Increasing this value will make model more conservative. Valid range is [0, $\infty$]. The default value is 0.

  • :tree_method - The tree construction algorithm used in XGBoost. This is a combination of commonly used updaters. For other updaters like refresh, set the parameter updater directly.

    • :auto - Use heuristic to choose the fastest method.
      • For small dataset, exact greedy (exact) will be used.
      • For larger dataset, approximate algorithm (approx) will be chosen. It’s recommended to try hist for higher performance with large dataset.
      • Because old behavior is always use exact greedy in single machine, user will get a message when approximate algorithm is chosen to notify this choice.
    • :exact - Exact greedy algorithm. Enumerates all split candidates.
    • :approx - Approximate greedy algorithm using sketching and histogram.
    • :hist - Faster histogram optimized approximate greedy algorithm. The default value is :auto.
  • :scale_pos_weight (float/0) - Control the balance of positive and negative weights, useful for unbalanced classes. A typical value to consider: sum(negative instances) / sum(positive instances). The default value is 1.0.

  • :updater - A list defining the sequence of tree updaters to run, providing a modular way to construct and to modify the trees. This is an advanced parameter that is usually set automatically, depending on some other parameters. However, it could be also set explicitly by a user. The following updaters exist:

    • :grow_colmaker - non-distributed column-based construction of trees.
    • :grow_histmaker - distributed tree construction with row-based data splitting based on global proposal of histogram counting.
    • :grow_quantile_histmaker - Grow tree using quantized histogram.
    • :sync - synchronizes trees in all distributed nodes.
    • :refresh - refreshes tree’s statistics and/or leaf values based on the current data. Note that no random subsampling of data rows is performed.
    • :prune - prunes the splits where loss < min_split_loss (or gamma) and nodes that have depth greater than max_depth.
  • :refresh_leaf - This is a parameter of the refresh updater. When this flag is 1, tree leafs as well as tree nodes’ stats are updated. When it is 0, only node stats are updated. The default value is 1.

  • :process_type - The type of boosting process to run

    • :default - The normal boosting process which creates new trees.
    • :update - Starts from an existing model and only updates its trees. In each boosting iteration, a tree from the initial model is taken, a specified sequence of updaters is run for that tree, and a modified tree is added to the new model. The new model would have either the same or smaller number of trees, depending on the number of boosting iterations performed. Currently, the following built-in updaters could be meaningfully used with this process type: refresh, prune. With process_type: update, one cannot use updaters that create new trees. The default value is :default.
  • :grow_policy - Controls a way new nodes are added to the tree. Currently supported only if tree_method is set to :hist or :approx.

    • :depthwise - split at nodes closest to the root.
    • :lossguide - split at nodes with highest loss change. The default value is :depthwise.
  • :max_leaves (non_neg_integer/0) - Maximum number of nodes to be added. Not used by exact tree method. The default value is 0.

  • :max_bin (pos_integer/0) - Maximum number of discrete bins to bucket continuous features. Used only if tree_method is set to :hist or :approx. Maximum number of discrete bins to bucket continuous features. Increasing this number improves the optimality of splits at the cost of higher computation time. The default value is 256.

  • :predictor - The type of predictor algorithm to use. Provides the same results but allows the use of GPU or CPU.

    • :auto - Configure predictor based on heuristics.
    • :cpu_predictor - Multicore CPU prediction algorithm. The default value is :auto.
  • :num_parallel_tree (non_neg_integer/0) - Number of parallel trees constructed during each iteration. This option is used to support boosted random forest. The default value is 1.

  • :monotone_constraints - Constraint of variable monotonicity. See Monotonic Constraints for more information.

  • :interaction_constraints (list of list of integer/0) - Constraints for interaction representing permitted interactions. The constraints must be specified in the form of a nested list, e.g. [[0, 1], [2, 3, 4]], where each inner list is a group of indices of features that are allowed to interact with each other. See Feature Interaction Constraints for more information.

  • :multi_strategy - The strategy used for training multi-target models, including multi-target regression and multi-class classification. See Multiple Outputs for more information.

    • :one_output_per_tree - One model for each target.
    • :multi_output_tree - Use multi-target trees. The default value is :one_output_per_tree.
  • :max_cached_hist_node (non_neg_integer/0) - Maximum number of cached nodes for CPU histogram. For most of the cases this parameter should not be set except for growing deep trees on CPU. The default value is 65536.

  • :sample_type - Type of sampling algorithm.

    • :uniform - Dropped trees are selected uniformly.
    • :weighted - Dropped trees are selected in proportion to weight. The default value is :uniform.
  • :normalize_type - Type of normalization algorithm.

    • :tree - New trees have the same weight of each of dropped trees.
      • Weight of new trees are 1 / (k + learning_rate).
      • Dropped trees are scaled by a factor of k / (k + learning_rate).
    • :forest - New trees have the same weight of sum of dropped trees (forest).
      • Weight of new trees are 1 / (1 + learning_rate).
      • Dropped trees are scaled by a factor of 1 / (1 + learning_rate). The default value is :tree.
  • :rate_drop - Dropout rate (a fraction of previous trees to drop during the dropout). Valid range is [0, 1]. The default value is 0.0.

  • :one_drop - When this flag is enabled, at least one tree is always dropped during the dropout (allows Binomial-plus-one or epsilon-dropout from the original DART paper). The default value is 0.

  • :skip_drop - Probability of skipping the dropout procedure during a boosting iteration. Valid range is [0, 1].

    • If a dropout is skipped, new trees are added in the same manner as gbtree.
    • Note that non-zero skip_drop has higher priority than rate_drop or one_drop. The default value is 0.0.

Learning Task Parameters

  • :objective - Specify the learning task and the corresponding learning objective. The objective options are:

    • :reg_squarederror - regression with squared loss.
    • :reg_squaredlogerror - regression with squared log loss $\frac{1}{2}[\log (pred + 1) - \log (label + 1)]^2$. All input labels are required to be greater than -1. Also, see metric rmsle for possible issue with this objective.
    • :reg_logistic - logistic regression.
    • :reg_pseudohubererror - regression with Pseudo Huber loss, a twice differentiable alternative to absolute loss.
    • :reg_absoluteerror - Regression with L1 error. When tree model is used, leaf value is refreshed after tree construction. If used in distributed training, the leaf value is calculated as the mean value from all workers, which is not guaranteed to be optimal.
    • :reg_quantileerror - Quantile loss, also known as pinball loss. See later sections for its parameter and Quantile Regression for a worked example.
    • :binary_logistic - logistic regression for binary classification, output probability
    • :binary_logitraw - logistic regression for binary classification, output score before logistic transformation
    • :binary_hinge - hinge loss for binary classification. This makes predictions of 0 or 1, rather than producing probabilities.
    • :count_poisson - Poisson regression for count data, output mean of Poisson distribution.
      • max_delta_step is set to 0.7 by default in Poisson regression (used to safeguard optimization)
    • :survival_cox - Cox regression for right censored survival time data (negative values are considered right censored). Note that predictions are returned on the hazard ratio scale (i.e., as HR = exp(marginal_prediction) in the proportional hazard function h(t) = h0(t) * HR).
    • :survival_aft - Accelerated failure time model for censored survival time data. See Survival Analysis with Accelerated Failure Time for details.
    • :multi_softmax - set XGBoost to do multiclass classification using the softmax objective, you also need to set num_class(number of classes)
    • :multi_softprob - same as softmax, but output a vector of ndata nclass, which can be further reshaped to ndata nclass matrix. The result contains predicted probability of each data point belonging to each class.
    • :rank_ndcg - Use LambdaMART to perform pair-wise ranking where Normalized Discounted Cumulative Gain (NDCG) is maximized. This objective supports position debiasing for click data.
    • :rank_map - Use LambdaMART to perform pair-wise ranking where Mean Average Precision (MAP) is maximized
    • :rank_pairwise - Use LambdaRank to perform pair-wise ranking using the ranknet objective.
    • :reg_gamma - gamma regression with log-link. Output is a mean of gamma distribution. It might be useful, e.g., for modeling insurance claims severity, or for any outcome that might be gamma-distributed.
    • :reg_tweedie - Tweedie regression with log-link. It might be useful, e.g., for modeling total loss in insurance, or for any outcome that might be Tweedie-distributed. The default value is :reg_squarederror.
  • :base_score (float/0) - The initial prediction score of all instances, global bias The parameter is automatically estimated for selected objectives before training. To disable the estimation, specify a real number argument. For sufficient number of iterations, changing this value will not have too much effect.

  • :eval_metric - Evaluation metrics for validation data, a default metric will be assigned according to objective (:rmse for regression, and :logloss for classification, mean average precision for :rank_map, etc.) User can add multiple evaluation metrics.

    • :rmse - root mean square error
    • :rmsle - root mean square log error. Default metric of :reg_squaredlogerror objective. This metric reduces errors generated by outliers in dataset. But because log function is employed, :rmsle might output nan when prediction value is less than -1. See :reg_squaredlogerror for other requirements.
    • :mae - mean absolute error
    • :mape - mean absolute percentage error
    • :mphe - mean Pseudo Huber error. Default metric of :reg_pseudohubererror objective.
    • :logloss - negative log-likelihood
    • :error - Binary classification error rate. It is calculated as #(wrong cases)/#(all cases). For the predictions, the evaluation will regard the instances with prediction value larger than 0.5 as positive instances, and the others as negative instances.
    • {:error,t} - a different than 0.5 binary classification threshold value could be specified by providing a numerical value through t.
    • :merror - Multiclass classification error rate. It is calculated as #(wrong cases)/#(all cases).
    • :mlogloss - Multiclass logloss.
    • :auc - Receiver Operating Characteristic Area under the Curve. Available for classification and learning-to-rank tasks.
      • When used with binary classification, the objective should be :binary_logistic or similar functions that work on probability.
      • When used with multi-class classification, objective should be :multi_softprob instead of :multi_softmax, as the latter doesn’t output probability. Also the AUC is calculated by 1-vs-rest with reference class weighted by class prevalence.
      • When used with LTR task, the AUC is computed by comparing pairs of documents to count correctly sorted pairs. This corresponds to pairwise learning to rank. The implementation has some issues with average AUC around groups and distributed workers not being well-defined.
      • On a single machine the AUC calculation is exact. In a distributed environment the AUC is a weighted average over the AUC of training rows on each node - therefore, distributed AUC is an approximation sensitive to the distribution of data across workers. Use another metric in distributed environments if precision and reproducibility are important.
      • When input dataset contains only negative or positive samples, the output is NaN. The behavior is implementation defined, for instance, scikit-learn returns instead.
    • :aucpr - Area under the PR curve. Available for classification and learning-to-rank tasks.
    • :ndcg - Normalized Discounted Cumulative Gain
    • :map - Mean Average Precision
    • {:ndcg,n}, {:map,n} - n can be assigned as an integer to cut off the top positions in the lists for evaluation.
    • :inv_ndcg, :inv_map, {:inv_ndcg, n}, {:inv_map, n} - In XGBoost, the NDCG and MAP evaluate the score of a list without any positive samples as 1. By using the :inv_ variant, we can ask XGBoost to evaluate these scores as 0 to be consistent under some conditions.
    • :poisson_nloglik - negative log-likelihood for Poisson regression
    • :gamma_nloglik - negative log-likelihood for gamma regression
    • :cox_nloglik - negative partial log-likelihood for Cox proportional hazards regression
    • :gamma_deviance - residual deviance for gamma regression
    • :tweedie_nloglik - negative log-likelihood for Tweedie regression (at a specified value of the :tweedie_variance_power parameter). Must provide :tweedie_variance_power parameter.
    • {:tweedie_nloglik, rho} - negative log-likelihood for Tweedie regression with rho denoting the :tweedie_variance_power parameter.
    • :aft_nloglik - Negative log likelihood of Accelerated Failure Time model. See Survival Analysis with Accelerated Failure Time for details.
    • :interval_regression_accuracy - Fraction of data points whose predicted labels fall in the interval-censored labels. Only applicable for interval-censored data. See Survival Analysis with Accelerated Failure Time for details.
  • :seed (non_neg_integer/0) - Random number seed. The default value is 0.

  • :set_seed_per_iteration (boolean/0) - Seed PRNG determnisticly via iterator number. The default value is false.

Objective-Specific Parameters

Tweedie Regression Parameters

  • :tweedie_variance_power - Parameter that controls the variance of the Tweedie distribution var(y) ~ E(y)^tweedie_variance_power. Valid range is (1,2). Set closer to 2 to shift towards a gamma distribution. Set closer to 1 to shift towards a Poisson distribution. The default value is 1.5.

Pseudo-Huber Error Parameters

  • :huber_slope - A parameter used for Pseudo-Huber loss. The default value is 1.0.

Quantile Error Parameters

  • :quantile_alpha - Targeted Quantile. The default value is 0.5.

Survival Analysis Parameters

  • :aft_loss_distribution - Probability Density Function, :normal, :logistic, or :extreme. The default value is :normal.

Ranking Parameters

  • :lambdarank_pair_method - How to construct pairs for pair-wise learning.

    • :mean - Sample lambdarank_num_pair_per_sample pairs for each document in the query list.
    • :topk - Focus on top-lambdarank_num_pair_per_sample documents. Construct pairs for each document at the top-lambdarank_num_pair_per_sample ranked by the model. The default value is :mean.
  • :lambdarank_num_pair_per_sample - It specifies the number of pairs sampled for each document when pair method is :mean, or the truncation level for queries when the pair method is :topk. For example, to train with {:ndcg,6}, set :lambdarank_num_pair_per_sample to 6 and :lambdarank_pair_method to topk. Valid range is [1, $\infty$].

  • :lambdarank_unbiased (boolean/0) - Specify whether do we need to debias input click data. The default value is false.

  • :lambdarank_bias_norm - LP normalization for position debiasing, default is L2. Only relevant when lambdarank_unbiased is set to true. The default value is 2.0.

  • :ndcg_exp_gain (boolean/0) - Whether we should use exponential gain function for NDCG. There are two forms of gain function for NDCG, one is using relevance value directly while the other is using 2^rel -1 to emphasize on retrieving relevant documents. When :ndcg_exp_gain is true (the default), relevance degree cannot be greater than 31. The default value is true.

Multi-Class Classification Parameters

Summary

Functions

Validates the EXGBoost parameters and returns a keyword list of the validated parameters.

Functions

@spec validate!(keyword()) :: keyword()

Validates the EXGBoost parameters and returns a keyword list of the validated parameters.