GEOG 566

         Advanced spatial statistics and GIScience

April 24, 2018

Spatial distribution of behavior changes

Filed under: Exercise/Tutorial 1 2018 @ 9:00 pm


Since writing ‘My Spatial Problem’, a behavioral change point analysis tool was implemented on the swim paths of juvenile salmon as they encountered boom angles of 20, 30, and 40 degrees. Boiling entire swim paths down to one behavioral change point greatly simplifies the analysis, by investigating the hydraulic thresholds that may or may not incite behavioral changes. A behavioral change is identified by a change in swim velocity, swim direction, or both. However, for the purposes of this study, the type of behavioral change is important. Do fish that pass the boom do so at one hydraulic threshold or location, while fish that are halted do so at another? The question asked in this investigation is: do ‘passing’ and ‘halting’ behaviors occur at different locations in space at any boom angle, or between boom angles?

Method and steps for analysis:

Python was used to visualize behavior changes in two ways: kernel density estimation and multidimensional confidence intervals. First, behavior changes were classified as either ‘passing’ or ‘halting’. ‘Passing’ behavior precedes downstream movement. ‘Halting’ behavior precedes upstream or pausing movement. The results of these classifications for all 20 degree trials are shown in Figure 1.

Figure 1. Behavioral changes of all fish during 20 degree trials. Red markers indicate halting behavior, that which precedes upstream movement or pausing of downstream movement. Blue markers indicate passing behavior.

Second, to determine if the spatial distributions of passing and halting behavior overlap, kernel density estimates were calculated using the scipy.stats function, Gaussian_kde. Kernel density estimates estimate a variable’s probability density function, two of which are shown in Figure 2. However, this method presents two shortfalls for the purposes of this investigation: 1) it fails to provide direct estimates of confidence, so its statistical power is low, and 2) the overlap between kernel density estimates, of which there is plenty in these data, closely resembles a bruise.


Figure 2. Kernel density estimates of passing (blue) and halting (red) behaviors over all 30 degree trials. Overlap is shown in purple.

A direct method of determining spatial independence in two dimensions is with multidimensional confidence intervals. A slew of boot-legged functions for calculating and plotting confidence ellipses are available on Python help pages like GitHub and StackOverflow. StackOverflow user ‘Rodrigo’ provides helpful code which was modified to create the confidence intervals in Figure 3.


Figure 3. Multidimensional, 95% confidence intervals for the spatial distributions of halting and passing fish behaviors during trials at 40 degrees.


Because the 95% multidimensional confidence intervals between passing and halting fish behaviors show substantial amounts of overlap at all boom angles, no evidence exists to suggest that passing and halting behavioral changes occur at different locations in the channel during trials. Furthermore, the behavioral changes between 20, 30, and 40 degrees show no significant differences in spatial distribution from one another (Figure 4). This finding holds promise for future analyses: if a threshold exists in some hydraulic variable (turbulence, water speed, etc.) for inciting behavioral changes (either halting or passing), it likely exists where a threshold appears in Figure 4, when a fish has passed between 0% and 25% of the floating guidance structure.

Figure 4. Behavioral changes and their 95% confidence intervals at 20, 30, and 40 degrees imply that the hydraulic signature of a floating guidance structure at a consistent fraction of its length (between 0 and 0.25) incites a reaction from juvenile fish.

Critique of methods:

Kernel density estimates are useful for visualizing the density of entities that are spatially independent of one another. However, the statistical significance of any overlap is unclear and difficult to present with small numbers of observations, which blur densities. Multidimensional confidence intervals, on the other hand, show clear estimates of confidence and overlap in this dataset.

Print Friendly, PDF & Email

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

© 2019 GEOG 566   Powered by WordPress MU    Hosted by