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

Method TCpuGrid

catboost/cuda/gpu_data/feature_layout_common.h:68–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66
67 template <class TFeaturesBinarizationDescription>
68 TCpuGrid(const TFeaturesBinarizationDescription& info,
69 const TVector<ui32>& features)
70 : AllFeatureIds(features)
71 {
72 AllFolds.reserve(features.size());
73 Folds.reserve(features.size());
74 IsOneHot.reserve(features.size());
75 for (ui32 i = 0; i < features.size(); ++i) {
76 IsOneHot.push_back(info.IsEffectivelyOneHot(features[i]));
77 const bool skipInSplitSearch = info.SkipInSplitSearch(features[i]);
78 SkipInSplitSearch.push_back(skipInSplitSearch);
79 const ui32 folds = info.GetFoldsCount(features[i]);
80 AllFolds.push_back(folds);
81 if (skipInSplitSearch) {
82 continue;
83 }
84 FeatureIds.push_back(features[i]);
85 Folds.push_back(folds);
86 SkipFirstBucketWhileScoring.push_back(info.SkipFirstBucketInOneHot(features[i]));
87 }
88 InverseFeatures = BuildInverseIndex(AllFeatureIds);
89 }
90
91 TCpuGrid Subgrid(const TVector<ui32>& indices) const {
92 TCpuGrid grid;

Callers

nothing calls this directly

Calls 7

reserveMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45
IsEffectivelyOneHotMethod · 0.45
SkipInSplitSearchMethod · 0.45
GetFoldsCountMethod · 0.45

Tested by

no test coverage detected