Copy querywise targets correctly (updated)
@@ -45,6 +45,8 @@ namespace NCatboostCuda {
: TParent(target, slice)
, Params(target.GetParams())
, ScoreMetric(target.GetScoreMetricType())
+ , PairsTotalWeight(target.GetPairsTotalWeight())
+ , TotalWeightedTarget(target.GetTotalWeightedTarget())
{
}
@@ -52,6 +54,8 @@ namespace NCatboostCuda {
: TParent(target)
, Params(target.GetParams())
, ScoreMetric(target.GetScoreMetricType())
+ , PairsTotalWeight(target.GetPairsTotalWeight())
+ , TotalWeightedTarget(target.GetTotalWeightedTarget())
{
}
@@ -60,14 +64,16 @@ namespace NCatboostCuda {
TTarget<TMapping>&& target)
: TParent(basedOn, std::move(target))
, Params(basedOn.GetParams())
- , ScoreMetric(basedOn.GetScoreMetricType())
{
+ Init(basedOn.GetParams());
}
TQuerywiseTargetsImpl(TQuerywiseTargetsImpl&& other)
: TParent(std::move(other))
, Params(other.Params)
, ScoreMetric(other.GetScoreMetricType())
+ , PairsTotalWeight(other.GetPairsTotalWeight())
+ , TotalWeightedTarget(other.GetTotalWeightedTarget())
{
}
@@ -289,6 +295,14 @@ namespace NCatboostCuda {
return EOracleType::Pointwise;
}
+ double GetPairsTotalWeight() const {
+ return PairsTotalWeight;
+ }
+
+ double GetTotalWeightedTarget() const {
+ return TotalWeightedTarget;
+ }
+
private:
void InitYetiRank(const NCatboostOptions::TLossDescription& targetOptions) {
CB_ENSURE(targetOptions.GetLossFunction() == ELossFunction::YetiRank);
