Answers.Body: <p>This is probably not going to work well as a way to make money. <a href="https://www.bloomberg.com/news/features/2018-05-03/the-gambler-who-cracked-the-horse-racing-code" rel="nofollow noreferrer">People</a> with far larger budgets, and far more training, are already milking out any money to be made this way. This is probably their day job, and they are good at it.</p>
  
  <p>That said, here are some ideas:</p>
  
  <ol>
  <li>You do not need or want to use a convolutional network for this. Convolutional networks are useful when you want to detect a pattern invariant to translation in complex inputs. The only translation you have is that the teams could appear in either order. Just input them in both possible orders if this is a concern.</li>
  <li>You want to find similar games. You do not need or (generally) want to use a neural network to do this. As a starting point, normalize the features and compute the <a href="https://en.wikipedia.org/wiki/K-nearest_neighbors_algorithm" rel="nofollow noreferrer">nearest neighbors</a> of an input point directly. Algorithms for doing this are fast and will return all similar points. You can even (with small modifications) output the degree of similarity as a numeric value.</li>
  <li>If you want to predict who will win, you will probably have much better luck doing that directly. Build a <a href="https://en.wikipedia.org/wiki/Multilayer_perceptron" rel="nofollow noreferrer">feed-forward neural network</a> that predicts which team won from the features you gathered. This is a routine classification task, and the resulting model will probably work better than finding similar games and then trying to manually determine what to do.</li>
  <li>If you care about scores instead of just who won, use a feed forward network for regression instead of classification. The task is almost identical.</li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-24T01:14:40.993Z
