# Using Convolutional Neural Network and Candlestick Representation to Predict Sports Match Outcomes
## 3 Methodology
### Outcome Judgment Model of Logistic Regression  
We use the CNN classifier to predict the next game based on the past performance of the team by using its own behavior as the learning object. This approach may be explained by the psychological changes in the morale and confidence of the team when facing an opponent and by the effect of the intensity of previous matches on the next match. However, given that the strong team has won many games in the past (thus making the CNN prediction to be mostly won), the CNN prediction for the weak team is mostly lost; this would make it very difficult to predict when a strong team meets another strong team or a weak team meets another weak team. Therefore, when the teams are separately classified as winners or losers in the first stage based on their historical behavior, we need to incorporate a judgment model that considers the win probabilities of both teams to determine the final predicted outcome.  
Many studies that predict NFL game wins/losses have used a similar concept and dealt with numerical variables such as using the win probability [58] of both teams as the output or calculating their rating scores and ranking [59; 60; 61]. These teams are then compared before deciding the outcome. We take the probability values of the winning and losing classification results from the CNN classifier and feed them into the logistic regression model to learn and evaluate the final result.  
The simple outcome judgment model is defined as follows. Considering team A vs. team B, the probability of each team winning the match is estimated by \(Pa\) and \(Pb\). Given that \(Pa\) and \(Pb\) are estimated separately without considering the opponent, both of them take values between 0 and 1, and their total value ranges between 0 and 2 and is not necessarily equal to 1. If \(Pa\) is greater than \(Pb\), then we predict that team A wins, and vice versa. The logistic regression judgment model takes the name of team A, the probability of winning \(Pa\), the name of opponent team B, and the probability of winning, a total of four variables, to build a prediction model, as shown in Figure 6.  
Figure 6: The outcome judgment model in the second stage.  
Logistic regression is a classification method that is especially suitable for predictive models with binary outcomes whose output values are restricted between 0 and 1 and can be interpreted as probabilities. Therefore, logistic regression has been used in predicting sports outcomes, such as soccer matches [62], used together with a Markov chain model to predict National Collegiate Athletic Association football rankings [63], or incorporated with data envelopment analysis to predict match outcomes of National Basketball Association [64].  
The outcome judgment model of the logistic regression is expressed as follows. Let \(Y\) be the variable of the binary reaction (win or loss) and \(p\) be the probability of win influenced by independent variable \(x\). The relationship between \(p\) and \(x\) is given by:  
The probability of success for event \(Y\) is computed as:  
\[p=\frac{e^{f(x)}}{1+e^{f(x)}} \tag{9}\]  
\(x\): Classification output of CNN for teams A and B in the match  
\(Y\): Probability of team A winning  
When the strengths of both teams are close to each other, the difference between the classification probabilities originally obtained from the CNN is not significant. Such difference can be highlighted through an exponential change in the effect of the independent variables on the dependent ones in the logistic distribution to help determine the winner.