MCPcopy
hub / github.com/apple/coremltools / convert

Function convert

coremltools/converters/sklearn/_SVR.py:53–73  ·  view source on GitHub ↗

Convert a Support Vector Regressor (SVR) model to the protobuf spec. Parameters ---------- model: SVR A trained SVR encoder model. feature_names: [str] Name of the input columns. target: str Name of the output column. Returns ------- model_s

(model, features, target)

Source from the content-addressed store, hash-verified

51
52
53def convert(model, features, target):
54 """Convert a Support Vector Regressor (SVR) model to the protobuf spec.
55 Parameters
56 ----------
57 model: SVR
58 A trained SVR encoder model.
59
60 feature_names: [str]
61 Name of the input columns.
62
63 target: str
64 Name of the output column.
65
66 Returns
67 -------
68 model_spec: An object of type Model_pb.
69 Protobuf representation of the model
70 """
71 spec = _generate_base_svm_regression_spec(model)
72 spec = set_regressor_interface_params(spec, features, target)
73 return _MLModel(spec)
74
75
76def get_input_dimension(model):

Used in the wild real call sites across dependent graphs

searching dependent graphs…