Coder Social home page Coder Social logo

Comments (5)

TomDonoghue avatar TomDonoghue commented on September 26, 2024

In the docstring example for compute_occupancy, it is a little confusing that if you read through the values, it's not intuitive that it seems like it drops the last position sample (of 5):

position = np.array([1.0, 1.5, 2.5, 3.5, 5])
timestamps = np.linspace(0, 1, position.shape[0])
compute_occupancy(position, timestamps, bins=[4])
array([0.5 , 0.25, 0.25, 0.  ])

This is ultimately expected (we compute 'time in location' as the diffs of the timestamps, and so there is one last time-value than pos/timestamp value, and the last location is effectively sampled for 0 time (which shouldn't matter in any real data), but is a little unclear it being visible in the example with no note or context given to explain this.

from spiketools.

TomDonoghue avatar TomDonoghue commented on September 26, 2024

The description of time_threshold in compute_place_bins doesn't seem to be correct (describes accumulated time threshold, not the time distance threshold for selecting values)

from spiketools.

TomDonoghue avatar TomDonoghue commented on September 26, 2024

Passing in a min_speed to compute_occupancy, without passing in speed silently does nothing. Should raise a warning / error for inconsistent set of inputs.

from spiketools.

TomDonoghue avatar TomDonoghue commented on September 26, 2024

Docstring could be clearer on difference between min_time / max_time & minimum in compute occupancy functions.

from spiketools.

TomDonoghue avatar TomDonoghue commented on September 26, 2024

In compute_trial_occupancy, it will accept and pass through the minimum occupancy parameter, but since, compute_occupancy gets applied every trial, this is a minimum total time per traversal, not overall per bin (across trials). In the case of a fixed path, this means that minimum and min_time parameters are effectively the same. Note that in an open field (with multiple possible traversals per bin within a trial) this is not the case. In both situations, there is not a direct way to threshold based on total time in bin (across trials). This could be added as a posthoc check (which would help align measures of total occupancy vs. trial by trial). Also: consider adding doc notes / warnings about the fixed track situation.

from spiketools.

Related Issues (20)

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.