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

Add graphs/frequent_pattern_graph_miner.py #1866

Merged
merged 37 commits into from May 7, 2020
Merged

Conversation

@siva1098
Copy link
Contributor

siva1098 commented Apr 15, 2020

Describe your change:

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Documentation change?

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.
  • All new algorithms have a URL in its comments that points to Wikipedia or other similar explanation.
  • If this pull request resolves one or more open issues then the commit message contains Fixes: #{$ISSUE_NO}.
Copy link
Member

cclauss left a comment

Thanks for your contribution. It needs some changes to meet our standards.

graphs/frequent_pattern_graph_miner.py Outdated Show resolved Hide resolved
graphs/frequent_pattern_graph_miner.py Outdated Show resolved Hide resolved
graphs/frequent_pattern_graph_miner.py Outdated Show resolved Hide resolved
graphs/frequent_pattern_graph_miner.py Outdated Show resolved Hide resolved
graphs/frequent_pattern_graph_miner.py Outdated Show resolved Hide resolved
graphs/frequent_pattern_graph_miner.py Outdated Show resolved Hide resolved
graphs/frequent_pattern_graph_miner.py Outdated Show resolved Hide resolved
graphs/frequent_pattern_graph_miner.py Outdated Show resolved Hide resolved
graphs/frequent_pattern_graph_miner.py Outdated Show resolved Hide resolved
siva1098 and others added 3 commits Apr 15, 2020
Co-Authored-By: Christian Clauss <cclauss@me.com>
Co-Authored-By: Christian Clauss <cclauss@me.com>
siva1098 added 2 commits Apr 15, 2020
graphs/frequent_pattern_graph_miner.py Outdated Show resolved Hide resolved
graphs/frequent_pattern_graph_miner.py Outdated Show resolved Hide resolved
graphs/frequent_pattern_graph_miner.py Outdated Show resolved Hide resolved
graphs/frequent_pattern_graph_miner.py Outdated Show resolved Hide resolved
graphs/frequent_pattern_graph_miner.py Outdated Show resolved Hide resolved
siva1098 and others added 4 commits Apr 18, 2020
Co-Authored-By: Christian Clauss <cclauss@me.com>
Co-Authored-By: Christian Clauss <cclauss@me.com>
Co-Authored-By: Christian Clauss <cclauss@me.com>
Co-Authored-By: Christian Clauss <cclauss@me.com>
Co-Authored-By: Christian Clauss <cclauss@me.com>
@cclauss
Copy link
Member

cclauss commented Apr 18, 2020

Nice! Test are passing again. (LGTM can be ignored)

Co-Authored-By: Christian Clauss <cclauss@me.com>
@cclauss
Copy link
Member

cclauss commented Apr 18, 2020

OK. Now we appear in the Travis tests

Now please remove the second test that was designed to fail.
https://travis-ci.com/github/TheAlgorithms/Python/builds/160822861#L1258

@cclauss
Copy link
Member

cclauss commented Apr 21, 2020

https://travis-ci.com/github/TheAlgorithms/Python/builds/161205503#L1270

You can run these tests on your own computer with the command:
python3 -m doctest -v frequent_pattern_graph_miner.py

@cclauss cclauss changed the title Add files via upload Add graphs/frequent_pattern_graph_miner.py Apr 21, 2020
siva1098 and others added 2 commits Apr 22, 2020
Co-Authored-By: Christian Clauss <cclauss@me.com>
@siva1098
Copy link
Contributor Author

siva1098 commented Apr 22, 2020

All changes have made.
Pls merge the file.

@siva1098 siva1098 requested a review from cclauss Apr 24, 2020
@cclauss
Copy link
Member

cclauss commented Apr 24, 2020

Could you please add doctests to at least some of these?

  • get_frequency_table()
  • get_nodes()
  • get_cluster()
  • get_support()
  • construct_graph()
  • freq_subgraphs_edge_list()
  • preprocess()
siva1098 added 2 commits Apr 25, 2020
@siva1098
Copy link
Contributor Author

siva1098 commented Apr 25, 2020

Could you please add doctests to at least some of these?

  • get_frequency_table()
  • get_nodes()
  • get_cluster()
  • get_support()
  • construct_graph()
  • freq_subgraphs_edge_list()
  • preprocess()
@@ -100,7 +100,7 @@ def get_support(cluster :Dict[int,Dict[str,List[str]]])-> List[float]:
'''
Returns support
>>> get_support({5: {'11111': ['ab', 'ac', 'df', 'bd', 'bc']}, 4: {'11101': ['ef', 'eg', 'de', 'fg'], '11011': ['cd']}, 3: {'11001': ['ad'], '10101': ['dg']}, 2: {'10010': ['dh', 'bh'], '11000': ['be'], '10100': ['gh'], '10001': ['ce']}, 1: {'00100': ['fh', 'eh'], '10000': ['hi']}})

This comment has been minimized.

Copy link
@cclauss

cclauss Apr 25, 2020

Member

Lines in Python should be 88 characters max. Lines that can not be read in GitHub without left/right scrolling (127 characters) need to be wrapped for readability.

@cclauss
Copy link
Member

cclauss commented Apr 25, 2020

I will review tonight and then I think then we can land this one. Thanks for your persistence!

siva1098 added 2 commits Apr 30, 2020
@siva1098 siva1098 requested a review from cclauss May 1, 2020
@siva1098
Copy link
Contributor Author

siva1098 commented May 4, 2020

can you pls merge the file?

@cclauss
cclauss approved these changes May 7, 2020
@cclauss cclauss merged commit 7469fb6 into TheAlgorithms:master May 7, 2020
2 checks passed
2 checks passed
codespell
Details
Travis CI - Pull Request Build Passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.