# A Trip Purpose Inference Method Considering the Origin and Destination of Shared Bicycles
## 6 Example Validation  
The total sample size for this study is 324. After processing the anomalous data, 241 valid entries were obtained. The cleaned and organized fields include ride start time, start latitude and longitude, ride end time, end latitude and longitude, and mapping category, as detailed in Table 1. Using Python, the three models described in Section 5.1 are programmed to analyze the inferred results and corresponding trip purposes for the two basic gravity models and the GMOD model. The steps are as follows:  
Step 1: Infer each piece of data separately using the different models to obtain the inferred results.  
Step 2: Compare the inferred category with the \"mapping category\" of the modified data; if they match, mark 'Y'; otherwise, mark 'N'.  
Statistics comparing the real data and inferred results for different models and categories are presented in Figure 7; the overall inference accuracy of the models is quantified using Equation (19), with the results displayed in Figure 8a.  
\[S=\frac{number(Y)}{241} \tag{19}\]  
where S denotes the overall inference accuracy of the model; and \(\mathrm{number(Y)}\) denotes the sum of the number of pairs of markers Y.  
In this section, three models for inferring bike-sharing trip purposes are evaluated, revealing notable differences in their effectiveness. Both basic gravity model 2 and the GMOD model outperform basic gravity model 1, particularly for activities associated with fewer POIs, such as transfers, medical visits, and education. This improvement is attributed to the incorporation of temporal and environmental data, which enhances the ability to distinguish between less frequent but critical trip purposes. However, for categories involving a larger number of POIs, such as shopping, life services, and work, the performance of both models is less favorable. This discrepancy likely arises from the increased complexity and density of POIs within these categories, which makes it more challenging for the models to isolate specific travel patterns accurately.  
A more detailed comparison at the individual level (Figure 8a) highlights the GMOD model's advantages over the basic gravity models, with inference accuracy improved by 15.36% and 7.47% compared to models 1 and 2, respectively. While the GMOD model demonstrates superior overall performance, its underperformance in categories like going home and shopping may stem from the overlapping characteristics of these trips, as both often involve widely distributed POIs with similar environmental contexts, making precise identification more difficult. Despite these limitations, the GMOD model excels in accurately predicting less frequent activities such as transfers, healthcare, and education, achieving substantial accuracy improvements (Figure 8b).  
Figure 7: Inferred results of the purpose of each type of travel activity for dockless bike-sharing users.  
These findings validate the effectiveness of the GMOD model's integration of origin and destination time factors along with environmental data. However, they also underscore the need for further refinement of the model to address challenges associated with high-density and highly variable POI categories, ensuring its applicability across a wider range of trip purposes.