nok / sklearn-porter

Transpile trained scikit-learn estimators to C, Java, JavaScript and others.
BSD 3-Clause "New" or "Revised" License
1.28k stars 170 forks source link

Support of the OneVsRestClassifier #19

Open nok opened 6 years ago

nok commented 6 years ago

Original issue found by @Phyks in https://github.com/nok/sklearn-porter/issues/18#issuecomment-333634486:

ValueError: Currently the given model 'OneVsRestClassifier(estimator=LinearSVC(C=1.0, class_weight=None, dual=True, fit_intercept=True,
     intercept_scaling=1, loss='squared_hinge', max_iter=1000,
     multi_class='ovr', penalty='l2', random_state=None, tol=0.0001,
     verbose=0),
          n_jobs=1)' isn't supported.

This issue requires some refactorings of (maybe) all templates. The goal is using object oriented instances the right way, not static methods. Further a solution should be found how we can use templates for the non-object-oriented programming languages.