-
-
Notifications
You must be signed in to change notification settings - Fork 553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend DataVisualizer and Update DataVisualizer Subclasses #927
Extend DataVisualizer and Update DataVisualizer Subclasses #927
Conversation
The class labels that define the discrete values in the target. Only | ||
available if the target type is discrete. This is guaranteed to be | ||
strings even if the classes are a different type. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit worried about consistency in the docstring of ParallelCoordinates, RadViz, and DataVisualizer ... then eventually in PCA and Manifold as well. Any advice would be welcome!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question... perhaps we should open up a follow-on task. @Kautumn06 — thoughts? You're always so good at helping with consistency in our communications across similar visualizers!
if color==None and colormap==None: | ||
colormap=palettes.DEFAULT_SEQUENCE | ||
if colors is None and colormap is None: | ||
colormap = palettes.DEFAULT_SEQUENCE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that I did look into moving this to resolve_colors
-- right now if both are None, resolve_colors
just returns the default color cycle. We do still need to do something better than this though.
CONTINUOUS = 'continuous' | ||
UNKNOWN = "unknown" | ||
|
||
def __eq__(self, other): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Required so you can do TargetType.AUTO == 'auto'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whew! This is a big contribution @bbengfort that not only clears a lot of debt but also clears a really nice path forward for simplifying existing visualizers that perform similar computations and transformations, and for creating new visualizers that can leverage nice, well-documented base classes. I particularly like the new get_colors
method!
I've noted a few minor things, suggestions and questions (for instance, do you think we should update the coloration FAQ answer?) — let me know what you think and thanks again for taking on such a big effort with such aplomb!
Have just been reading through old issues — wondering if this (or perhaps one of the upcoming Manifold PRs that you and @naresh-bachwani are working on) will also close #437? |
visualizer = ParallelCoordinates( | ||
classes=classes, features=features, colormap="PRGn" | ||
visualizer = Manifold( | ||
manifold="isomap", target="continuous", colormap="YlOrRd" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@naresh-bachwani let's make sure this is true in #930!
@rebeccabilbro as requested, I've updated the FAQ. |
Thank you @bbengfort! The updated FAQ looks terrific — I just pushed up a tiny typo correction, so will get this merged in as soon as the tests finish running. |
This PR is primarily to fix #923 - which I thought would be a simple and short update to get @naresh-bachwani moving forward on his
ProjectionVisualizer
project. Nothing is simple, however, and the cleanup caused me to have to extend functionality and one thing led to another so here we are.Please see my inline comments in the PR for more detail, but broadly I have made the following changes:
DataVisualizer
with better color handling capabilityParallelCoordinates
andRadViz
to make use of this functionalityThese changes pave the way to make ParallelCoordinates and RadViz more general data visualizers for different target types (radviz for regressors as discussed in #73!), and could be the start for solutions such as those requested in #677, #476, #556
CHECKLIST
pytest
?make html
?