GithubHelp home page GithubHelp logo

Comments (17)

lopuhin avatar lopuhin commented on September 26, 2024

I tried some approaches for making whitespace at the end visible: changing background, adding border, replacing it with single and double underscore (https://en.wikipedia.org/wiki/Underscore), white and black square, etc., but at the end solution I like the most is to just put features having space at the start or at the end in double quotes. It's also possible to apply it to just features having space at the end (as a space at the start is visible by indentation level), but for some reason applying this rule to space both at the start and at the end feels more natural. Here is how it looks like:
2016-10-21 19 34 37

from eli5.

kmike avatar kmike commented on September 26, 2024

The main problem with " is that it can be a part of a feature name, so feature names become ambiguous. Are there unambiguous options which look slightly worse, or do they all look much worse?

from eli5.

lopuhin avatar lopuhin commented on September 26, 2024

This was my second best, a double underscore, I almost went with it before thinking of quoting:
2016-10-21 19 23 38
But it's also not strictly unambiguous (we could also just use more fancy quotes).

Let me think of something reasonably looking and really unambiguous.

from eli5.

lopuhin avatar lopuhin commented on September 26, 2024

Other options are adding a slight border or background, they look not terribly bad, but what I dislike is that all feature names become affected (I also use emspace here because it is larger and makes it more obvious that there is a gap).
2016-10-21 20 14 49
2016-10-21 20 16 26

from eli5.

lopuhin avatar lopuhin commented on September 26, 2024

I dislike is that all feature names become affected

I mean that it would look strange if we just apply these styles to items with space in them - it would seem that they are more important. But if we apply these styles only if there are some features with spaces, then it seems like a reasonable compromise.

from eli5.

kmike avatar kmike commented on September 26, 2024

what about highlighting only whitespaces, not features themselves?

from eli5.

kmike avatar kmike commented on September 26, 2024

Inspiration:

from eli5.

lopuhin avatar lopuhin commented on September 26, 2024

Thanks for the inspiration @kmike ! In the editor context I liked dots as spaces better, but in our case I think just highlighting spaces looks better.
I use just two colors here: darker green for positive and darker red for negative. I tried adjusting highlighting color according to the current weight color (making a darker version of weight color instead of using a constant color), but it looked worse.
Here is a notebook with new space highlighting scheme: https://github.com/TeamHG-Memex/eli5/blob/visible-space/notebooks/explain_text_prediction_char.ipynb

from eli5.

kmike avatar kmike commented on September 26, 2024

Yeah, I agree highlighting looks better.
What do you think about making it less bright, e.g. using S=70% and L=70%?
2016-10-24 14 26 17

If the letter which is close to a whitespace is l or other similar letter it is a bit hard to distinguish with dark highlighting:

2016-10-24 14 27 31

from eli5.

kmike avatar kmike commented on September 26, 2024

What about using light shade instead of medium shade for whitespaces?
2016-10-24 14 32 29

2016-10-24 14 33 11

from eli5.

kmike avatar kmike commented on September 26, 2024

dots are nice, but sometimes they can look cryptic:

2016-10-24 14 38 08

from eli5.

lopuhin avatar lopuhin commented on September 26, 2024

Yeah, light shade looks much better for text!

About the darkness of color for html: I would rather fix it by adding a little margin, because the current darkness is barely visible over red of max intensity (there is already additional margin here but not looking like I would like):
2016-10-24 15 42 20

Maybe lowering the max intensity of red and green could help, I'll check that.

from eli5.

lopuhin avatar lopuhin commented on September 26, 2024

Agreed, dots look nice with letters but no so nice with other dots :)

from eli5.

kmike avatar kmike commented on September 26, 2024

The margin looks good, I like it. Re max. density: text also is not very visible on the darkest red, maybe we should find a lighter color.

from eli5.

lopuhin avatar lopuhin commented on September 26, 2024

I raised the minimal lightness, here are the new colors: https://github.com/TeamHG-Memex/eli5/blob/visible-space/notebooks/explain_text_prediction_char.ipynb

from eli5.

kmike avatar kmike commented on September 26, 2024

Hm, now it became harder to see highlighting in text: for example, is this text classified as positive or negative, and what are important features?

2016-10-24 15 12 27

(it is positive)

from eli5.

lopuhin avatar lopuhin commented on September 26, 2024

Right, it became too pale. I partly corrected that problem 6604b2c by using different color schemes for weights in table and text, but I think this particular example is also an indicator of another problem - the longer the text, the paler will the in-text features be compared to the BIAS, which stays the same.

from eli5.

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.