Giter Site home page Giter Site logo

Comments (3)

nok avatar nok commented on May 31, 2024

Hello @anmolshkl , do you get odd predictions between the original and transpiled estimator? Can you post the data and your params? Nevertheless there isn't any error in the regression tests of that classifier (e.g. log). But that doesn't mean, that there isn't an error.

from sklearn-porter.

anmolshkl avatar anmolshkl commented on May 31, 2024

@nok thanks for the quick response. I'm getting the right predictions, and, the accuracy of the transpiled estimator is same as the scikit estimator (frankly, that's why I'm a little confused). To give you a little context about my confusion - I was trying to implement my own estimator for SVC and I tried following libsvm's code for prediction but I just couldn't get it right. Then, I looked into your estimator and found out that sklearn-porter's transpiled estimator uses decisions[d] = tmp + inters[d] while libsvm uses sum -= model->rho[p]. I replaced subtraction with an addition, and, my code started predicting values as expected.

I was just curious and wanted to know if you also encountered this problem while writing the algorithm for the estimator? Also, do you happen to have any reference material you used for writing the SVC estimator algorithm?

from sklearn-porter.

nok avatar nok commented on May 31, 2024

Today I don't know how I figured it out in the past, but in general I add console outputs in the original scikit-learn classes and the generated classes. Then I compared each output and fix any differences on the fly. Finally I wrote regression tests to cover changes in the future.

from sklearn-porter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.