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

Function SimpleDeepTreeModel

catboost/libs/model/ut/lib/model_test_helpers.cpp:305–319  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

303}
304
305TFullModel SimpleDeepTreeModel(size_t treeDepth) {
306 TFullModel model;
307 TModelTrees* trees = model.ModelTrees.GetMutable();
308 for (size_t featureIndex : xrange(treeDepth)) {
309 const auto feature = TFloatFeature(false, featureIndex, featureIndex, {0.5f}, "");
310 trees->AddFloatFeature(feature);
311 }
312 for (size_t val : xrange(1 << treeDepth)) {
313 trees->AddLeafValue(val);
314 }
315 TVector<int> tree = xrange(treeDepth);
316 trees->AddBinTree(tree);
317 model.UpdateDynamicData();
318 return model;
319}
320
321TFullModel SimpleAsymmetricModel() {
322 TVector<TFloatFeature> floatFeatures {

Callers 2

Y_UNIT_TESTFunction · 0.85
Y_UNIT_TESTFunction · 0.85

Calls 7

xrangeFunction · 0.85
GetMutableMethod · 0.80
AddLeafValueMethod · 0.80
AddBinTreeMethod · 0.80
UpdateDynamicDataMethod · 0.80
TFloatFeatureClass · 0.50
AddFloatFeatureMethod · 0.45

Tested by

no test coverage detected