-
Notifications
You must be signed in to change notification settings - Fork 90
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
Parallexaxis doc #249
Merged
Merged
Parallexaxis doc #249
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
9b291b2
More documentation
quaquel 03ce45a
Update parcoords.py
quaquel 3fa3213
Revert "Update outputspace_exploration_lakeproblem.ipynb"
quaquel 5fef735
More documentation
quaquel f7a9de8
Update parcoords.py
quaquel 28922d6
Revert "Update outputspace_exploration_lakeproblem.ipynb"
quaquel 6b88e33
Merge branch 'parallexaxis_doc' of https://github.com/quaquel/EMAwork…
quaquel ae9a479
Revert "Revert "Update outputspace_exploration_lakeproblem.ipynb""
quaquel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -143,6 +143,29 @@ class ParallelAxes: | |
rot : float, optional | ||
rotation of axis labels | ||
|
||
Attributes | ||
---------- | ||
limits : DataFrame | ||
A DataFrame specifying the limits for each dimension in the | ||
data set. For categorical data, the first cell should contain all | ||
categories. | ||
recoding : dict | ||
non numeric columns are converting to integer variables | ||
flipped_axes : set | ||
set of Axes that are to be shown flipped | ||
axis_labels : list of str | ||
fontsize : int | ||
fig : a matplotlib Figure instance | ||
axes : list of matplotlib Axes instances | ||
ticklabels : list of str | ||
datalabels : list of str | ||
labels associated with lines | ||
|
||
Notes | ||
----- | ||
The basic setup of the Parallel Axis plot is a row of mpl Axes instances, with all whitespace | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this line have a header, since from here class methods are discussed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. moved it into Notes which is the proper place for implementation details |
||
in between removed. The number of Axes is the number of columns - 1. | ||
|
||
""" | ||
|
||
def __init__(self, limits, formatter=None, fontsize=14, rot=90): | ||
|
@@ -155,7 +178,6 @@ def __init__(self, limits, formatter=None, fontsize=14, rot=90): | |
formatter : dict, optional | ||
specify precision formatters for minima and maxima, | ||
defaults to .2f | ||
|
||
fontsize : int, optional | ||
fontsize for defaults text items | ||
rot : float, optional | ||
|
@@ -175,8 +197,8 @@ def __init__(self, limits, formatter=None, fontsize=14, rot=90): | |
self.recoding[column] = CategoricalDtype(categories=cats, ordered=False) | ||
self.limits.loc[:, column] = [0, len(cats) - 1] | ||
|
||
self.normalizer = preprocessing.MinMaxScaler() | ||
self.normalizer.fit(self.limits) | ||
self._normalizer = preprocessing.MinMaxScaler() | ||
self._normalizer.fit(self.limits) | ||
|
||
fig, axes, ticklabels = setup_parallel_plot( | ||
self.axis_labels, | ||
|
@@ -231,7 +253,7 @@ def plot(self, data, color=None, label=None, **kwargs): | |
recoded[key] = data[key].astype(value).cat.codes | ||
|
||
# normalize the data | ||
normalized_data = pd.DataFrame(self.normalizer.transform(recoded), columns=recoded.columns) | ||
normalized_data = pd.DataFrame(self._normalizer.transform(recoded), columns=recoded.columns) | ||
|
||
# plot the data | ||
self._plot(normalized_data, color=color, **kwargs) | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Add a description of
limits
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.
added the description from the parameters part