-
-
Notifications
You must be signed in to change notification settings - Fork 554
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
Detect continuous/discrete target vals for color util #73
Comments
Now that we have the |
Finding a solution to this has been tricky because discrete classes has been embedded into the logic of both RadViz and ParallelCoordinates. There are two primary features that continuous data requires:
To handle this for now, I'm going to do add a principle argument to both visualizers called "target_type" whose values should be "auto", "discrete", or "continuous" or None. Discrete or continuous will select the correct methodology. For auto or None values. I will create two utility functions:
Which will accept a vector and use rules to decide if the data is continuous or discrete. Not exactly sure how to implement this. This should solve the issue for now, but we should revisit it when we develop RadViz and ParallelCoordinates with more features and functionality. |
Ok, this ticket has been extremely difficult to work on -- the RadViz and Parallel Coordinates classes are entirely set up for class based visualization only (thanks to their being pulled from matplotlib. This needs to be looked at a bit more closely, and I stashed my changes (which touched nearly every module in yellowbrick). We'll have to push this back to another sprint. |
Sklearn apparently does have a type of target checker that returns continuous or classification as one of it's outputs: https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/utils/multiclass.py#L175 |
A very lightweight version of this has been implemented in #399 |
See #334 for package where this should be placed. |
Implements a helper function that returns continuous or discrete depending on the type of target variable, `y`. This function is similar to the functionality in the Manifold visualizer but makes use of sklearn.util.multiclass.type_of_target to make its determination, along with a limit to the number of discrete colors that can be drawn. Was undecided if this belonged in `yellowbrick.utils` or in `yellowbrick.target` -- am open to discussion on this topic. Fixes #73
Right now the ParallelCoordinates and RadViz do not work for regressions since it supports a class based visualization.
Give these classes the opportunity to do a continuous space by using a sequential colormap and coloring the instance lines according to target value.
The text was updated successfully, but these errors were encountered: