Skip to main content

Posts

Summer - Week 10

This week, I am working to get the dynamic time warping functionality into my program. The process of doing so includes re-processing the features to include the time series, putting each series back together when we construct sequences, and then performing the DTW to generate a number that will be used to compute the kNN of each sequence which can then be used for predictions with the models. The processing time of these activities has gone up significantly since we have been using five different metrics with each of the F phase datasets. I am returning to school next week, and once I've completed the DTW processing all that will remain before we put together our second paper (The date for the reach journal we would like to submit it to is October 1), I am hoping I will have time to look again into the Agglomerative Hierarchical Clustering concept, which I did not successfully complete when we explored it earlier in the summer and then changed focus to the paper. We heard back...

Week 10

As mentioned last week, I spent some time this week getting up to speed on github and git command line tools. I definitely wouldn't consider myself an expert, and the concept of branching is still quite foreign to me, but I'm confident enough currently to work on Alexa and my repository without fear of deleting everything. We continue to not have patients enrolled in the study at St. Lukes. This upcoming week, I will continue my work on the all-subject statistic calculator and reading on sleep classification.

Week 9

Wrapping up last week, I have my stat-calculating script working well and am ready to move forward. My partner, Alexa, and I have decided that we should start to begin working collaboratively on the next step of the project involving multiple data frames. To do so, we will be using a github repository. I have limited experience with the git tools, so I took time in the past week to try and gain a better understanding of the functionality that will be available. Alexa and I have also decided that instead of taking a break from the project itself to begin our literature review, we want to have some measure of both each week. We'll start by taking a more in-depth look at many of the sources utilized in the proposal for our project and studies published by Doug Weeks and Gina Sprint that are related to our current work. We hope to follow source material from those papers to find more relevant literature going forward. Dr. Weeks discharged the two patients that were enrolled in the ...

Week 8

My goals for this week are to:     1. re-create the slicing functionality of the stats function that I lost last week     2. begin working on a program that will allow me to analyze multiple data frames at once The stat-calculator revamp is coming along smoothly, but the multi-frame analysis is still in the planning phase. I intend to re-write my Automated Sleep/Wake analyzer to clean up any unnecessary or overcomplicated features of the original. In addition to working on the programs, we've got two new patients enrolled in the light study so I will be spending a few of my mornings at St. Luke's. Looking forward, after I am able to put together a working multiple-frame analyzer, I'll work on the literature review portion of the project.

Week 7

There are no patients currently enrolled in the study at St. Lukes, so this week's work was entirely focused on coding and reading about slicing. This was my second week of work dealing with the summary statistics of the practice data for subjects K002 and K027. My original code was functional and produced a result that was just slightly different than my mentor's. However, I'd chosen quite a roundabout way of doing this. While I did manage to create a date-time index for my DataFrame, I failed to fully utilize the full potential of this set-up. Instead of passing a slice of the DataFrame through a function for each period, I was moving through the data line by line in order to determine the number of transitions, minutes of sleep and minutes of activity for the period. Clearly, the former is both more efficient and more modular than the latter. I planned to create a function slice_stats that would accept a slice of a DataFrame up to twenty-four hours in size, but sho...

Week 6

Once I managed to get the frame clean and my code working, I checked my results against Dr. Sprint’s to ensure their accuracy. There were a few minor tweaks to make, but the vast majority of my output matched hers. We compared our results for two different subjects to ensure that each case was tested. Now, I’m ready to start calculating the daily statistics for my output. Firstly, I need to change my DataFrame’s indices to DateTime objects so that I can reference each epoch by its time, not an arbitrary index.     My plan for collecting the statistic data is to create a new DataFrame with columns corresponding to each calculated value and rows representing each day during the period the watch was worn. In order to ensure that one “day” will capture an entire day and an entire night, our clock will begin at 7:00 am and end at 6:59 am the following real-day. The day is then further classified into “lights-out” and “lights-on” periods, which I will also be calculating summary st...

Week 5

I’ve successfully implemented the sleep-checking script on my test data, but I’m having a bit of trouble transitioning to the real thing. Before I can even run my code, I need to clean up the data and ensure that I get the correct header row while dropping all blank rows and N/A columns. This has been trickier than I expected, as I’m having a bit of trouble discerning the proper indexing method (.loc[], .iloc[], or []) in each situation. I am confident, however, that once I am able to set up the frame properly, my algorithms should work effectively.     I’m going to spend the next week working on cleaning the DataFrame and picking up any loose ends that remain. My next objective will be to begin calculating summary statistics for the data – minutes of activity in a day, minutes of sleep in a day, etc..

Week 4

 Now that I’m more confident using DataFrames, I’m beginning to practice using them in a small-scale version of the sort of analyses we’ll be using later in the project. My objective is to write code that will use a series of rules to check each minute of Actigraph data and determine whether or not the wearer was asleep or awake at that point in time.     Before I test my code on the actual data, I’ve created a test dataset and found the desired result by hand. This way, I can test each rule and ensure that it is working before I attempt to process the massive data set.

Week 3

    I didn’t return to St. Luke’s until this weekend. My cohort, Alexa, was able to join me in shadowing Sarah, the remaining research assistant. Dr. Weeks had consented a new patient during the week, and another had just been discharged. After going through the procedures again with Alexa, I am fairly confident in my ability to complete the research tasks on my own. I will be doing so later this week when I discharge the new patient.     My work on the online course material has continued at a steady pace. I have entered the section involving NumPy, SciPy, and Pandas. In the upcoming week, I hope to gain a more in-depth understanding of these.

Week 2

The third and final element in project preparation was one that I did not see coming initially. When Dr. Sprint initially discussed the potential research topic with me, she explained her background in the area of activity analysis and association with Dr. Doug Weeks, the Director of Clinical Research at St. Luke’s Rehabilitation Institute. Dr. Weeks was involved in several projects utilizing data from wearable Actigraph watches to study the recovery patterns of stroke and traumatic brain injury, patients. Dr. Weeks’ research assistants were two volunteer physical therapy students who were due to begin clinical rotations at the end of the summer. Thus, it made sense for Alexa and me to replace them. I met with one of the students, Ellie, on a Saturday morning. She explained how there were two patients in the study at current, but that they typically had anywhere from one to three.      Moving forward from this training, my goals will be to get comfortable with the da...

Week 1

I will summarize my goal regarding my preparation for our research project with the following objectives: 1.    to obtain a broad, working understanding of Python 2.    to learn how to best utilize Python libraries and tools specific to data analysis 3.    to become a helpful member of the student research team at St. Luke's Rehabilitation Institute, where our data collection will occur My Python background is very limited. Prior to my current year of school, I had only taken a single class that involved it. In that class, we focused solely on simple math calculations and basic graphing functions. In the two years since then, my knowledge of the language shrank down to almost nothing. My memories of it, however unspecific, are fond ones. To accomplish my first task, I started working through Learn Python the Hard Way, by Zed Shaw. The book was designed to be intelligible to anyone, regardless of previous coding experience, so there was quite a bit that...