We are students balancing coursework, internships, side projects and the fellowship. Sleep is incredibly important to ensure we stay on our top game throughout the week. We wanted to build this sleep prediction software to give us a sense of how we expect our sleep quality to fluctuate based upon our prior history and how much sleep we foresee for the coming week.
What it does
This model currently takes in a sleep dataset from the popular sleep cycle tracking app SleepCycle. We used this initial dataset to create the test parameters for our model. This dataset tracks sleep quality and time slept. We then input the expected values for our expected sleep time for the upcoming week and the model outputs our predicted sleep quality. As we add more weeks, our individual input is added to the model's test set creating a more personalized recommendation system.
How we built it
We built this primarily in Python, using popular libraries such as pandas, numpy, and os to get our initial model up and running. We used Jupyter Notebooks for fast development and visualization of our models to help guide our work. We used the open source library sktime to actually train the model and forecast our future sleep predictions.
Challenges we ran into
Learning the sktime library functions in a relatively short amount of time proved to be a challenge, especially as we didn't have extensive machine learning or time series experience beforehand. Although we did prior work with similar libraries such as tensorflow and sklearn that helped us more easily catch up to sktime.
Accomplishments that we're proud of
Learning the sktime library functions for forecasting in a relatively short amount of time. Even though we have some experience with related toolkits, learning a new API is definetly becoming an acquired skill for us, and we are highly proud of that.
We are proud that we were able to stick to a simple yet elegant way of writing code, and being able to collaborate while each one of us is a quarter-way around the world from us.
One of our teammates had multiple midterm examinations this week as well, so we are proud of them for managing a lot of projects at a time.
Lastly, simulating the github flow as much as possible and adhering to good software engineering standards was a refreshing and accomplising experience.
What we learned
This was the first time one of our teammates worked with pandas! However, they learned a lot and are highly eager to work further with the library.
We of course learned how to work with sktime. For the project, we also learned how to work with python's awesome array of ASCII color art and colorizers, such as colorama, which have beautiful APIs and are remarkably easy to learn.
We also picked up some forecasting lingo/terms and are eager to use sktime again!
What's next for Sleep Prediction
A CLI that helps you manage your sleep and plan for sleep is highly important in today's busy digital world. We went for the simplicity and classic-feel of a CLI because it allows us to extend our project, and we already have a few features in the pipeline:
- [ ] Active display of your sleep stats, whenever you want 'em
- [ ] Fancy, retro-style chart plotting on the command line
- [ ] Cute ASCII art to greet you when using the CLI