Giter VIP home page Giter VIP logo

Comments (1)

Mec-iS avatar Mec-iS commented on June 10, 2024

Hi, thanks for using smartcore and finding this.

It looks like at the moment cross_validate works only for types that implement SupervisedEstimator trait; SVC implement SupervisedEstimatorBorrow instead, that is a variant that allows saving memory allocation. The solution can be:

  1. or we implement SupervisedEstimator for SVC in place of SupervisedEstimatorBorrow
  2. or we change cross_validate to accept SupervisedEstimatorBorrow and implement it for the other models (linear regression, ...); this way SupervisedEstimator will be used only with cross_val_predict (because it actually need a predict method).
  3. or we develop a cross_validate_borrow function that takes types that implement SupervisedEstimatorBorrow

SVC was not meant to be used with cross_validate in the first place as we didn't have a use case for that. At the moment cross_validate works only with estimators that have also Predictor trait (SupervisedEstimator is composed with Predictor while the "borrow" version is not). There is note about this in the documentation but I admit it should be referenced in the cross_validate documentation.

If you have any idea about how to fix this it would be great to hear, you can also open a Pull Request to fix it. If it is indeed deemed useful and we find a solution it will be released with the next version.

NOTE: model_selection module is missing the documentation, it would be also great if you can provide it.

from smartcore.

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.