ryanjgallagher / shifterator

Interpretable data visualizations for understanding how texts differ at the word level
Apache License 2.0
273 stars 29 forks source link

Fix x-axis range of cumulative contribution inset #13

Closed ryanjgallagher closed 4 years ago

ryanjgallagher commented 4 years ago

It looks like the cumulative contribution only shows one side of the x-axis. This is ultimately fine usually because it drifts towards either -100 or 100, but if the first however many of the top_n words noticeably go in both directions, then some of their contributions won't be visible on the inset.

Related to this, add an option for the type of normalization. Whether it's cumulative or normalized percent contribution (i.e. normed by absolute value of sum or normed by sum of absolute values).