Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
64 changes: 64 additions & 0 deletions Ideas/NBA_Game_Prediction_Proposal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Luke Finkielstein Mini Project Idea Proposal:
# NBA Game & Stat Prediction


Research Question: How can we predict the outcome of NBA games with better than 60% accuracy?

Approach: Develop a classification model (probably logistic regression) to predict NBA game outcomes using historical game statistics and betting odds. The model will identify games with favorable edges to inform predictions.


## Gathering Tractable Data

**Target:** Game outcomes (win/loss)

**Key Features:**
- Team performance metrics (record, scoring, defense)
- Player availability/injury status
- Opponent strength ranking
- Game context (home/away, back-to-back games)
- Betting odds from sportsbooks (BetGM, DraftKings, Fanduel, etc.)

**Data sources:** ESPN, NBA.com, Basektball-reference.com, Kaggle all have pre-compiled datasets of real games going back 20+ years. Additional data can be scraped from these websites if necessary. Feasibility is high—game data and odds are publicly available.

## Retrieval & Preparation

Two viable approaches:

- Use existing public dataset (faster, reduces timeline overhead)
- Web scrape/API calls for game stats and odds (more control, more time-intensive)


## EDA & Insights

Analyze outcome variation by team strength, matchups, injuries, and game context. Identify predictive features (home-court advantage, efficiency metrics). Perform EDA and visualize feature correlations with game outcomes. Calculate correlations between candidate features and game outcomes to determine which have the strongest predictive signals. Visualizations will include scatter plots of team efficiency metrics, heatmaps of feature correlations, and distribution plots comparing home vs. away performance. I can compare the model performance against a simple baseline (like always predicting the higher-seeded team) to ensure the model adds meaningful value.

## Potential Limitations

- **Unpredictable events:** Model cannot account for unexpected injuries, trades, coaching changes, or rest decisions made close to game time.
- **Probabilistic predictions:** Accuracy >50% does not guarantee profit; individual game predictions are probabilistic and subject to variance.
- **Data limitations:** Historical data may not fully capture changes in league dynamics, rule changes, or roster composition over 20+ years.
- **Sample size:** Model performance is limited by the number of games available for training and testing.

## Implications for Stakeholders

**Sports Bettors/Fans:** Would help make informed decisions on predicting winners and increase profitability.

**Sportsbooks:** Understand what drives betting patterns and refine odds-setting.

**NBA Teams**: Understanding which factors affect a team's ability to win would be very interesting to coaches/players/owners.

## Responsible Deployment & Ethics

**Concerns:** Model could encourage problem gambling; predictions are probabilistic and not deterministic.

**Legal:** Gambling laws vary by state (sports betting is legal in PA, both online and in person). This model would be for analysis only, not financial advice.

**Mitigation:** Include gambling risk disclaimers, talk about it as purely academic.

## Timeline

- Weeks 1-2: Data collection/preparation
- Week 3: EDA and feature engineering
- Weeks 4-5: Model development and evaluation

