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

Function CatBoostSerializeModel_R

catboost/R-package/src/catboostr.cpp:819–829  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

817}
818
819EXPORT_FUNCTION CatBoostSerializeModel_R(SEXP handleParam) {
820 SEXP result = NULL;
821 R_API_BEGIN();
822 TFullModelHandle modelHandle = static_cast<TFullModelHandle>(R_ExternalPtrAddr(handleParam));
823 const TString raw = SerializeModel(*modelHandle);
824 result = PROTECT(allocVector(RAWSXP, raw.size()));
825 MemCopy(RAW(result), (const unsigned char*)(raw.data()), raw.size());
826 R_API_END();
827 UNPROTECT(1);
828 return result;
829}
830
831EXPORT_FUNCTION CatBoostDeserializeModel_R(SEXP rawParam) {
832 SEXP result = NULL;

Callers

nothing calls this directly

Calls 4

SerializeModelFunction · 0.85
MemCopyFunction · 0.85
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected