2.4.1. Basic Motion Parameters
In this study, 13 parameters were used to describe the swimming behavior of zebrafish larvae. These parameters comprehensively quantify locomotion behavior from multiple aspects, such as overall movement ability, movement turning performance, movement position preference, and edge exploration behavior. The definition and description of the motion parameters are shown in
Table 4, which is also annotated with the physical meaning of the parameters. Among them, the calculation formula of each motion parameter is as follows.
The total distance traveled (D), defined by Equation (1), is the most commonly employed kinematic parameter for behavioral analysis, offering an intuitive measure of locomotor capacity in zebrafish larvae.
where “D” represents the total distance traveled, which calculates the distance traveled between the current frame and the previous frame and accumulates it from the second frame to the end of the last frame (
in centimeters (cm). In the formula, “
” and “
” correspond to the position of zebrafish larvae in the i-th frame, and “
” and “
” represent the coordinates from the previous frame. Additionally, “
” and “
’” denote the actual width and pixel width of the image, respectively, and “
” and “
’” represent the exact height and pixel height of the image, respectively.
- 2.
Activity frequency (AF) is a behavioral analysis metric. In this paper, it is defined as the percentage of frames with moving distance () over the total number of frames (), as shown in Equation (2).
- 3.
The maximum average velocity (Vmax-m) and minimum average velocity (Vmin-m) are employed to evaluate zebrafish larvae’s locomotion threshold and stability, as shown in Equations (3) and (4), where v is the average motion speed calculated independently for each second.
- 4.
Rotation angle (
) serves as a vital metric for assessing changes in trajectory direction, as well as a significant indicator for burst movements and evasive responses, as in
Figure 11 and Equations (5) and (6). This paper uses the total rotation angle (A) to gauge the overall directional alterations in the movement of zebrafish larvae, as outlined in Equation (7).
where
represents the rotational angle at the
i-th frame during motion, and the cosine value, denoted as
, is calculated according to the relationships among the three sides of the triangle in Equation (5). A represents the summation of
θ across all frames.
- 5.
The sums of clockwise (CW) and counterclockwise (CCW) rotation angles are separately employed to evaluate angular variations along the two directions, with the methodology illustrated in Equations (8) and (9) and
Figure 11.
where
is the rotation angle and the rotation direction of the angle is judged by the indicator function
. When
, the direction is counterclockwise, and when
, the direction is clockwise.
- 6.
The directional preference index (DPI) is defined to measure the extent of the directional bias. The calculation method is presented in Equation (10).
- 7.
The summation of distances to the center point (Dc) serves as a measure for the spatial distribution of motion trajectories, as defined in Equation (11).
where “
” and “
” correspond to the position of zebrafish larvae in the i-th frame. “
” and “
” represent the pixel coordinates of the dish center in the culture dish. The definitions of
,
,
, and
are the same as in Equation (1). The unit of
Dc is expressed in centimeters (cm).
- 8.
The total activity square (S), as defined in Equation (12), serves as a metric for quantifying the overall activity range of zebrafish larvae.
where
B represents the pixel point in the image where the active trajectory exists, and
I means the value of the
k-th channel of the pixel in the
i-th row and the
j-th column of the image. If the channel values are all 1, the pixel is white, and the area is without a motion trajectory.
- 9.
The high-frequency active square (S-hf) is used to describe the size of the area in which zebrafish larvae exhibit concentrated activity. In this experiment, the high-frequency active area is defined as the set of trajectory points with a kernel density estimate (KDE) greater than 0.5. Equation (14) represents the density estimation function used to calculate the data distribution density around trajectory points.
where
n is the number of trajectory points and
h is the bandwidth parameter generated based on the standard.
These parameters collectively facilitate the characterization of behavioral alterations in zebrafish larvae across various dimensions, encompassing global motor performance, motility, directional bias, and spatial preferences. All these parameters are amenable to automated computation using the location data generated by the algorithm.
2.4.2. Behavioral Characteristic Indicators
In this study, the dimensions of the above 13 basic movement parameters were reduced by Principal Component Analysis, and then the reduced principal components were used as behavioral characteristic indicators to quantify the movement changes of juvenile fish.
Principal Component Analysis (PCA) was applied to the 13 parameters from 840 samples. The existence of a correlation between the original variables is the first condition for PCA. Therefore, before using PCA to reduce the dimensionality of the data, the correlation between the variables was determined by the Kaiser–Meyer–Olkin (KMO) test and Bartlett’s sphere test [
52]. As shown in
Table 5, the test result of the KMO value was 0.795, and Bartlett’s sphere test results showed
p < 0.001, which indicates that the 13 motion parameters are suitable for dimensionality reduction by PCA.
In the experiment, 840 motion states were collected, and each motion contained 13 variables, which formed the matrix
, where
n = 840 and
m = 13. Firstly, the original data were standardized, as shown in Equation (15):
where
is the value of the j-th motion variable of the i-th evaluated object and
and
are the mean and standard deviation of the j-th motion variable, respectively.
is the normalized
.
Then, the correlation coefficient matrix R between the variables was established, as presented in Equations (16) and (17):
where
,
, and
equals the correlation coefficient between the
i-th motion variable and the
j-th motion variable. The eigenvalues
of the correlation coefficient matrix R are calculated.
Each λ corresponds to a principal component, and the variance interpretation of the principal component is shown in
Table 6. The variance interpretation refers to the proportion of variance of the original data that each principal component can capture. In this work, three components with characteristics greater than 1 were extracted as principal components and used as behavioral characteristic indicators to quantify the movement changes of juveniles. Among them, Principal Component 1 (PC1), Principal Component 2 (PC2), and Principal Component 3 (PC3) accounted for 48.278%, 19.463%, and 7.994% of the total variances, respectively, and the three principal components accounted for 75.735% of the total variance; that is to say, these three principal components could explain most of the variability of the overall data. A two-dimensional scatter plot was created using PC1 on the
x-axis and PC2 on the
y-axis to represent the positions of each initial motion parameter.
To enhance the interpretability of the principal components, orthogonal rotation was applied to the results of the Principal Component Analysis (PCA), ensuring that the rotated components remained statistically independent. The matrix of the rotated principal components is presented in
Table 7, where the original variables (basic motion parameters) are arranged in descending order according to their magnitude. The magnitude of the rotation coefficients indicates the degree of contribution of the original variables to the corresponding rotated components. The larger the absolute value of the coefficient, the more significant the influence of the original variable on that component. Specifically, PC1 is predominantly constituted by parameters such as CCW (counterclockwise), A (amplitude), CW (clockwise), AF (angular frequency), D (distance), S (speed), Vmin-m (minimum velocity in meters), Vmax-m (maximum velocity in meters), and S-hf (high-frequency signal), which encompass motion angles, traveled distances, motion speeds, and motion ranges, collectively assessing the behavioral activity of the larvae. PC 2 is mainly composed of parameters P_edge (proximity to the edge), Dc (distance to the center), and C (curvature), all of which are related to the edge behavior of the larvae. The main parameter in PC3 is PI (preference index), which measures the movement direction preference. The names of the behavioral characteristic indicators corresponding to the three principal components and their physical meanings are shown in
Table 8. The contribution rate of each basic behavior parameter to the three principal components is shown in
Table 9.
Figure 12 is a visualization of the PCA results. In
Figure 12A, the positioning of data points was determined by the weights of these parameters. The size of each data point was determined by the sum of their weights on the two feature dimensions.
Figure 12B–D displays the contribution of each motion parameter to the different principal components.
The basal motor parameters are directly quantified from the movement position, while the behavioral characteristic index is the weighted sum of the basal motor parameters. Its weight is determined by the component score coefficients, and the matrix of component score coefficients is shown in
Table 10. The principal component scores (PCS) are calculated using Equations (18) and (19). The contribution rate of the principal components to the original data is calculated from the eigenvalues in Equation (20).
where
is the weight of the j-th motion parameter in the principal component m, and c is the component matrix coefficient.
In the present study, Principal Component 1 (PC1), Principal Component 2 (PC2), and Principal Component 3 (PC3) were utilized as novel behavioral quantification indices corresponding to three distinct behavioral characteristics of juvenile fish: overall activity, thigmotaxis (tendency to stay close to walls or boundaries), and movement direction preference, respectively. These indices were employed for statistical analysis and the interpretation of experimental outcomes. Using the experimental data of a single larva as an example,
Figure 13 demonstrates the variation in behavioral quantification data, movement trajectory diagrams, and heatmaps across different observation times. The left side of the figure visualizes the behavioral changes of zebrafish larvae, while the right side provides a quantitative analysis of the overall activity and thigmotaxis of the larvae based on the scores of Principal Component 1 and Principal Component 2. It also lists the changes in several original motion parameters with higher contribution rates to the two principal components. According to the temporal variable, both trajectory and parameter quantifications are presented in three phases from top to bottom: before exposure, 10 min after exposure, and 60 min after exposure.
From the trajectory diagram, it is evident that before exposure, the trajectory distribution of the larvae is relatively uniform and the overall activity level is high, with a PC1 score of 0.917, which is also considered high. The trajectory heatmap indicates a denser distribution of trajectory points closer to the right side of the culture dish, but there is no apparent thigmotactic behavior in the overall distribution, corresponding to a PC2 score of −0.6, which is a lower level.
Ten minutes after exposure, the movement trajectories of the larvae are significantly reduced, indicating a marked decrease in overall activity. The corresponding PC1 score is 0.353, which is a noticeable decline from before exposure, and the values of several original motion parameters (A, AF, D) are also significantly reduced. During this phase, the trajectory points are noticeably concentrated in the peripheral area of the culture dish, but there are still traces of activity in the central area, suggesting that the larvae exhibit a certain degree of thigmotaxis. The PC2 score for this phase is 0.684, demonstrating an increase of 1.284 compared to before exposure, consistent with an increase in thigmotactic behavior. Motion parameters associated with thigmotaxis, such as P_edge (proximity to the edge), Dc (distance to the center), and C (curvature), also show an upward trend.
Sixty minutes after exposure, the overall activity level of the larvae, as observed from the trajectory diagram, shows no significant difference compared to the previous stage, but the overall range of activity has narrowed, with a more concentrated distribution in the peripheral area of the culture dish. Although there is no apparent change in the trajectory at this time, the PC1 values continue to decrease, with significant downward trends observed in the total rotation angle (A), activity time proportion (AF), and total distance moved (D). The heatmap, with its red circle close to the inner wall of the culture dish, indicates a more pronounced thigmotactic behavior of the larvae, and almost no activity traces in the central area of the container. At this time, the PC2 score is 1.090, with an increase of 0.406 compared to the previous stage, showing an overall upward trend less than that of the previous stage. Only the values of P_edge and Dc have increased, which is consistent with the trend of change in thigmotaxis.