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

Method save

catboost/python-package/catboost/core.py:1222–1237  ·  view source on GitHub ↗

Save the quantized pool to a file. Parameters ---------- fname : string or os.PathLike Output file name.

(self, fname)

Source from the content-addressed store, hash-verified

1220 return self
1221
1222 def save(self, fname):
1223 """
1224 Save the quantized pool to a file.
1225
1226 Parameters
1227 ----------
1228 fname : string or os.PathLike
1229 Output file name.
1230 """
1231 if not self.is_quantized():
1232 raise CatBoostError('Pool is not quantized')
1233
1234 if not isinstance(fname, PATH_TYPES):
1235 raise CatBoostError("Invalid fname type={}: must be str or os.PathLike.".format(type(fname)))
1236
1237 self._save(fname)
1238
1239 def quantize(self, ignored_features=None, per_float_feature_quantization=None, border_count=None,
1240 max_bin=None, feature_border_type=None, sparse_features_conflict_fraction=None,

Callers 15

testModelSerializationFunction · 0.45
implTestCaseFunction · 0.45
testModelSerializationFunction · 0.45
test_predict_class_probaFunction · 0.45
test_multiclassFunction · 0.45
test_fit_dataFunction · 0.45

Calls 4

isinstanceFunction · 0.85
CatBoostErrorClass · 0.50
typeClass · 0.50
formatMethod · 0.45

Tested by 15

testModelSerializationFunction · 0.36
implTestCaseFunction · 0.36
testModelSerializationFunction · 0.36
test_predict_class_probaFunction · 0.36
test_multiclassFunction · 0.36
test_fit_dataFunction · 0.36