Conversation
| @@ -0,0 +1,4 @@ | |||
| # dFC | |||
There was a problem hiding this comment.
more details needed. For example, you can explain each method, or what steps should be done to run your own data etc.
jeromedockes
left a comment
There was a problem hiding this comment.
first batch of small comments, mostly details for now
| @@ -0,0 +1,149 @@ | |||
| from functions.dFC_funcs import * | |||
There was a problem hiding this comment.
in general avoid import * as it pollutes the namespace and makes it hard to know where names come from.
linting tools will complain about it; it's a good idea to use them -- have a look for example at pylint and flake8
| @@ -0,0 +1,3472 @@ | |||
| #!/usr/bin/env python3 | |||
There was a problem hiding this comment.
if this is a module meant to be imported you don't need a shebang
| @@ -0,0 +1,3472 @@ | |||
| #!/usr/bin/env python3 | |||
| # -*- coding: utf-8 -*- | |||
There was a problem hiding this comment.
utf-8 is the default: https://peps.python.org/pep-3120/
| """ | ||
| Created on Sun Jun 13 22:34:49 2021 | ||
|
|
||
| @author: mte |
| import networkx as nx | ||
| from scipy.spatial import distance | ||
| from joblib import Parallel, delayed | ||
| import os |
There was a problem hiding this comment.
put standard lib imports before other imports (see pep8)
|
|
||
| ###### DATA PARAMETERS ###### | ||
|
|
||
| output_root = './../../../../../RESULTs/methods_implementation/' |
There was a problem hiding this comment.
- consider putting paths in env variables or a config files rather than source files
- use pathlib to manipulate filesystem paths
|
|
||
| # DATA_type is either 'sample' or 'Gordon' or 'simulated' or 'ICA' | ||
| params_data_load = { \ | ||
| 'DATA_type': 'Gordon', \ |
|
|
||
| @author: mte | ||
| """ | ||
|
|
There was a problem hiding this comment.
you could add a setup.py to make it possible to install the package so you don't have to manipulate the python path in your notebook
| Clustering_pear_corr | ||
| ''' | ||
|
|
||
| if name_lst_key is None: |
There was a problem hiding this comment.
try to keep function short; they should at least fit on a screen ie less than ~40 lines (there may be rare exceptions), and in most cases be even much shorter than that (~5-10 lines)
| else: | ||
| plt.show() | ||
|
|
||
| ''' |
There was a problem hiding this comment.
is this to comment out code?
trust version control and delete the code you don't need instead of commenting it out
| @@ -0,0 +1,360 @@ | |||
|
|
|||
There was a problem hiding this comment.
what testing framework do you use?
No description provided.