**Deliverable:** Trained model with accuracy metrics and feature importance analysis.
48 changes: 48 additions & 0 deletions Ideas/NBA_Game_Prediction_Proposal.md.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!DOCTYPE html><html><head><meta charset="utf-8"><title>NBA Game Prediction Proposal.md</title><style></style></head><body id="preview">
<h1 class="code-line" data-line-start=0 data-line-end=1 ><a id="Luke_Finkielstein_Mini_Project_Idea_Proposal_0"></a>Luke Finkielstein Mini Project Idea Proposal:</h1>
<h1 class="code-line" data-line-start=1 data-line-end=2 ><a id="NBA_Game__Stat_Prediction_1"></a>NBA Game &amp; Stat Prediction</h1>
<p class="has-line-data" data-line-start="4" data-line-end="5">Research Question: How can we predict the outcome of NBA games with better than 60% accuracy?</p>
<p class="has-line-data" data-line-start="6" data-line-end="7">Approach: Develop a classification model (probably logistic regression) to predict NBA game outcomes using historical game statistics and betting odds. The model will identify games with favorable edges to inform predictions.</p>
<h2 class="code-line" data-line-start=9 data-line-end=10 ><a id="Gathering_Tractable_Data_9"></a>Gathering Tractable Data</h2>
<p class="has-line-data" data-line-start="11" data-line-end="12"><strong>Target:</strong> Game outcomes (win/loss)</p>
<p class="has-line-data" data-line-start="13" data-line-end="14"><strong>Key Features:</strong></p>
<ul>
<li class="has-line-data" data-line-start="14" data-line-end="15">Team performance metrics (record, scoring, defense)</li>
<li class="has-line-data" data-line-start="15" data-line-end="16">Player availability/injury status</li>
<li class="has-line-data" data-line-start="16" data-line-end="17">Opponent strength ranking</li>
<li class="has-line-data" data-line-start="17" data-line-end="18">Game context (home/away, back-to-back games)</li>
<li class="has-line-data" data-line-start="18" data-line-end="20">Betting odds from sportsbooks (BetGM, DraftKings, Fanduel, etc.)</li>
</ul>
<p class="has-line-data" data-line-start="20" data-line-end="21"><strong>Data sources:</strong> ESPN, <a href="http://NBA.com">NBA.com</a>, <a href="http://Basektball-reference.com">Basektball-reference.com</a>, Kaggle all have pre-compiled datasets of real games going back 20+ years. Additional data can be scraped from these websites if necessary. Feasibility is high—game data and odds are publicly available.</p>
<h2 class="code-line" data-line-start=22 data-line-end=23 ><a id="Retrieval__Preparation_22"></a>Retrieval &amp; Preparation</h2>
<p class="has-line-data" data-line-start="24" data-line-end="25">Two viable approaches:</p>
<ul>
<li class="has-line-data" data-line-start="26" data-line-end="27">Use existing public dataset (faster, reduces timeline overhead)</li>
<li class="has-line-data" data-line-start="27" data-line-end="28">Web scrape/API calls for game stats and odds (more control, more time-intensive)</li>
</ul>
<h2 class="code-line" data-line-start=30 data-line-end=31 ><a id="EDA__Insights_30"></a>EDA &amp; Insights</h2>
<p class="has-line-data" data-line-start="32" data-line-end="33">Analyze outcome variation by team strength, matchups, injuries, and game context. Identify predictive features (home-court advantage, efficiency metrics). Perform EDA and visualize feature correlations with game outcomes. Calculate correlations between candidate features and game outcomes to determine which have the strongest predictive signals. Visualizations will include scatter plots of team efficiency metrics, heatmaps of feature correlations, and distribution plots comparing home vs. away performance. I can compare the model performance against a simple baseline (like always predicting the higher-seeded team) to ensure the model adds meaningful value.</p>
<h2 class="code-line" data-line-start=34 data-line-end=35 ><a id="Potential_Limitations_34"></a>Potential Limitations</h2>
<ul>
<li class="has-line-data" data-line-start="36" data-line-end="37"><strong>Unpredictable events:</strong> Model cannot account for unexpected injuries, trades, coaching changes, or rest decisions made close to game time.</li>
<li class="has-line-data" data-line-start="37" data-line-end="38"><strong>Probabilistic predictions:</strong> Accuracy &gt;50% does not guarantee profit; individual game predictions are probabilistic and subject to variance.</li>
<li class="has-line-data" data-line-start="38" data-line-end="39"><strong>Data limitations:</strong> Historical data may not fully capture changes in league dynamics, rule changes, or roster composition over 20+ years.</li>
<li class="has-line-data" data-line-start="39" data-line-end="41"><strong>Sample size:</strong> Model performance is limited by the number of games available for training and testing.</li>
</ul>
<h2 class="code-line" data-line-start=41 data-line-end=42 ><a id="Implications_for_Stakeholders_41"></a>Implications for Stakeholders</h2>
<p class="has-line-data" data-line-start="43" data-line-end="44"><strong>Sports Bettors/Fans:</strong> Would help make informed decisions on predicting winners and increase profitability.</p>
<p class="has-line-data" data-line-start="45" data-line-end="46"><strong>Sportsbooks:</strong> Understand what drives betting patterns and refine odds-setting.</p>
<p class="has-line-data" data-line-start="47" data-line-end="48"><strong>NBA Teams</strong>: Understanding which factors affect a team’s ability to win would be very interesting to coaches/players/owners.</p>
<h2 class="code-line" data-line-start=49 data-line-end=50 ><a id="Responsible_Deployment__Ethics_49"></a>Responsible Deployment &amp; Ethics</h2>
<p class="has-line-data" data-line-start="51" data-line-end="52"><strong>Concerns:</strong> Model could encourage problem gambling; predictions are probabilistic and not deterministic.</p>
<p class="has-line-data" data-line-start="53" data-line-end="54"><strong>Legal:</strong> Gambling laws vary by state (sports betting is legal in PA, both online and in person). This model would be for analysis only, not financial advice.</p>
<p class="has-line-data" data-line-start="55" data-line-end="56"><strong>Mitigation:</strong> Include gambling risk disclaimers, talk about it as purely academic.</p>
<h2 class="code-line" data-line-start=57 data-line-end=58 ><a id="Timeline_57"></a>Timeline</h2>
<ul>
<li class="has-line-data" data-line-start="59" data-line-end="60">Weeks 1-2: Data collection/preparation</li>
<li class="has-line-data" data-line-start="60" data-line-end="61">Week 3: EDA and feature engineering</li>
<li class="has-line-data" data-line-start="61" data-line-end="63">Weeks 4-5: Model development and evaluation</li>
</ul>
<p class="has-line-data" data-line-start="63" data-line-end="64"><strong>Deliverable:</strong> Trained model with accuracy metrics and feature importance analysis.</p>

