Sharp Sight Labs

DS Students – just want to point you to Sharp Sight Labs –

http://www.sharpsightlabs.com

A founder / author from Sharp Sight Labs (wrote the post about learning R first for data science) has been very helpful in pointing me to several new developments relevant to exercise physiology, data science and health analytics.

On the user end – what people wear:

Athos ; quite a wired shirt, just another step in the direction of wearable computing. If you decide to take the course on Getting and Cleaning Data you will learn techniques in R for getting data from various sources and integrating them into a clean and tidy data set for analysis. In fact, the course project for that class is based on data collected from wearable computing sensors (accelerometers).

Apple Watch : which integrates with the iPhone of course and has the potential to provide a very powerful system for health analytics given the opportunity for data about context, causes and effects, as pointed out to me by Sharp Sight Labs.

On the backend – where the data exists and data analysis starts:

https://developer.apple.com/healthkit/

http://www.samsung.com/us/globalinnovation/pdf/Samsung_SAMI_Backgrounder.pdf

These are both APIs (well Samsung’s is an AMI, I suppose, to be honest I am not completely sure of what the difference is); an API is an application programming interface. You can learn more about getting data from an API in the Getting and Cleaning Data course – at least enough to get you started if you want to go in that direction.

I found this post on R-bloggers helpful and affirming given the upcoming semester. Recall the directed study students will be learning the statistical programming language R: http://www.r-project.org

Here is a link to the post:

http://www.r-bloggers.com/why-you-should-learn-r-first-for-data-science/

From Sharp Sight Labs:

http://www.sharpsightlabs.com/learn-r-data-science/

Law of large numbers – central limit theorem

Image

I just came up with a simple example of the central limit theorem after teaching this concept to the DPT research methods course and getting a post class question. In class I had used a normal distribution of HRs from about 270,000 subjects (a large dataset of resting HR and BP I have of people getting pre-employment testing). We took this sample to be our population for example purposes. The initial purpose was to demonstrate the law of large numbers. That as we randomly drew larger samples from this population of 274,000 our sample mean and sample distribution started to be the same as the population mean and population distribution. And if the underlying population distribution is not normal, then that is the distribution that is obtained with a large sample. So if there is a right skew to a population distribution then as samples get larger then we expect that sample to have a right skew. That is the law of large numbers.

Central limit theorem (sometimes confused with the law of large numbers) is about the mean and distribution of “sample means.” You should think of it as the mean of means (though it also applies to the sum). If we have population with a “non normal” distribution, and we sample from it many times all with the same size sample, and we take the means of those samples, and then we make a histogram of those “sample means” then we end up with a normal distribution – no matter what the underlying population distribution might be.

To demonstrate I wrote the following R code that first creates a population with a log distribution and 500,000 “subjects.” There is then a function samples from that population with parameters you can vary (number of samples from the population, and number of subjects / sample), and creates a new data vector of the “sample means.”  The only R add on package used is: dplyr

The code is attached, and below is the underlying population distribution as well as the sample means distribution. This is the central limit theorem at work.

CLT_code

Semester start – data scientists toolbox

For the first full month of the semester the Directed Study students will be learning about various tools in the data scientist’s toolbox. They will work through a self guided online tutorial (course) on this topic by Jeff Leek, PhD, a professor of biostatistics at John’s Hopkin’s Bloomberg School of Public Health. They will learn about the reasons for data analysis, the basics of R (getting it, installing it and a bit about using it (www.r-project.org), and they will learn about version control and online repositories that include version control such as github – for example: https://github.com/scollinspt

For the directed study I have started a group github repository:

https://github.com/HFP-analytics

Students will share their public github site with me so that I can follow their repositories which will grow as they learn to perform statistical programming with R. They will meet with me as they need, when they are able, to get help with their self guided learning. A huge part of doing statistical programming is learning to learn new techniques – being resourceful with the tools of the trade. This includes knowing about them, but more importantly learning how to access them and develop skills independently. People often ask me how I learned SPSS (when I was using SPSS; I have switched to R for just about all my data analysis) and why I could do so much with SPSS. I learned it through using it to solve problems. First small problems and as my abilities grew the problems I could tackle with it grew. My seeming proficiency with SPSS was not really with SPSS at all, it was with an approach to learning on my own with the tools I had available to solve the problems at hand.

I hope for the same developmental process for the directed study students. Eventually (later this semester and next semester) we can start doing team projects which will be housed on the group repository so we can each contribute to it, see what others are doing for the project, and have version control for the code produced. Finally, when we have completed a project we will have done so with the principles of “reproducible research” – our de identified data (from public sources) will be available, as will the code used to process and analyze it, and the results. All free for people to see, manipulate, confirm…..that is, reproduce if they have questions about how the data was used to generate the results presented.

Reasons we do analysis

We can consider several reasons that we “do analysis” – some that have been listed include:

1. Description (descriptive analysis)
2. Exploration (exploratory analysis)
3. Inference (as in inductive inference – inferential analysis)
4. Prediction (a form of inferential – predictive analysis)
5. Causation (a form of inferential – causal analysis)
6. Mechanism (a form of inferential – mechanistic analysis)

But at the end of the day there is really one reason we “do analysis.” We analyze for knowledge. Analysis is a bridge between the empirical and the rationale. From the sensory observations to the mental models.

Keeping it all in perspective

Here is a great post by Trey Causey that will help us keep things in perspective with your project. Is this directed study a good start, yes. Will it be all that is needed, no way. Is it great to combine what you are learning through this directed study with what you are learning as a student earning a BS in exercise physiology, absolutely (keep in mind you have several highly research focused classes ahead of you (EP II, Research Methods, Exercise Prescription); can you easily take what you learn from this directed study and use it in a MS or PhD program to really be qualified as a data scientist – without question!

http://treycausey.com/getting_started.html