-
Notifications
You must be signed in to change notification settings - Fork 1
Implemented the basic Mapper Algorithm #86
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
base: master
Are you sure you want to change the base?
Conversation
|
the last test needs sklearn to be added to requirements to run or a new function should be defined. a new function would be preferable as no other parts of the base uses sklearn. |
|
Sorry, I forgot that sklearn isn't a dependency. I have been using it frequently for my testing, since the mapper algorithm needs a clustering algorithm to work. There are a few ways to fix this without adding sklearn as a dependency that I can think of. I could just remove the failing test. The test is just a secondary test to ensure it works with clustering algorithms that are not the trivial clustering algorithm. The trivial clustering algorithm test is passing and ensures that the computeMapper method works. Another option could be using one of the clustering algorithms from scipy for the test, since scipy is currently listed as a requirement. Another idea could be that I implement some of the more popular clustering algorithms used with Mapper (DBScan seems like a first choice) into ceREEBerus to remove that dependency, though that would be quite a bit of work. Let me know what you think the best way to solve the problem is. |
Added the Mapper algorithm to ceREEBerus
Description
This change primarily consist of adding a new function, computeMapper, to ceREEBerus. This function computes the mapper algorithm used in TDA. It additionally implemented a new function, cover, to aid in the usage of the Mapper algorithm, and it moved the draw function to a new sub-module.
Motivation and Context
We have an existing MapperGraph class that is built on top of the ReebGraph class but without any way to compute Mapper Graphs using the Mapper algorithm. This change implements the Mapper algorithm into the package.
How has this been tested?
I have added three new unit tests for the code. One checking the the new cover function and two checking the computeMapper function. The computeMapper has a test for a simple trivial clustering graph for manually input points and covers, and a complicated graph test built on the sklearn.make_circles function on a set seed. Testing has been done for 2D and 3D point clouds.
The other change, moving the draw method to its own sub-module, has been checked for bugs as well as being moved in the documentation and currently no issues are found.
Types of changes
Checklist
pyproject.tomlfile if a new version needs to be pushed to pypi. Note that if the number isn't incremented, the package will not be pushed to pypi, which is useful if this PR is only for updating documentation.make formatto clean up the code withblack.make tests).