Git Product home page Git Product logo

Comments (7)

ibnesayeed avatar ibnesayeed commented on May 31, 2024 1

Redis backend implementation is done (except code review and documentation). How about MongoDB, SQLite, MySQL, and/or PostgreSQL backends (a single ORM style implementation would cover them all)? Because Redis, though persistent, is still memory based and would require a lot of memory for bigger datasets.

from classifier-reborn.

Ch4s3 avatar Ch4s3 commented on May 31, 2024

That sounds pretty compelling. I'd be happy to look at a pr.

from classifier-reborn.

ibnesayeed avatar ibnesayeed commented on May 31, 2024

I will try to give it a shot. However, looking at the code in bayes.rb, I feel that it would be a lot easier and quicker to abstract out certain portions of train, untrain and classifications methods as separate private methods and conditionally alias them (during initialization) for their corresponding Redis implementations. I earlier proposed overriding [] and []= methods, but after looking at the actual code, I think that would be too complected and unnecessary.

from classifier-reborn.

parkr avatar parkr commented on May 31, 2024

from classifier-reborn.

ibnesayeed avatar ibnesayeed commented on May 31, 2024

@parkr: Yeah, one common idiom is to create backends. So you have a MemoryBackend, a RedisBackend, and so forth. They all share a common interface but are separate so you can worry about one at a time.

I tried using this backend approach you suggested. Currently, it only supports the Memory backend, but the refactoring I did establishes the foundation and uniform API for other backends. Please find the changes in PR #84. I would really appreciate any code reviews and comments. I would note that I touched some Ruby code after a long time.

from classifier-reborn.

Ch4s3 avatar Ch4s3 commented on May 31, 2024

Hum. I'd say we might want to wait until we have some users that want to use a database backend. We have a pretty small number of contributors, so I don't like to add a lot of things that have to be maintained unless they're going to get used.

from classifier-reborn.

ibnesayeed avatar ibnesayeed commented on May 31, 2024

Closing this as this is now implemented by #84.

from classifier-reborn.

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.