Code Monkey home page Code Monkey logo

Comments (2)

sergioburdisso avatar sergioburdisso commented on May 21, 2024

Hey @ydennisy! Thanks :D

I think it could be possible to use explanations with other models, as long as the Live Test tool receives a JSON holding the value each word/element has, it will work regarding the model being used. In principle, updating the server module's code (server.py) so that a JSON for the classification result could be generated by other models will do the trick. However, since most supervised machine learning models work as black boxes, representing input documents as feature vectors, we will need to use some method/technique on top of it (such as LIME) to try to infer/estimate how valuable each raw input element was according to the model being used. This was straightforward for the SS3 model since, by design, the model explicitly learns a confidence value for each input element and each class, and then, the classification is performed directly based on those values. This confidence value tells how relevant each input element is as if we were asking "How much value has this element for this class?". e.g. after training the model, SS3 would learn something like:

value("apple", technology) = 0.7
value("apple", business) = 0.5
value("apple", food) = 0.9

and

value("the", technology) = value("the", business) = value("the", food) = 0

That is, "apple" has a value of 0.7 for technology, 0.5 for business, and 0.9 for food, whereas "the" has no value for any category. Note that even Multinomial Naive Bayes (a white box model) wouldn't work "out of the box" either since it values/weights each element by its probability (log P(w|c)) and hence (stop)words like "the", "a", "with", etc. would have the highest value (i.e. highest probability).

Regarding Evaluation, I think it is also feasible, at least for models with three hyperparameters (or less); with more than three hyperparameters we will need to think about how to adapt the Evaluation 3D Plot UI for letting users select only the three (or less) hyperparameters they are interested in.

from pyss3.

sergioburdisso avatar sergioburdisso commented on May 21, 2024

(I'm closing this issue, but feel free to reopen it whenever you want, I'll also reopen in case sometime in the future I'm able to actually implement this. Anyways, thanks for raising the question πŸ’ͺπŸ€“πŸ‘Take care!)

from pyss3.

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.