Giter Site home page Giter Site logo

Don't freeze version of packages about kmodes HOT 7 CLOSED

nicodv avatar nicodv commented on July 25, 2024 1
Don't freeze version of packages

from kmodes.

Comments (7)

nicodv avatar nicodv commented on July 25, 2024 1

After reading https://blog.miguelgrinberg.com/post/the-package-dependency-blues, I've moved to ranges of dependency package versions:

install_requires=[
        'numpy>=1.13.0, <1.14.0',
        'scikit-learn>=0.18.0, <0.19.0',
        'scipy>=0.19.0, <0.20.0',
    ]

from kmodes.

shapiromatron avatar shapiromatron commented on July 25, 2024

scikit-learn has a few more recent versions, could this range be increased?

from kmodes.

nicodv avatar nicodv commented on July 25, 2024

@shapiromatron Unfortunately, scikit-learn 0.20 introduces some breaking changes to k-modes. I'm holding off for a bit, but feel free to try it and file a PR. :)

from kmodes.

shapiromatron avatar shapiromatron commented on July 25, 2024

Thanks @nicodv; I just wanted to make sure it really was required. I'll take a look at see what I can do....

from kmodes.

trevorstephens avatar trevorstephens commented on July 25, 2024

What breaks Nico? gplearn hasn't seen any issues since the RNG changed in I think 0.18 and I believe we mostly use the same sklearn utils

from kmodes.

nicodv avatar nicodv commented on July 25, 2024

I seem to recall the sklearn compatibility tests have to be rewritten, @trevorstephens : https://github.com/nicodv/kmodes/blob/master/kmodes/tests/test_common.py

I've always had to customize that file entirely, because kprototypes takes an extra argument (categoricals) to the fit/predict methods and that breaks sklearn compatibility. I'd still like to comply as much as I can, though.

from kmodes.

trevorstephens avatar trevorstephens commented on July 25, 2024

Ah yes that makes sense. I saw something vaguely similar from Py-earth in the mailing list saying some of his tests failed due to extra args as well:

I'm working on updating py-earth for some recent changes in scikit-learn and cython. It seems like check_estimator has been significantly improved, and I'm working through making py-earth compliant with it. I've hit the following issue, though. It seems check_estimator tests score_samples using only X as an argument, and py-earth's score_samples requires y as well. So, my question is: must score_samples work with just X (and therefore maybe I should just remove it from py-earth) or is it okay to have a score_samples that requires y, and I should try to find a workaround for check_estimator?

You might want to pile onto this PR with some suggestions for your package as was suggested for py-earth: scikit-learn/scikit-learn#8022

from kmodes.

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.