Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SVC output #209

Merged
merged 7 commits into from
Jul 11, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion skl2onnx/_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ def _parse_sklearn_column_transformer(scope, model, inputs,
def _parse_sklearn_classifier(scope, model, inputs, custom_parsers=None):
probability_tensor = _parse_sklearn_simple_model(
scope, model, inputs, custom_parsers=custom_parsers)
if model.__class__ in [NuSVC, SVC] and not model.probability:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No unit test?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return probability_tensor
this_operator = scope.declare_local_operator('SklearnZipMap')
this_operator.inputs = probability_tensor
classes = model.classes_
Expand Down Expand Up @@ -387,7 +389,7 @@ def build_sklearn_parsers_map():
map_parser[ColumnTransformer] = _parse_sklearn_column_transformer

for tmodel in sklearn_classifier_list:
if tmodel not in [LinearSVC, SVC, NuSVC]:
if tmodel not in [LinearSVC]:
map_parser[tmodel] = _parse_sklearn_classifier
return map_parser

Expand Down