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

Method LoadLargeParameters

catboost/private/libs/embedding_features/knn.cpp:121–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119 }
120
121 void TKNNCalcer::LoadLargeParameters(IInputStream* stream) {
122 if (IsClassification) {
123 ::Load(stream, TargetClasses);
124 } else {
125 ::Load(stream, Targets);
126 }
127 size_t indexSize = ::LoadSize(stream);
128 TLengthLimitedInput indexArrayStream(stream, indexSize);
129 auto indexArray = TBlob::FromStream(indexArrayStream);
130 CB_ENSURE(indexArray.Size() == indexSize);
131 TVector<float> points(TotalDimension * Size);
132 ::Load(stream, points);
133 Cloud = MakeHolder<TKNNCloud>(
134 std::move(indexArray),
135 std::move(points),
136 Size,
137 TotalDimension
138 );
139 }
140
141 TEmbeddingFeatureCalcerFactory::TRegistrator<TKNNCalcer> KNNRegistrator(EFeatureCalcerType::KNN);
142

Callers

nothing calls this directly

Calls 4

LoadSizeFunction · 0.85
LoadFunction · 0.50
moveFunction · 0.50
SizeMethod · 0.45

Tested by

no test coverage detected