Keeping it classy: classification of live fish and ghost PIT tags detected with a mobile PIT tag interrogation system using an innovative analytical approach

The ability of passive integrated transponder (PIT) tag data to improve demographic parameter estimates has led to the rapid advancement of PIT tag systems. However, ghost tags create uncertainty about detected tag status (i.e., live fish or ghost tag) when using mobile interrogation systems. We developed a method to differentiate between live fish and ghost tags using a random forest classification model with a novel data input structure based on known fate PIT tag detections in the San Juan River (New Mexico, Colorado, and Utah, USA). We used our model to classify detected tags with an overall error rate of 6.8% (1.6% ghost tags error rate and 21.8% live fish error rate). The important variables for classification were related to distance moved and response to monsoonal flood flows; however, habitat variables did not appear to influence model accuracy. Our results and approach allow the use of mobile detection data with confidence and allow for greater accuracy in movement, distribution, and habitat use studies, potentially helping identify influential management actions that would improve our ability to conserve and recover endangered fish.

Importantly, the detection of live fish cannot a priori be differentiated from the detection 85 of ghost tags, yet that knowledge is critical in order for the mobile techniques to be used 86 effectively. The objective of this study was to develop a methodology to classify each detected 87 PIT tag as a live fish or a ghost tag based on tag location data, and build a set of guidelines or 88 rules that could be adapted for use here and in other systems if the correct data were available. 89 We built two different random forest models using data from known fate tags to determine the 90 best data input structure. The first structure treated all individual movements as independent and 91 unrelated to any other movements. The second structure combined all movements of an 92 individual to account for the relatedness of consecutive movements.

183
We structured the input data for the random forest analysis in two different ways to habitat use). We refer to the models using this data structure as independent, and include an 190 example of the input data structure in the supplemental materials ( and two variables for flow conditions (monsoon and overwinter; all variables defined in Table   195 1). 196 We developed a novel data input structure which we refer to as dependent that condensed   detections where movement could be measured, because some tags were detected more than two 238 times (Table 3).
The detection of unknown tags allowed us to describe the movement of 302 confirmed live fish 240 over two seasons. We detected a total of 3,958 unique unknown tags, but only 847 of those tags 241 were detected a second time, for a raw resight rate of 21%. Of those 847 tags, there were 1,190 242 pairs of detections for which we could measure movement. However, we were only able to 243 confirm 302 of those tags as live fish, with 370 pairs of detections where we could measure 244 movement ( Table 3). All of the data from both confirmed live fish, and the known ghost tags 245 were used in the construction of the random forest classification models.

247
The random forest models using the dependent data structure were more accurate than the 248 independent models. Further, limiting input data by species did not improve either model. With 249 the independent model, we were able to differentiate the live fish from the ghost tags with an 250 overall error rate of 7.6% (out-of-bag estimate of error rate). When examined separately, the two 251 classes exhibited error rates of 28.9% (live fish incorrectly classified as ghost tags) and 1.9%

252
(ghost tags incorrectly classified as live fish, Figure 2). Our ability to correctly classify was 253 better with the dependent model than the independent model, lowering the overall error rate to Our study is the first to evaluate a classification method for determining PIT tag status 293 (live versus ghost) when using mobile interrogation systems. We were successful with a very 294 high degree of overall accuracy. While we could identify ghost tags with a high degree of 295 accuracy (only 2% were misclassified as live fish), the model was less effective with live fish.

296
Using our current error rates as a guide, approximately 20% were misclassified as a ghost tag.

297
This degree of error makes our classification of live tags conservative. However, only ~20% of 298 all detected tags were ever resighted, meaning 80% of tags detected were never classified during 299 our two year sampling period. Therefore, these unclassified detections could not be used for With limited sampling (i.e, passes), a short study-period, or remote areas or complex habitats that 354 are difficult to access, this system may be limited in its applicability.

355
Despite the capabilities of our system, one limitation is the time required to collect

389
Our study was the first to use movement and location data to classify PIT tags detected 390 by a mobile sampling method. We were able to build a random forest model with a novel input contributor for habitat use studies, in order to quantify vital rates (e.g., survival), other data 399 sources or more intensive sampling will be required.   D r a f t D r a f t D r a f t  To up-sample, we used the original dataset and the dependent model structure described 25 in the manuscript. We used a random sample with replacement for both classes to generate a 26 subset with 900 observations in each class for building our model using the sample function in R. 27 We used the randomForest function in package randomForest in R (Liaw and Wiener 2002) to 28 create our models using the default parameters (500 trees and 4 variables tried per split). Our 29 model included all of the predictor variables and was used to determine our classification error 30 rates. We repeated the process 100 times and report the mean error rates and variance of all the 31 model runs.

33
Down-sampling reduced the mean error rate of the live class and increased the mean error 34 rate of the ghost class (Table A. D r a f t 47 lower than the down-sampled models, but we believe this is an artifact of a much larger sample 48 size used to create the models.

49
Shifting the error between classes can also be done through the manipulation of the cutoff 50 value in the random forest if it is more important to correctly classify one specific class. Random