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

[Feature] Online Unitary Event Analysis #491

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

Conversation

ojoenlanuca
Copy link
Collaborator

@ojoenlanuca ojoenlanuca commented Jun 1, 2022

This pull request introduces an online version of the Unitary Event Analysis (UEA). It is related to the pull request #405, because it provides another online batched statistic. These pull requests could be reviewed jointly, but also separately, depending on what will be more efficient in terms of the overall time needed for the reviews.

Like the other online batched measures in #405, the online version of the UEA is implemented as a class, which stores the necessary intermediate results within class-attributes and updates them with the aid of the 'update_uea()' class-method. To perform such an update-step, several helper-methods are used to manage the spike data and to pre-process it in the same manner as the standard/offline UEA it does.

The 'concurrent_test_runner_for_uea.py' module is optional. It executes all test-functions of 'TestOnlineUnitaryEventAnalysis' unittest.TestCase, which is located in 'test_online.py', in a concurrent manner to reduce run-time. It uses the third-party package 'concurrencytest', which is yet not part of the 'elephant'-requirements.

Task List

… online version of the Unitary Event Analysis into 'elephant'
…taryEventAnalysis' TestCase and load it then several times for the respective test-functions which use this dataset; uncommented import/usage of matplotlib within this TestCase (the created plots are just a possible debug help for the developer, but not needed for executing the test-functions)
@pep8speaks

This comment was marked as outdated.

…o the call of '__init__()'; changed order of class methods: public methods are now first in alphabetical order, followed by the private helper methods which are unordered; changed order of testing the class attributes after performing the 'reset()' method in the test-function 'test_reset' to be the same as in the docstring of the 'OnlineUnitaryEventAnalysis' class
@Moritz-Alexander-Kern
Copy link
Member

Hey @ojoenlanuca,
I suggest to proceed with this PR in the following way:

  1. review code
  2. create PR on branch INM-6:feature/online_measures (this branch was recently updated to match the current state of elephant), see also PR [Feature] Online batched statistics measures #405
  3. merge into master

Thanks for contributing !

Copy link
Member

@Moritz-Alexander-Kern Moritz-Alexander-Kern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this nice addition to elephant.

Here is an initial review checking for naming conventions, code style and unit-tests.

Consider this an initial review, an in-depth review will follow.

elephant/test/test_online.py Outdated Show resolved Hide resolved
elephant/test/test_online.py Outdated Show resolved Hide resolved
elephant/test/test_online.py Outdated Show resolved Hide resolved
elephant/test/test_online.py Outdated Show resolved Hide resolved
elephant/test/test_online.py Outdated Show resolved Hide resolved
elephant/online.py Outdated Show resolved Hide resolved
elephant/online.py Outdated Show resolved Hide resolved
elephant/online.py Outdated Show resolved Hide resolved
elephant/online.py Outdated Show resolved Hide resolved
elephant/online.py Outdated Show resolved Hide resolved
@Moritz-Alexander-Kern Moritz-Alexander-Kern added the enhancement Editing an existing module, improving something label Jun 30, 2022
… and numpy.ndarray for 'events' parameters, in the later case three additional parameters must be specified, namely: 't_start', 't_stop' and 'time_unit'; extended TestCase class to cover also these alternative types for the 'spiketrains' and 'events' representation
…e tw_counter represents the number of already analyzed trials and n_trials represents the number of trials for which a trigger event was given; tw_counter <= n_trials, i.e. it is possible to provide more trigger events than could be actually analyzed due to the simulation duration (providing trigger events that would occure after the simulation end)
…ome calculations; fixed PEP issues (not all)
@coveralls
Copy link
Collaborator

coveralls commented Sep 6, 2022

Coverage Status

Coverage increased (+0.4%) to 87.66% when pulling 162149a on INM-6:feature/online_measures_uea into 73e8a5f on NeuralEnsemble:master.

@Moritz-Alexander-Kern Moritz-Alexander-Kern removed the request for review from kohlerca November 7, 2022 13:19
Moritz-Alexander-Kern added 2 commits November 17, 2022 16:41
@Moritz-Alexander-Kern Moritz-Alexander-Kern changed the title feature: Online Unitary Event Analysis [Feature] Online Unitary Event Analysis May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Editing an existing module, improving something new functionality New modules, functions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Performing certain analysis functions in a window
4 participants