-
Notifications
You must be signed in to change notification settings - Fork 67
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
Persistence graphical tools for sklearn itf #1157
base: master
Are you sure you want to change the base?
Persistence graphical tools for sklearn itf #1157
Conversation
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.
If we computed only dimensions 2 and 4, they will be labelled 0 and 1 in the legend. But we can see later about adding a way to pass the homology_dimensions
(from RipsPersistence and others) to this function.
first_death_value = elt[0][1] | ||
if not isinstance(first_death_value, (np.floating, float)): | ||
raise TypeError("Should be a list of (birth,death)") | ||
pers.extend([fake_dim, x] for x in elt) |
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.
It is a bit sad to convert from the efficient numpy format to the inefficient list, when what matplotlib expects is close to the original array. But that's an implementation detail, we can revisit it later if it turns out to be non-negligible.
# Array | ||
try: | ||
first_death_value = a[0][1] | ||
if isinstance(first_death_value, (np.floating, float)): |
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 know we already had that, but I wonder if we should also accept integers here?
No description provided.