</body></html>
23 changes: 23 additions & 0 deletions presentations/DATA400TestPrez.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: "Test Presentation Ninja"
subtitle: "⚔<br/>with xaringan"
author: "Luke Finkielstein"
institute: "RStudio, PBC"
date: "2016/12/12 (updated: `r Sys.Date()`)"
output:
xaringan::moon_reader:
lib_dir: libs
nature:
highlightStyle: github
highlightLines: true
countIncrementalSlides: false
---

background-image: url(https://upload.wikimedia.org/wikipedia/commons/b/be/Sharingan_triple.svg)

```{r setup, include=FALSE}
options(htmltools.dir.version = FALSE)
```

# This is a test presentation

175 changes: 175 additions & 0 deletions presentations/Test Presentation Ninja.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
<!DOCTYPE html>
<html lang="" xml:lang="">
<head>
<title>Test Presentation Ninja</title>
<meta charset="utf-8" />
<meta name="author" content="Luke Finkielstein" />
<script src="libs/header-attrs/header-attrs.js"></script>
<link href="libs/remark-css/default.css" rel="stylesheet" />
<link href="libs/remark-css/default-fonts.css" rel="stylesheet" />
</head>
<body>
<textarea id="source">
class: center, middle, inverse, title-slide

.title[
# Test Presentation Ninja
]
.subtitle[
## ⚔<br/>with xaringan
]
.author[
### Luke Finkielstein
]
.institute[
### RStudio, PBC
]
.date[
### 2016/12/12 (updated: 2026-01-23)
]

---


background-image: url(https://upload.wikimedia.org/wikipedia/commons/b/be/Sharingan_triple.svg)



# This is a test presentation

</textarea>
<style data-target="print-only">@media screen {.remark-slide-container{display:block;}.remark-slide-scaler{box-shadow:none;}}</style>
<script src="https://remarkjs.com/downloads/remark-latest.min.js"></script>
<script>var slideshow = remark.create({
"highlightStyle": "github",
"highlightLines": true,
"countIncrementalSlides": false
});
if (window.HTMLWidgets) slideshow.on('afterShowSlide', function (slide) {
window.dispatchEvent(new Event('resize'));
});
(function(d) {
var s = d.createElement("style"), r = d.querySelector(".remark-slide-scaler");
if (!r) return;
s.type = "text/css"; s.innerHTML = "@page {size: " + r.style.width + " " + r.style.height +"; }";
d.head.appendChild(s);
})(document);

(function(d) {
var el = d.getElementsByClassName("remark-slides-area");
if (!el) return;
var slide, slides = slideshow.getSlides(), els = el[0].children;
for (var i = 1; i < slides.length; i++) {
slide = slides[i];
if (slide.properties.continued === "true" || slide.properties.count === "false") {
els[i - 1].className += ' has-continuation';
}
}
var s = d.createElement("style");
s.type = "text/css"; s.innerHTML = "@media print { .has-continuation { display: none; } }";
d.head.appendChild(s);
})(document);
// delete the temporary CSS (for displaying all slides initially) when the user
// starts to view slides
(function() {
var deleted = false;
slideshow.on('beforeShowSlide', function(slide) {
if (deleted) return;
var sheets = document.styleSheets, node;
for (var i = 0; i < sheets.length; i++) {
node = sheets[i].ownerNode;
if (node.dataset["target"] !== "print-only") continue;
node.parentNode.removeChild(node);
}
deleted = true;
});
})();
// add `data-at-shortcutkeys` attribute to <body> to resolve conflicts with JAWS
// screen reader (see PR #262)
(function(d) {
let res = {};
d.querySelectorAll('.remark-help-content table tr').forEach(tr => {
const t = tr.querySelector('td:nth-child(2)').innerText;
tr.querySelectorAll('td:first-child .key').forEach(key => {
const k = key.innerText;
if (/^[a-z]$/.test(k)) res[k] = t; // must be a single letter (key)
});
});
d.body.setAttribute('data-at-shortcutkeys', JSON.stringify(res));
})(document);
(function() {
"use strict"
// Replace <script> tags in slides area to make them executable
var scripts = document.querySelectorAll(
'.remark-slides-area .remark-slide-container script'
);
if (!scripts.length) return;
for (var i = 0; i < scripts.length; i++) {
var s = document.createElement('script');
var code = document.createTextNode(scripts[i].textContent);
s.appendChild(code);
var scriptAttrs = scripts[i].attributes;
for (var j = 0; j < scriptAttrs.length; j++) {
s.setAttribute(scriptAttrs[j].name, scriptAttrs[j].value);
}
scripts[i].parentElement.replaceChild(s, scripts[i]);
}
})();
(function() {
var links = document.getElementsByTagName('a');
for (var i = 0; i < links.length; i++) {
if (/^(https?:)?\/\//.test(links[i].getAttribute('href'))) {
links[i].target = '_blank';
}
}
})();
// adds .remark-code-has-line-highlighted class to <pre> parent elements
// of code chunks containing highlighted lines with class .remark-code-line-highlighted
(function(d) {
const hlines = d.querySelectorAll('.remark-code-line-highlighted');
const preParents = [];
const findPreParent = function(line, p = 0) {
if (p > 1) return null; // traverse up no further than grandparent
const el = line.parentElement;
return el.tagName === "PRE" ? el : findPreParent(el, ++p);
};

for (let line of hlines) {
let pre = findPreParent(line);
if (pre && !preParents.includes(pre)) preParents.push(pre);
}
preParents.forEach(p => p.classList.add("remark-code-has-line-highlighted"));
})(document);</script>

<script>
slideshow._releaseMath = function(el) {
var i, text, code, codes = el.getElementsByTagName('code');
for (i = 0; i < codes.length;) {
code = codes[i];
if (code.parentNode.tagName !== 'PRE' && code.childElementCount === 0) {
text = code.textContent;
if (/^\\\((.|\s)+\\\)$/.test(text) || /^\\\[(.|\s)+\\\]$/.test(text) ||
/^\$\$(.|\s)+\$\$$/.test(text) ||
/^\\begin\{([^}]+)\}(.|\s)+\\end\{[^}]+\}$/.test(text)) {
code.outerHTML = code.innerHTML; // remove <code></code>
continue;
}
}
i++;
}
};
slideshow._releaseMath(document);
</script>
<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
(function () {
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-MML-AM_CHTML';
if (location.protocol !== 'file:' && /^https?:/.test(script.src))
script.src = script.src.replace(/^https?:/, '');
document.getElementsByTagName('head')[0].appendChild(script);
})();
</script>
</body>
</html>