Author Archives: Patrick

Issues with ‘Black Box’ Machine Learning Models in Injury Prediction

Injury prediction models developed using machine learning approaches have become more common due to the substantial rise of proprietary software in the sports science and sports medicine space. However, such ‘black box’ approaches are not without limitation. Aside from a lack of transparency, preventing independent evaluation of model performance, these types of models present challenges in interpretation, making it difficult for practitioners who are required to make decisions about athlete health and plan interventions.

I recently had the pleasure of working on a paper headed up by Garrett Bullock and a list of wonderful co-authors where we discuss some of these issues:

Black Box Prediction Methods in Sports Medicine Deserve a Red Card for Reckless Practice: A Change of Tactics is Needed to Advance Athlete Care. Sports Med.

TidyX 94: RMarkdown Parameterized Reports

This week, Ellis Hughes and I discuss how you can add controls to your RMarkdown by setting the parameters arguments within the YAML.

If you have a custom report that you need to reproduce frequently, changing different groups or pieces of information, parameterized reports are a great way to save time and ensure reproducibility.

For example, say you work for an NBA team and the head coach wants to see a team report on the Miami Heat, Dallas Mavericks, and Phoenix Suns. Rather than changing the contents within the RMarkdown itself (copying and pasting the new team name, seasons, weeks of year, etc.), which opens you up to making errors, you can set specific parameters that you want to exert control over within the YAML. Once you Knit the document with those parameters you can make the changes you need (IE, select the team, season, and weeks of the year) and the report will be produced with the desired info.

To watch our screen cast, CLICK HERE.

To access our code, CLICK HERE.

TidyX 92: RMarkdown – Multiple Tab Reports

A problem that we often run into when building reports is that the amount of data can make the report itself rather long. RMarkdown can assist us in streamlining the data sharing process by creating an clickable Table of Contents at the top of the report and by adding tabs within the report that are designated to specific data or research questions. Therefore, this week, Ellis Hughes and I discuss how you can create multiple tabs within your RMarkdown report.

To watch our screen cast, CLICK HERE.

To access our code, CLICK HERE.

TidyX 91: RMarkdown – Code Chunks & Figure Options

Picking up where we left off last week, Ellis Hughes and I dive into controlling code chunks and figure options within your RMarkdown reports.

We cover:

1) How to show or hide your code in the report
2) How to show or hide the output of your code in a report
3) How to show code without having R run it in the report
4) Setting figure height, width, and alignment
5) Setting a figure caption

The first RMarkdown file covers the basics <CLICK HERE>

The second RMarkdown walks through a more nuanced example, where we scrape data from basketball-reference.com and create a {ggplot2} plot of Team Offensive and Defensive Rebounds <CLICK HERE>

To watch the screen cast, CLICK HERE.