[Breaking] Set output margin to True for custom objective. (#5564)
* Set output margin to True for custom objective in Python and R. * Add a demo for writing multi-class custom objective function. * Run tests on selected demos.
This commit is contained in:
@@ -295,6 +295,9 @@ void GBTree::BoostNewTrees(HostDeviceVector<GradientPair>* gpair,
|
||||
}
|
||||
}
|
||||
// update the trees
|
||||
CHECK_EQ(gpair->Size(), p_fmat->Info().num_row_)
|
||||
<< "Mismatching size between number of rows from input data and size of "
|
||||
"gradient vector.";
|
||||
for (auto& up : updaters_) {
|
||||
up->Update(gpair, p_fmat, new_trees);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user