Save the model to a file.
Method call formatsave_model(fname,
format="cbm",
export_parameters=None,
pool=None)
Parameters fname Description
The path to the output model.
Possible types
string
Default value
Required parameter
format DescriptionThe output format of the model.
Possible values:
cbm — CatBoost binary format.
coreml — Apple CoreML format (only datasets without categorical features are currently supported).
json — JSON format. Refer to the CatBoost JSON model tutorial for format details.
python — Standalone Python code. See the Python section for details on applying the resulting model.
cpp — Standalone C++ code. See the C++ section for details on applying the resulting model.
onnx — ONNX-ML format (only datasets without categorical features are currently supported). Refer to https://onnx.ai/ for details. See the ONNX section for details on applying the resulting model.
pmml — PMML version 4.3 format. Categorical features must be interpreted as one-hot encoded during the training if present in the training dataset. This can be accomplished by setting the --one-hot-max-size
/one_hot_max_size
parameter to a value that is greater than the maximum number of unique categorical feature values among all categorical features in the dataset. See the PMML section for details on applying the resulting model.
Note
Multiclassification models are not currently supported.
Possible types
string
Default value
cbm
export_parameters DescriptionAdditional format-dependent parameters for:
Apple CoreML
Possible values (all are strings):
prediction_type
. Possible values are probability
and raw
.
coreml_description
coreml_model_version
coreml_model_author
coreml_model_license
ONNX-ML
onnx_graph_name
onnx_domain
onnx_model_version
onnx_doc_string
See the ONNX-ML parameters reference for details.
PMML
Possible values (all are strings):
pmml_copyright
pmml_description
pmml_model_version
See the PMML parameters reference for details.
Possible types
dict
Default value
None
pool DescriptionThe dataset previously used for training.
This parameter is required if the model contains categorical features and the output format is cpp, python, or JSON.
Note
The model can be saved to the JSON format without a pool. In this case it is available for review but it is not applicable.
Possible types
Default value
None
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4