# Using Convolutional Neural Network and Candlestick Representation to Predict Sports Match Outcomes
## 4 Experiments
### Experiment Designs  
We conducted two series of experiments to verify the effectiveness and predictive performance of our proposed prediction model based on the sports candlestick pattern from all and individual teams and to test the approaches we used in the outcome judgment model. In the first experiment, we evaluated the effectiveness of GAF-encoded images derived from the OHLC series of sports candlesticks when classified by CNN in the first stage and tested whether the implied behavioral patterns for providing predictions should be based on the whole team or on individual teams. The second experiment aimed to test the performance of the two-team match outcome judgment model in the second stage. We used different machine learning algorithms to check whether the prediction performance was acceptable when compared with each other and with the comparison group.  
To evaluate the experiment results, for the first stage of CNN classification capability, we compared the accuracy of the test sets. For the second stage, we assessed the performance of the outcome prediction models based on different machine learning approaches, which in turn were assessed based on the accuracy of the win/lose outcome. The precision, recall, and F-measure corresponding to the outcome were also computed to reveal further details. A higher value of these measures is generally favored. These measures are defined as follows:  
\[\text{Accuracy}=\frac{TP+TN}{TP+FP+FN+TN} \tag{10}\]  
\[\text{Precision}=\frac{TP}{TP+FP} \tag{11}\]  
\[\text{Recall}=\frac{TP}{TP+FN} \tag{12}\]  
\[\text{F}-\text{measure}=\frac{2\times TP}{2\times TP+FP+FN} \tag{13}\]  
where _TP_, _TN_, _FP_, and _FN_ refer to true positive, true negative, false positive, and false negative, respectively.  
To further compare whether the two-stage approach proposed in this study helps to improve the single-stage approach, we also build a logistic regression model for OHLC  
Figure 7: Data segmentation.  
time series in the first stage. We normalize the OHLC time series using Equation (6) and set the window size to 10, making it consistent with the input values used for the GAF conversion in the first stage CNN classifier. Therefore, the input values of the logistic regression model in the first stage are the team name, the opponent team name, the team's OHLC value in the preceding 10 consecutive games, and the opponent team's OHLC value in the preceding 10 consecutive games, a total of 82 variables. The output value is the team's win or loss in the present match.  
The experimental results were also compared with \"betting\" and \"home\" as benchmarks. Betting refers to the bookmaker's prediction, which is based on the betting odds of the winning/losing margin. A negative value indicates a win, whereas a positive value indicates a loss. Home refers to the well-known home field advantage, where the home team is always predicted to win.  
The kappa coefficient is a measure of inter-rater agreement involving binary forecasts, such as win-lose [65]. We used this coefficient to measure the levels of agreement among the proposed prediction model, the comparison groups, and the actual outcome.