MCPcopy Create free account
hub / github.com/catboost/catboost / GetInitialBorders

Function GetInitialBorders

catboost/private/libs/algo/data.cpp:56–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54 using TInitialBorders = TMaybe<TVector<TConstArrayRef<float>>>;
55
56 static TInitialBorders GetInitialBorders(TMaybe<TFullModel*> initModel) {
57 if (!initModel) {
58 return Nothing();
59 }
60 TVector<TConstArrayRef<float>> bordersInInitModel;
61 bordersInInitModel.reserve((*initModel)->ModelTrees.GetMutable()->GetFloatFeatures().size());
62 for (const auto& floatFeature : (*initModel)->ModelTrees.GetMutable()->GetFloatFeatures()) {
63 bordersInInitModel.emplace_back(floatFeature.Borders.begin(), floatFeature.Borders.end());
64 }
65 return bordersInInitModel;
66 }
67
68 TTrainingDataProviderPtr GetTrainingData(
69 TDataProviderPtr srcData,

Callers 1

GetTrainingDataFunction · 0.85

Calls 8

NothingFunction · 0.85
GetFloatFeaturesMethod · 0.80
GetMutableMethod · 0.80
reserveMethod · 0.45
sizeMethod · 0.45
emplace_backMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected