Medial Code Documentation
Loading...
Searching...
No Matches
Namespaces | Data Structures | Functions
xgboost::obj Namespace Reference

Copyright 2022-2023 by XGBoost contributors. More...

Namespaces

namespace  detail
 Copyright 2022-2023 by XGBoost Contributors.
 

Data Structures

class  FitIntercept
 
class  LambdaRankMAP
 
class  LambdaRankNDCG
 
class  LambdaRankObj
 Base class for pair-wise learning to rank. More...
 
class  LambdaRankPairwise
 The RankNet loss. More...
 
struct  LinearSquareLoss
 
struct  LinearSquareLossOneAPI
 
struct  LogisticClassification
 
struct  LogisticClassificationOneAPI
 
struct  LogisticRaw
 
struct  LogisticRawOneAPI
 
struct  LogisticRegression
 
struct  LogisticRegressionOneAPI
 
class  MyLogistic
 
struct  MyLogisticParam
 
class  RegLossObjOneAPI
 
struct  RegLossParamOneAPI
 
struct  SquaredLogError
 
struct  SquaredLogErrorOneAPI
 

Functions

 DMLC_REGISTER_PARAMETER (MyLogisticParam)
 
 describe ("User defined logistic regression plugin") .set_body([]()
 
float SigmoidOneAPI (float x)
 calculate the sigmoid of the input.
 
 DMLC_REGISTRY_FILE_TAG (regression_obj_oneapi)
 
 DMLC_REGISTER_PARAMETER (RegLossParamOneAPI)
 
 describe ("Regression with squared error with DPC++ backend.") .set_body([]()
 
 describe ("Regression with root mean squared logarithmic error with DPC++ backend.") .set_body([]()
 
 describe ("Logistic regression for probability regression task with DPC++ backend.") .set_body([]()
 
 describe ("Logistic regression for binary classification task with DPC++ backend.") .set_body([]()
 
 describe ("Logistic regression for classification, output score " "before logistic transformation with DPC++ backend.") .set_body([]()
 
void UpdateTreeLeaf (Context const *ctx, HostDeviceVector< bst_node_t > const &position, std::int32_t group_idx, MetaInfo const &info, float learning_rate, HostDeviceVector< float > const &predt, float alpha, RegTree *p_tree)
 
 DMLC_REGISTRY_FILE_TAG (aft_obj)
 
 DMLC_REGISTRY_FILE_TAG (hinge_obj)
 
void CheckInitInputs (MetaInfo const &info)
 
 describe ("LambdaRank with NDCG loss as objective") .set_body([]()
 
 describe ("LambdaRank with RankNet loss as objective") .set_body([]()
 
 describe ("LambdaRank with MAP loss as objective.") .set_body([]()
 
 DMLC_REGISTRY_FILE_TAG (lambdarank_obj)
 
double constexpr Eps64 ()
 
template<bool exp>
XGBOOST_DEVICE double DeltaNDCG (float y_high, float y_low, std::size_t rank_high, std::size_t rank_low, double inv_IDCG, common::Span< double const > discount)
 
XGBOOST_DEVICE double DeltaMAP (float y_high, float y_low, std::size_t rank_high, std::size_t rank_low, common::Span< double const > n_rel, common::Span< double const > acc)
 
template<bool unbiased, typename Delta >
XGBOOST_DEVICE GradientPair LambdaGrad (linalg::VectorView< float const > labels, common::Span< float const > predts, common::Span< size_t const > sorted_idx, std::size_t rank_high, std::size_t rank_low, Delta delta, linalg::VectorView< double const > t_plus, linalg::VectorView< double const > t_minus, double *p_cost)
 
XGBOOST_DEVICE GradientPair Repulse (GradientPair pg)
 
template<typename Op >
void MakePairs (Context const *ctx, std::int32_t iter, std::shared_ptr< ltr::RankingCache > const cache, bst_group_t g, linalg::VectorView< float const > g_label, common::Span< std::size_t const > g_rank, Op op)
 
 DMLC_REGISTRY_FILE_TAG (multiclass_obj)
 
 DMLC_REGISTRY_LINK_TAG (regression_obj)
 
 DMLC_REGISTRY_LINK_TAG (quantile_obj)
 
 DMLC_REGISTRY_LINK_TAG (hinge_obj)
 
 DMLC_REGISTRY_LINK_TAG (multiclass_obj)
 
 DMLC_REGISTRY_LINK_TAG (lambdarank_obj)
 
 DMLC_REGISTRY_FILE_TAG (quantile_obj)
 
 DMLC_REGISTRY_FILE_TAG (regression_obj)
 
 TEST (LambdaRank, NDCGJsonIO)
 
void TestNDCGGPair (Context const *ctx)
 
 TEST (LambdaRank, NDCGGPair)
 
void TestUnbiasedNDCG (Context const *ctx)
 
 TEST (LambdaRank, UnbiasedNDCG)
 
void InitMakePairTest (Context const *ctx, MetaInfo *out_info, HostDeviceVector< float > *out_predt)
 Initialize test data for make pair tests.
 
 TEST (LambdaRank, MakePair)
 
void TestMAPStat (Context const *ctx)
 
 TEST (LambdaRank, MAPStat)
 
void TestMAPGPair (Context const *ctx)
 
 TEST (LambdaRank, MAPGPair)
 
void TestPairWiseGPair (Context const *ctx)
 
 TEST (LambdaRank, Pairwise)
 
void TestNDCGJsonIO (Context const *ctx)
 

Detailed Description

Copyright 2022-2023 by XGBoost contributors.

Copyright (c) 2023, XGBoost Contributors.

Copyright 2023 by XGBoost Contributors.

Copyright 2023, XGBoost contributors.

Copyright (c) 2023, XGBoost contributors.

Vocabulary explanation:

There are two different lists we need to handle in the objective, first is the list of labels (relevance degree) provided by the user. Its order has no particular meaning when bias estimation is NOT used. Another one is generated by our model, sorted index based on prediction scores. rank_high refers to the position index of the model rank list that is higher than rank_low, while idx_high refers to where does the rank_high sample comes from. Simply put, rank_high indexes into the rank list obtained from the model, while idx_high indexes into the user provided sample list.

Function Documentation

◆ MakePairs()

template<typename Op >
void xgboost::obj::MakePairs ( Context const *  ctx,
std::int32_t  iter,
std::shared_ptr< ltr::RankingCache > const  cache,
bst_group_t  g,
linalg::VectorView< float const >  g_label,
common::Span< std::size_t const >  g_rank,
Op  op 
)
Parameters
Constructpairs on CPU
Template Parameters
OpFunctor for upgrading a pair of gradients.
Parameters
ctxThe global context.
iterThe boosting iteration.
cacheltr cache.
gThe current query group
g_labellabel The labels for the current query group
g_rankSorted index of model scores for the current query group.
opA callable that accepts two index for a pair of documents. The index is for the ranked list (labels sorted according to model scores).

◆ SigmoidOneAPI()

float xgboost::obj::SigmoidOneAPI ( float  x)
inline

calculate the sigmoid of the input.

Parameters
xinput parameter
Returns
the transformed value.