Skip to content
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

Digitize relationship #176

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

wjdrlduq1234
Copy link

digitize relationship.

  1. definition

Let members a, b each in nodes n, m. And define path length r of a and b; least number of edges that connect a, b.
If a and b is connected by same node, then r is 0.
And if a and b is not connected, then r is -1.

  1. function

This function print out Dataframe that every r of the data mapped. It's meaningful to digitize relationship.

https://github.com/scikit-tda/kepler-mapper/issues/175

I can full values only 0, 1. I'll think it more how can I obtain more than 2. (-1 is easy)
prevention of confusion
# It has to be solved how to obtaion path length more than 2...
@wjdrlduq1234
Copy link
Author

I submit a pull request.

I decided not to use mine complex algorithms.
Instead, I used the module you sent me, and I think I succeeded.
Even the speed has gone very fast.
Please review the code. And if you have any feedback, please let me know.

If this is settled, I want to tell you a new story.
In fact, I wrote a paper using your package; kmapper.
In my opinion, results vary depending on how they are projected and clustered.
So the following algorithm is proposed

Existing algorithm that I understand)

  1. projecting
  2. clustering
  3. mapping
  4. visualization 3

proposing algorithm)

  1. projecting
  2. clustering
  3. mapping x times in different ways
  4. using digitize_relationship x times each mapped from 3
  5. pooling results of 4
  6. visualization 5

I think it will be useful for people who need to show only one result.

@codecov-io
Copy link

codecov-io commented Jul 16, 2019

Codecov Report

Merging #176 into master will decrease coverage by 3.06%.
The diff coverage is 9.09%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #176      +/-   ##
==========================================
- Coverage   79.05%   75.99%   -3.07%     
==========================================
  Files          10       10              
  Lines         721      754      +33     
  Branches      148      156       +8     
==========================================
+ Hits          570      573       +3     
- Misses        120      150      +30     
  Partials       31       31
Impacted Files Coverage Δ
kmapper/kmapper.py 79.64% <9.09%> (-9.24%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1c54928...843518d. Read the comment docs.

@wjdrlduq1234
Copy link
Author

Hi, I realized that I had coded in the wrong direction while making an example.
I reviewed the networkx you suggested and felt that it would take a lot of work to use it.
From what I've studied, to apply the networkx algorithm, In order to apply the algorithms of networkx, the graphs need to be redefine. If there's anything I'm overlooking, let me know.

I succeeded in defining the graph as shown in the picture below. The data is iris data in sklearn.
1
2

I'll talk to you if I get a good result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants