## 3 Methodology
### Predictive Model Construction  
In this study, we constructed predictive models to better understand and forecast participant behavior within GitHub projects. The purpose of these models is to leverage the insights gained from both model checking and k-core decomposition to predict how long a participant will remain active in a project. By incorporating key behavioral metrics derived from the PCTL specifications and the results of the k-core analysis, we aim to create accurate models that can predict the duration of participant activity, referred to as period. The results obtained from model checking and k-core decomposition provide significant insights into the underlying structure and behavior of participants within the collaboration network. However, these results alone do not offer predictive capabilities regarding how long a participant will stay active in a project. The goal of the predictive models is to take the dynamic information captured by the DTMC and k-core models and combine them with key independent variables to forecast the activity period for each participant. By doing so, we can better understand the factors that lead to long-term engagement or short-term participation in open-source projects, providing valuable insights for project maintainers and the broader community. The dependent variable of interest for the predictive models is period, which represents the duration (measured in months) that a participant remains active in a project. The period is calculated from the first instance of a participant's activity (e.g., commit or pull request) to their last recorded contribution. This variable is crucial because it reflects not only the participant's overall engagement but also their sustained impact on the project. Understanding what influences the length of this period helps identify factors that contribute to long-term participation, which is vital for the stability and success of open-source projects. To build the predictive models, we utilized a set of independent variables that were chosen based on their relevance to participant behavior and collaboration dynamics. These variables include the following:  
* k-core value (k): This measures a participant's centrality within the collaboration network. participants with higher k-values are considered to be more central or core members of the project, which may influence their likelihood of staying active. * Group: The repositories are categorized into five groups based on their activity duration, as outlined earlier in the study. The group variable helps capture how project longevity affects participant behavior. * PCTL Metrics: The PCTL-derived metrics defined in Table 1 are used as independent variables. To evaluate the performance of the prediction model more reliably and reliably, we used K-Fold cross-validation [24]. Cross-validation is a method of dividing a dataset into multiple subsets and then training and validating the model on each subset, which is very useful for preventing the model from overfitting and evaluating its generalization performance. In this study, we performed 10-fold cross-validation with \(K=10\), i.e., we divided the data into 10 subsets and evaluated the model using each subset as validation data and the remaining 9 subsets as training data. This ensures that the performance of the model does not depend on the specific partitioning of the data, and that the overall performance can be evaluated. We applied seven different machine learning algorithms to predict the period, each of which provides a unique approach to modeling contributor behavior. The models are briefly described below:  
* Decision Tree (DT): Decision trees split the data into branches based on feature values, leading to a prediction. They are simple to interpret but can be prone to overfitting if not properly tuned [25]. * Linear Regression (LM): Linear regression models the relationship between the dependent variable (period) and the independent variables as a linear combination.