-
Notifications
You must be signed in to change notification settings - Fork 175
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
Fix/mapper colors #277
Fix/mapper colors #277
Conversation
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
Please clarify the comment on indentation. Reducing indentation produces the desired behavior on the us-election use case.
gtda/mapper/utils/visualization.py
Outdated
# normalise node colours in range [0,1] for colorscale | ||
node_colors = (node_colors - np.min(node_colors)) / \ | ||
(np.max(node_colors) - np.min(node_colors)) | ||
|
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 believe that this block is too indented and is executed only when not is_node_colors_ndarray
, while I believe it should always be.
Same question for the above: should we get_node_summary
only in the else
case?
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 catch - thanks! I've fixed the indentation in cc2d646
Regarding get_node_summary
it is correct to only call it in the else
case as we distinguish between scenarios where the user passes an ndarray
vs [callable, transformer, etc]. In the latter case we define color_data
which is then used by get_node_summary
to calculate node_colors
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.
thanks for clarifying!
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Hmm, no idea @wreise, this has never come up before. Maybe a freak accident and we can try rerunning? |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Reference Issues/PRs
Fixes #266
What does this implement/fix? Explain your changes.
node_colors
values to lie in range [0,1]plot_point_cloud
function fromexamples/
for Mapper quickstart notebookAny other comments?