Coder Social home page Coder Social logo

connectivipy's Introduction

ConnectiviPy

Python module for connectivity analysis. You may find here implementation of MVAR based estimators like DTF, PDC and also Coherency, PSI. For more information visit documentation page.

The project was supported by Google Summer of Code 2015 and done in collaboration with International Neuroinformatics Coordination Facility.

Build Status codecov

Content

  • Data - data object that makes data handling easier
  • Connectivity - class with connectivity estimators
  • Mvar fitting - this submodule includes some MVAR algorithms

License

BSD 2-clause

Documentation

Visit ReadTheDocs for detailed documentation and tutorials.

Installation

Option 1: PIP (stable release)

pip install connectivipy

Option 1: PIP+GIT (latest release)

pip install git+https://github.com/dokato/connectivipy.git

Option 3: using GIT (the most recent version)

git clone https://github.com/dokato/connectivipy.git
cd connectivipy
python setup.py install

Authors

  • Dominik Krzemiński
  • Maciej Kamiński (scientific lead)

connectivipy's People

Contributors

dokato avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

connectivipy's Issues

New estimators

Recently some new approaches appeared. It'd be worth to review and try to implement them.

some minor things

  • license stuff
  • not alphabetical order in sphinx
autodoc_member_order = 'bysource'

__calc_multitrial uses wrong data dimension size

__calc_multitrial from ConnectAR defines the number of trials as:
trials = data.shape[0]
whereas the documentation states that the trial number is the third dimension, i.e.
trials = data.shape[2]
hence, it leads to an error if the no of channels is > than the no of trials.

Python 3.11 ?

I've enjoyed using this package for a few years now, but I'm unable to install it on a Windows machine running Python 3.11. I know you've tested it with much earlier versions of Python, but I had it working fine on 3.9.9. Any chance I can easily correct the error below?

Typing pip3 install connectivipy returns a fairly long error,

  **Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  × Getting requirements to build wheel did not run successfully.**

and ending with

   **File "C:\Users\fishbacp\AppData\Local\Temp\pip-install-c7i1nbit\connectivipy_18c81df64274429a9b41c91627ce597c\connectivipy\data.py", line 7, in <module>
      import numpy as np
  ModuleNotFoundError: No module named 'numpy'**

I've installed numpy so that's not the issue.

How to cite?

I'm incorporating connectivipy into some software I'm writing that will look at network connectivity measures and be appropriate for use in a clinical setting. All python is converted to .app and .exe using pyinstaller. The software uses MNE, tkinter, and pandas extensively.

The package will be free of course, and my academic institution will help me construct an appropriate legal disclaimer. However, since I'm incorporating connectivipy, particular for MVAR construction, I'd like to know the appropriate citation you'd like me to use.

bug in statistic

should be (1-alpha)*100 in levels

then it can be:

sc[0] = (1-alpha)*100
sc[1] = alpha*100

for twosided case

Significance levels

Significance levels testing the hypothesis of non nullity (e.g. PDC(freq) > 0) should be done over the probability distribution of the variable of interest centered in its estimate, i.e.
image
instead of
image
where P_{1-alpha} is the 1-alpha percentile of the resampled values, theta hat is the variable estimator and theta hat star are the resampled estimator values.
Ideally, this should be done pivoting by the bootstrapped sample standard deviation, i.e., testing the distribution of:
image
Although this is not always computationally feasible.
Also, the code
ficance[i][j] = np.max(st.scoreatpercentile(signi[:, :, i, j], (1-alpha)*100, axis=1))
in conn.Connect.levels, calculates the percentile across a trial's spectral values and takes the max across trials, instead of the converse (which would be achieved by axis=0).
Referece: Zoubir, Abdelhak M., and D. Robert Iskander. Bootstrap techniques for signal processing. Cambridge University Press, 2004.
Btw, I wish you all safety during this pandemic, It's been hard doing research during these difficult times.

[bug] problems with pip installation in python3

Such error occurred:

      File "/usr/local/lib/python3.4/dist-packages/connectivipy/working.py", line 145
        print abs(gcval[:,1,0][0])+abs(gcval[:,2,0][0])+abs(gcval[:,2,1][0])
                ^
    SyntaxError: invalid syntax
   

to be checked why...

Understanding the outcomes of Google Summer of Code

Dear Dominik Krzemiński,

I am a Ph.D. student at the University of São Paulo (Brazil). We would like to understand how and how much Open Source Communities benefit from participating in Google Summer of Code (GSoC). We believe that your experience in GSoC is valuable and could help us achieve that. In a 1-minute questionnaire, we would like to know:

Concerning the project entitled "ConnectiviPy - python module for brain connectivity analysis based on MVAR" developed in GSoC 2015.

  1. Do you have a GitHub repository for the GSoC project? If so, could you provide us with the link to the project?

  2. Have you continued committing code or opening issues to the GSoC project after GSoC? (Yes / No) If so, code, issues or both?

  3. Have you continued committing code or opening issues to other OSS projects after GSoC? (Yes / No) If so, code, issues or both?

  4. Could we use aggregate data from your participation in GSoC and other OSS projects in our research?

The following link contains a sample of our work and how we would use your data:
https://ieeexplore.ieee.org/document/8094410/

Regards,

Jefferson

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.