fitbit手表中文说明书
Smartwatches and other wearable devices have gained popularity over the past couple of years and have given rise to the cultural phenomenon of the “Quantified Self”. Devices such as the Apple Watch or Fitbit have made it possible for anyone to easily self-track and thereby quantify their lives in some way. Popular self-quantifications include calories burnt, steps walked during the day or quality of sleep.
在过去的几年中,智能手表和其他可穿戴设备获得了普及,并引起了“量化自我”的文化现象。 诸如Apple Watch或Fitbit之类的设备使任何人都可以轻松进行自我跟踪,从而以某种方式量化他们的生活。 流行的自我量化方法包括燃烧卡路里,白天行走的步数或睡眠质量。
In this article, I will focus on the latter, namely quality of sleep, using real life data from approximately one year of Fitbit usage. Fitbit provides users with a Sleep Score, which is supposed to be a measure of sleep quality. I will train and test different Machine Learning models using Python in an attempt to predict the Fitbit Sleep Score as accurately as possible while providing an explanation of how different metrics, such as minutes of REM sleep, affect the score.
在本文中,我将重点讨论后者,即睡眠质量,它使用来自Fitbit大约一年使用的真实生活数据。 Fitbit为用户提供睡眠分数,该分数可以衡量睡眠质量。 我将使用Python训练和测试不同的机器学习模型,以尝试尽可能准确地预测Fitbit睡眠得分,同时说明不同的指标(例如REM睡眠的分钟数)如何影响得分。
The article is structured as follows:
这篇文章的结构如下:
- Brief introduction to Fitbit’s Sleep Score Fitbit睡眠评分简介
- Getting the sleep data from Fitbit 从Fitbit获取睡眠数据
- Data cleaning and preparation 数据清理和准备
- Exploratory Data Analysis 探索性数据分析
- Separating the data into training, validation and test set 将数据分为训练,验证和测试集
- Scaling features and defining performance metrics 扩展功能并定义性能指标
- Feature Selection using Lasso Regression 使用套索回归进行特征选择
- Multiple Linear Regression 多元线性回归
- Random Forest Regressor 随机森林回归
- Extreme Gradient Boosting Regressor 极梯度提升回归器
- Cross-Validation 交叉验证
- Hyperparameter Tuning 超参数调整
- Final model evaluation 最终模型评估
- Concluding comments 结论性意见
Because there is a lot to cover, I split the article into three parts. Part 1 covers points 1 through 4 and focuses on getting the sleep data, preprocessing and visualising it. Part 2 covers points 5 through 10, i.e. actually building the Machine Learning models based on the preprocessed data from part 1. Part 3 covers the rest and is all about improving the models from part 2 to get the most accurate predictions possible.
由于涉及的内容很多,因此将文章分为三部分。 第1部分涵盖了第1点到第4点,并着重于获取睡眠数据,对其进行预处理和可视化。 第2部分涵盖了第 5点到第10点,即根据第1 部分中的预处理数据实际构建机器学习模型。 第3部分涵盖了其余部分,所有内容都涉及对第2部分中的模型进行改进以获得尽可能准确的预测。
Fitbit睡眠分数到底是多少? (What exactly is the Fitbit Sleep Score?)
The Fitbit Sleep Score is best described through an example, so here are two screenshots of what the App provides to its users:
最好通过一个示例来描述Fitbit睡眠得分,因此以下是该应用程序向用户提供的两个屏幕截图: