def convert(model, feature_names, target):
"""Convert a Nu-Support Vector Classification (NuSVC) model to the protobuf spec.
Parameters
----------
model: NuSVC
A trained NuSVC encoder model.
feature_names: [str], optional (default=None)
Name of the input columns.
target: str, optional (default=None)
Name of the output column.
Returns
-------
model_spec: An object of type Model_pb.
Protobuf representation of the model
"""
if not(_HAS_SKLEARN):
raise RuntimeError('scikit-learn not found. scikit-learn conversion API is disabled.')
_sklearn_util.check_expected_type(model, _NuSVC)
return _SVC.convert(model, feature_names, target)
评论列表
文章目录