Answers.Text: A CNN is probably the incorrect term since the filter is an entire game and the data being filtered is all games in the training set, but it’s easier to visualize that way.  Creating an arbitrary methodology to determine whether a past game is sufficiently similar isn’t hard - the crux here is finding the correct weights for each team category.  I know that I could use a feedforward network to estimate scores, but I like the idea of finding some number of similar games and looking at summary statistics.
Answers.UserDisplayName: SuperCodeBrah
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-24T01:19:18.747Z
Answers.Text: @SuperCodeBrah It sounds to me like you want to do regression with a feed-forward network.
Answers.UserDisplayName: John Doucette
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-24T01:25:54.570Z
Answers.Text: If that could work, then sure, but it seems hard to get a grasp of any nonlinearity that exists in the universe of potential matchups, so I’m trying to turn it into more of a categorization problem.  You correctly surmised that I’m new to this.  What I’m saying is that I don’t have a good sense of how exactly a feedforward network should be structured for this type of potentially nonlinear problem.  I could come up with something really messy for a nearest neighbor type of solution, but I’m wondering if there’s an existing methodology that’s cleaner.
Answers.UserDisplayName: SuperCodeBrah
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-24T01:32:41.760Z
Answers.Text: @SuperCodeBrah I'm not completely sure I've understood what you want, but it sounds like maybe you are after something like dimensionality reduction? That is, you'd like to come up with weightings of the features that allow you to make simple comparisons of games in a principled way. Maybe you want PCA? https://en.wikipedia.org/wiki/Principal_component_analysis
Answers.UserDisplayName: John Doucette
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-24T02:46:56.793Z
Answers.Text: I'm not looking for dimensionality reduction exactly. If I understand correctly, the relative importance of each input gets lost in PCA (i.e., it only ranks attributes). Assuming I've already normalized each characteristic (let's say 1-100), I could calculate a cumulative distance between a given game and each game in the historical set, however, for football, that would lead to me treating passing offense equally with something like kickoff return average, which would obviously be wrong. So the solution would be to further normalize each characteristic by its importance to outcome.
Answers.UserDisplayName: SuperCodeBrah
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-24T03:06:48.363Z
Answers.Text: Okay, assuming I could correctly structure a NN as a non-linear classifier for this problem (I very much struggle with the intuition for how to tailor NNs for a given problem other than maximum layers, nodes, and connections), I think the answer is to train the NN and then extract the weights of the connections between the input and first hidden layer, and use those to calculate cumulative distances between each characteristic of the game in question and each game in the historical set - `||G1 - H1|| * W1 + ||G2 - H2|| * W2...` There's probably a better way, but I think that would work.
Answers.UserDisplayName: SuperCodeBrah
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-24T04:12:58.550Z
Answers.Text: One other point - the advantage to doing it this way is that I'm left with not just a prediction model but a means to come up with a rough estimation of statistical significance of past outcomes relative to the spread on a game, i.e., 1) the greater the difference between the average of historical outcomes and the current spread and 2) the lower the variation on those outcomes, the more confident I can be in the pick.  So I wouldn't just bet on every  game - I'd have a filtering mechanism.  There's obviously more to think about and I could be flat out wrong, but that seems like a start.
Answers.UserDisplayName: SuperCodeBrah
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-24T13:28:07.517Z
Answers.Text: @SuperCodeBrah You are mistaken about PCA: it produces a weighting for each input, such that a linear combination of weighted inputs yields a good approximation of the "shape" of the original dataset. I'll also recommend against trying to interpret the weights in the first layer of a NN as statistically meaningful. It _really_ sounds like you want logistic or linear regression if that's your goal. Good luck!
Answers.UserDisplayName: John Doucette
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-24T14:37:22.033Z
Answers.Text: Okay, all good stuff, thanks.  I think the secret sauce is in determining how to rank each team for each characteristic.  If I wanted to get really crazy, I might be able to train on raw stats rather than team rankings.  Sounds like I just need to really play around with it and see what sticks.
Answers.UserDisplayName: SuperCodeBrah
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-23T23:56:21.640Z
Answers.LastActivityDate: 2019-10-23T23:56:21.640Z
Answers.UserDisplayName: John Doucette
Body: <p>I want to design a neural network that can be used for predicting sports scores for betting, specifically for American football.  What I’d like to do is create a kind of profile for each game based on the specific strengths and weaknesses of each team.</p>
  <p>For example, let’s say two teams have the following characteristics:</p>
  <p>Team A:</p>
  <ul>
  <li>Passing Offense Rating: 5</li>
  <li>Rushing Offense Rating: 2</li>
  </ul>
  <p>Team B:</p>
  <ul>
  <li>Passing Defense Rating: 3</li>
  <li>Rushing Defense Rating: 4</li>
  </ul>
  <p>I’d like to be able to search for historical games where two teams have similar profiles.  I could perhaps then narrow it down to games with profiles that have statistically significant historical outcomes (i.e., certain types of matchups are likely to result in similar results).</p>
  <p>In reality, I’d have dozens of team characteristics to compare.  I would then need to assign weights of importance to each characteristic, which could be used to further ensure the effective selection of similar games.</p>
  <p>I <em>think</em> I could do this like a convolutional neural network where there is an additional filter applied to the characteristics for the weights.</p>
  <p>Are there any other ways that are specifically applicable to this strategy?</p>
  
Tags: <neural-networks><convolutional-neural-networks><pattern-recognition><algorithm-request><model-request>
Title: Neural networks for sports betting
UserDisplayName: SuperCodeBrah
ThreadText: # Neural networks for sports betting
  
  (Asked by: username_0 on 2019-10-23)
  
  I want to design a neural network that can be used for predicting sports scores for betting, specifically for American football. What I’d like to do is create a kind of profile for each game based on the specific strengths and weaknesses of each team.
  
  For example, let’s say two teams have the following characteristics:
  
  Team A:
  
  * Passing Offense Rating: 5
  * Rushing Offense Rating: 2
  
  Team B:
  
  * Passing Defense Rating: 3
  * Rushing Defense Rating: 4
  
  I’d like to be able to search for historical games where two teams have similar profiles. I could perhaps then narrow it down to games with profiles that have statistically significant historical outcomes (i.e., certain types of matchups are likely to result in similar results).
  
  In reality, I’d have dozens of team characteristics to compare. I would then need to assign weights of importance to each characteristic, which could be used to further ensure the effective selection of similar games.
  
  I *think* I could do this like a convolutional neural network where there is an additional filter applied to the characteristics for the weights.
  
  Are there any other ways that are specifically applicable to this strategy?
  
  **Tags:** neural-networks, convolutional-neural-networks, pattern-recognition, algorithm-request, model-request
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-10-23. Score: 2
  
  This is probably not going to work well as a way to make money. [People](https://www.bloomberg.com/news/features/2018-05-03/the-gambler-who-cracked-the-horse-racing-code) with far larger budgets, and far more training, are already milking out any money to be made this way. This is probably their day job, and they are good at it.
  
  That said, here are some ideas:
  
  1. You do not need or want to use a convolutional network for this. Convolutional networks are useful when you want to detect a pattern invariant to translation in complex inputs. The only translation you have is that the teams could appear in either order. Just input them in both possible orders if this is a concern.
  2. You want to find similar games. You do not need or (generally) want to use a neural network to do this. As a starting point, normalize the features and compute the [nearest neighbors](https://en.wikipedia.org/wiki/K-nearest_neighbors_algorithm) of an input point directly. Algorithms for doing this are fast and will return all similar points. You can even (with small modifications) output the degree of similarity as a numeric value.
  3. If you want to predict who will win, you will probably have much better luck doing that directly. Build a [feed-forward neural network](https://en.wikipedia.org/wiki/Multilayer_perceptron) that predicts which team won from the features you gathered. This is a routine classification task, and the resulting model will probably work better than finding similar games and then trying to manually determine what to do.
  4. If you care about scores instead of just who won, use a feed forward network for regression instead of classification. The task is almost identical.
  
  > **Comments:**
  > **username_0**: A CNN is probably the incorrect term since the filter is an entire game and the data being filtered is all games in the training set, but it’s easier to visualize that way.  Creating an arbitrary methodology to determine whether a past game is sufficiently similar isn’t hard - the crux here is finding the correct weights for each team category.  I know that I could use a feedforward network to estimate scores, but I like the idea of finding some number of similar games and looking at summary statistics.  
  > **username_1**: @username_0 It sounds to me like you want to do regression with a feed-forward network.  
  > **username_0**: If that could work, then sure, but it seems hard to get a grasp of any nonlinearity that exists in the universe of potential matchups, so I’m trying to turn it into more of a categorization problem.  You correctly surmised that I’m new to this.  What I’m saying is that I don’t have a good sense of how exactly a feedforward network should be structured for this type of potentially nonlinear problem.  I could come up with something really messy for a nearest neighbor type of solution, but I’m wondering if there’s an existing methodology that’s cleaner.  
  > **username_1**: @username_0 I'm not completely sure I've understood what you want, but it sounds like maybe you are after something like dimensionality reduction? That is, you'd like to come up with weightings of the features that allow you to make simple comparisons of games in a principled way. Maybe you want PCA? https://en.wikipedia.org/wiki/Principal_component_analysis  
  > **username_0**: I'm not looking for dimensionality reduction exactly. If I understand correctly, the relative importance of each input gets lost in PCA (i.e., it only ranks attributes). Assuming I've already normalized each characteristic (let's say 1-100), I could calculate a cumulative distance between a given game and each game in the historical set, however, for football, that would lead to me treating passing offense equally with something like kickoff return average, which would obviously be wrong. So the solution would be to further normalize each characteristic by its importance to outcome.  
  > **username_0**: Okay, assuming I could correctly structure a NN as a non-linear classifier for this problem (I very much struggle with the intuition for how to tailor NNs for a given problem other than maximum layers, nodes, and connections), I think the answer is to train the NN and then extract the weights of the connections between the input and first hidden layer, and use those to calculate cumulative distances between each characteristic of the game in question and each game in the historical set - `||G1 - H1|| * W1 + ||G2 - H2|| * W2...` There's probably a better way, but I think that would work.  
  > **username_0**: One other point - the advantage to doing it this way is that I'm left with not just a prediction model but a means to come up with a rough estimation of statistical significance of past outcomes relative to the spread on a game, i.e., 1) the greater the difference between the average of historical outcomes and the current spread and 2) the lower the variation on those outcomes, the more confident I can be in the pick.  So I wouldn't just bet on every  game - I'd have a filtering mechanism.  There's obviously more to think about and I could be flat out wrong, but that seems like a start.  
  > **username_1**: @username_0 You are mistaken about PCA: it produces a weighting for each input, such that a linear combination of weighted inputs yields a good approximation of the "shape" of the original dataset. I'll also recommend against trying to interpret the weights in the first layer of a NN as statistically meaningful. It _really_ sounds like you want logistic or linear regression if that's your goal. Good luck!  
  > **username_0**: Okay, all good stuff, thanks.  I think the secret sauce is in determining how to rank each team for each characteristic.  If I wanted to get really crazy, I might be able to train on raw stats rather than team rankings.  Sounds like I just need to really play around with it and see what sticks.  
  
  ---
  
  