Lockdown Wheelie项目

“It’s Strava for wheelies,” my lockdown project, combining hyper-local exercise with data analytics to track and guide improvement. Practising wheelies is a great way to stay positive; after all, it’s looking up, moving forward.

我的锁定项目“将Strava运用于自行车运动”,将超局部锻炼与数据分析相结合,以跟踪和指导改进。 练习脚踏车是保持积极向上的好方法。 毕竟,它正在向上看。

I’ve been at it for a month now, logged 1,331 attempts, and seen my maximum time improve from two to nearly six seconds. In the process, I’ve generated millions of data points to guide further improvement through machine learning.

我已经花了一个月的时间,记录了1,331次尝试,看到我的最大时间从两秒提高到近六秒。 在此过程中,我已经生成了数百万个数据点,以指导通过机器学习进行进一步的改进。

Chart of duration of all wheelies

数据采集​​装置 (The Data Collection Rig)

It doesn’t get much slicker than this. The hardware comprises:

没有比这更光滑的了。 硬件包括:

  1. (A) 1 bike

    (A)1辆自行车
  2. (B) 1 smartphone

    (B)1部智能手机
  3. (C) 1 roll duct tape

    (C)1卷胶带

Using a generous amount of duct tape (C), affix the phone (B) to the top tube of the bike (A) near the head.

使用大量的胶带(C),将手机(B)固定在靠近头部的自行车(A)的上管上。

Image for post

The bike in this instance is a Specialized Stumpjumper 2017 XL 29” FSR Comp, and the phone is an iPhone X, running the SensorLog app to collect data (see below for more setup details).

本例中的自行车是Specialized Stumpjumper 2017 XL 29英寸FSR Comp ,手机是iPhone X,运行SensorLog应用来收集数据(有关更多设置详细信息,请参见下文)。

制作自行车训练日记 (Building a Wheelie Training Diary)

Goals are wheelie helpful for directing effort. My wheelie goals are directing what I build in the Training Diary, but I’m also discovering interesting things along the way, when I visualise the data and when I share it with others.

目标对促进努力很有帮助。 我的特技目标是指导我在“培训日记”中建立的内容,但是当我可视化数据以及与他人共享数据时,我还会发现有趣的事情。

What do I want to achieve in lockdown? Two things related to wheelies:

我想在锁定中实现什么? 与特技有关的两件事:

  1. My longest wheelie exceeds 8 seconds — this benchmark was set based on a friend whose mountain biking in general sets the standard for me, although they have now recorded +11s!

    我最长的自行车节拍超过8秒-这个基准是根据一位朋友设定的,尽管他的山地自行车现在为我记录了11秒,但他通常为我设定了标准!
  2. I can reliably wheelie for 4 seconds — this seems like a reasonable measure of consistency given 8 second target for longest wheelie

    我可以可靠地进行4秒钟的自行车特技训练-鉴于最长的自行车特技有8秒的目标,这似乎是合理的一致性度量

After processing session data from the phone, I have a list of every wheelie, with its duration, and a link back to the source for extracting further information, like location, speed, etc.

处理完电话中的会话数据后,我得到了每个自行车的清单及其持续时间,并有一个指向源的链接以提取更多信息,例如位置,速度等。

With these goals in mind and the available data, I’ve built a diary comprising:

考虑到这些目标和可用数据,我编写了一个日记,其中包括:

  • Summaries of results and effort

    结果和努力总结
  • Details of improvement over time

    随着时间的推移改进的细节
  • Play-by-play replays

    逐次播放重播

总结 (Summaries)

The measures for tracking my key goals are:

跟踪我的主要目标的措施是:

  1. Maximum wheelie duration, for the longest wheelie target

    最大的单车持续时间,用于最长的单车目标
  2. Median wheelie duration, for the consistency target

    中性单车持续时间,用于一致性目标

I plot these by “Session”, which is any day with >0 wheelies.

我通过“会话”来绘制这些图,“会话”是有> 0轮的任何一天。

Chart of wheelie results per session

I’m also curious about distance, and I use it in the play-by-plays, so I include that too. By these measures, I feel like I’m on track to achieve my goal in a few weeks to months — great! I don’t know if I’m a fast or slow learner though; 1,331 wheelies seems like a lot…

我也对距离感到好奇,我在逐场比赛中使用它,所以我也将其包括在内。 通过这些措施,我感觉自己有望在几周到几个月内实现自己的目标-太好了! 我不知道我是快还是慢。 1,331轮车似乎很多…

Sharing this project with colleagues, a self-professed sports data nerd asked to see the cumulative effort over time, as they understood skills development was often a matter of time, as well as effort. So I added cumulative effort over time…

一个自称运动数据的书呆子与同事共享这个项目,要求查看一段时间内的累积工作量,因为他们了解技能开发通常既是时间又是工作量。 所以我随时间增加了累积的努力…

Charts of effort analysis

… and a breakdown of effort per session. This made me more comfortable reducing the intensity of sessions, as a result, and I think, improved the quality of wheelies.

…以及每节工作的细目分类。 这让我更加自在地减少了强度,因此,我认为可以提高自行车的质量。

随着时间的推移改进 (Improvement Over Time)

The summaries in their current form show improvement over time, but I also wanted to get different and finer-grained views of improvement over time. For this, I’ve found plotting and comparing the distributions of wheelie durations in each session to be really helpful. I can gradually see the distribution moving right, even when I don’t set a new longest duration.

当前形式的摘要显示了随着时间的推移而有所改进,但是我还希望获得随着时间的推移而出现的不同且细粒度的改进意见。 为此,我发现绘制和比较每个会话中的自行车前轮持续时间的分布确实很有帮助。 即使没有设置新的最长持续时间,我也可以逐渐看到分布向右移动。

Charts of wheelie distributions

Visualising the change is great, and it gives insight into how to quantify change. When another colleague asked for video evidence of the wheelies (a perfectly reasonable request, now supplied above), I wondered to myself how I’d go about synthesising this data. Given the “data doping” issues on Zwift, I also thought about how I’d prove the synthesised data was me. Difficult, given that I want to be unrecognisable from the rider I was.

可视化更改非常棒,并且可以深入了解如何量化更改。 当另一位同事要求提供带轮的视频证据(一个完全合理的要求,现在上面已提供)时,我对自己想知道如何合成这些数据。 考虑到Zwift上的“数据掺杂”问题 ,我还考虑了如何证明综合数据就是我。 很难,因为我想被车手认出来。

Any session recognisable as “me” should statistically come from “my” underlying duration distribution. But I don’t know what this is, and it’s changing — by design — as I improve. So now I’m quantifying change with a statistical technique called a two-sample Kolmogorov-Smirnov test, which tells us whether two samples were likely drawn from the same underlying distribution, or not. I want to know when I’ve improved enough from one session to the next that I look like a different rider to the KS test! So here I compare every pair of sessions in a matrix.

在统计上,任何可识别为“我”的会话都应来自“我的”基础持续时间分布。 但是我不知道这是什么,随着我的改进,它正在发生改变(通过设计)。 因此,现在我用一种称为两样本Kolmogorov-Smirnov检验的统计技术来量化变化,它告诉我们两个样本是否可能来自相同的基础分布。 我想知道我何时从一个阶段到下一个阶段都有足够的进步,以至于我看起来像是与KS测试不同的骑手! 所以在这里,我比较矩阵中的每对会话。

Comparisons of similarity of different sessions

If I change sufficiently every session, this matrix should be a diagonal line. If I don’t change at all, it will be a full square. It’s nice to see that, in my latest session, I am a different rider to every other session except my second-latest session. This contrasts with the extended period in the middle where, while the key metrics were going up, I wasn’t looking like a different rider. I’m still trying to find the best way to visualise this to tell the story…

如果我每次会话都进行足够的更改,则此矩阵应为对角线。 如果我完全不更改,那将是一个完整的正方形。 很高兴看到,在我最近的一堂课中,除了第二场最新的课外,我和其他每届都有不同的骑手。 这与中间阶段的延长形成鲜明对比,在中间阶段,虽然关键指标有所提高,但我看起来并没有像其他骑手那样。 我仍在寻找可视化的最佳方式来讲述故事……

Multiple views of comparing sessions

播放游戏 (Play-by-Play)

We all love reliving the highlights, and highlights don’t come better than wheelie highlights. For play-by-play review, it’s back to the time series data linked to each wheelie event.

我们都喜欢重新选择高光,并且高光不会比带轮高光更好。 对于逐次播放查看,它返回到链接到每个自行车事件的时间序列数据。

Right now, I trace the pitch (rotation upwards of the front of the bike) against distance covered, with some visualisation of how steady I am using variation in the roll of the device. But in future, I’d also like to add more data visuals to these, like video, or location, speed, etc, to share as little wheelie postcards.

现在,我跟踪了俯仰(自行车前部向上旋转)相对于所覆盖距离的变化,并直观地看到了我使用设备滚动变化的稳定性。 但将来,我也想向其中添加更多数据视觉效果,例如视频或位置,速度等,以共享尽可能少的带轮明信片。

Here’s my longest wheelie so far, at 5.8 s and 22.4 m.

这是我迄今为止最长的自行车,分别为5.8 s和22.4 m。

Trace of wheelie motion

And here’s a gallery of top wheelies by duration — look at all those different shapes! — prompting the next round of quantifying improvement…

这里是按时长分类的顶级轮车画廊-看看所有这些不同的形状! -推动下一轮量化改进…

Many wheelie motion traces

数据收集和提取事件 (Data Collection and Extracting Events)

The Training Diary is built on top of a data processing pipeline. Here are some details of how that’s set up.

培训日记建立在数据处理管道的顶部。 以下是有关如何设置的一些详细信息。

In addition to the hardware above, the software comprises:

除上述硬件外,该软件还包括:

  • SensorLog app for iOS (or consider AndroSensor for Android)

    适用于iOS的SensorLog应用程序(或考虑使用适用于Android的AndroSensor)

  • Google Drive account and app installed on the phone, for transferring data

    手机上安装的Google云端硬盘帐户和应用,用于传输数据
  • Colaboratory (cloud-hosted Python notebook environment based on Jupyter), for processing sensor data and extracting events

    协作 (基于Jupyter的云托管Python笔记本环境),用于处理传感器数据并提取事件

More configuration details are provided in the wheelies resources README.

Wheelies资源README中提供了更多配置详细信息。

The data coming out of the sensor rig is in time series format. For each time that the phone’s sensors were sampled, we have a reading for each of the enabled sensors, as below:

来自传感器装置的数据为时间序列格式。 每次对手机的传感器进行采样时,我们都会读取每个启用的传感器的读数,如下所示:

Table of time series sensor data

As the bike rotates upwards into a wheelie, the motionPitch value increases. When it exceeds 0.88 radians, we determine that a wheelie is occurring.

当自行车向上旋转成带轮自行车时, motionPitch值会增加。 当其超过0.88弧度时,我们确定发生了车轮事故。

def wheel_up(pitch):  return pitch > 0.88

So in this way we convert a continuous sensor value to a binary true/false label that conveys meaning (and add column wheel_up to the dataframe). Note from the plot below, there is occasional drift in the pitch value unrelated to wheelies (I think when I sharply changed direction 180 degrees), so the labelling is not perfect — it may pick up the occasional false positive — but it’s good enough for now, and I’ll discuss in future how it might be improved.

因此,通过这种方式,我们将连续的传感器值转换为传达含义的二进制true / false标签(并在数据帧中添加wheel_up列)。 请注意,从下图中可以看出,俯仰值中偶尔会出现与飞轮无关的漂移(我认为当我将方向急剧改变180度时),因此标签并不完美-偶尔会出现误报-但对于现在,我将在以后讨论如何对其进行改进。

Image for post

With run-length encoding, using Python library python-rle, we can now transform the time series data into events, which tell us something meaningful, with some parameters, happened at some time. In this case, a wheelie of a certain duration and distance. The event links back to the time series source to support further analysis.

通过运行长度编码,使用Python库python-rle ,我们现在可以将时间序列数据转换为事件,这些事件告诉我们某些时间有意义的事情,并带有一些参数。 在这种情况下,具有一定持续时间和距离的自行车。 事件链接回到时间序列源以支持进一步分析。

Table of wheelie events

In preparing the event data, we do some further transformations on the source sensor data to:

在准备事件数据时,我们对源传感器数据进行了一些进一步的转换,以:

  • Fill missing source data related to location, using Pandas interpolate method

    使用熊猫插值方法填充与位置相关的缺失源数据

  • Converting GPS coordinates to distance with simple approximate formula

    使用简单的近似公式将GPS坐标转换为距离

I have shared a notebook for processing the uploaded time series sensor data and extracting events. This processed data feeds the training diary and can feed into further downstream analysis.

我共享了一个笔记本,用于处理上传的时间序列传感器数据和提取事件 。 这些处理后的数据将提供给培训日记,并可用于进一步的下游分析。

未来的计划 (Future Plans)

Of course I plan to use a proper phone mount, but there are many other directions to take this lockdown project.

当然,我计划使用合适的电话机座,但是还有许多其他指导来进行此锁定项目。

I’ll be focussing on adding machine learning in the next stage, to better detect wheelies with noisier data, different bikes, different sensor set-ups, etc, to identify success factors, and maybe to coach the rider. I anticipate trialling custom solutions and MLaaS. I feel that I have the foundations for a virtuous data generation and labelling system through this initial work.

我将在下一阶段集中精力添加机器学习,以更好地检测带有嘈杂数据,不同自行车,不同传感器设置等的自行车,以识别成功因素,并可能指导骑手。 我期望试用定制解决方案和MLaaS。 我觉得通过最初的工作,我为建立良好的数据生成和标记系统奠定了基础。

Other directions this could go:

其他可能的方向:

  • Automating more of the data processing pipeline, standardise the tooling

    自动化更多的数据处理管道,标准化工具
  • Extending and polishing dashboard functionality

    扩展和完善仪表板功能
  • Real time streaming for collection and sharing for distanced but social training

    实时流媒体以进行收集和共享,以进行远程但社交的培训
  • Client app development or custom hardware prototyping

    客户端应用程序开发或自定义硬件原型
  • Video capture and rider pose analysis as another data stream

    视频捕获和骑手姿势分析作为另一个数据流
  • Find another skill to improve with sensor data

    寻找另一项技能来改善传感器数据

Here’s hoping to be back soon with an ML-powered 8 second wheelie!

希望以机器学习动力的8秒自行车鞋很快回来!

Image for post

翻译自: https://medium.com/the-sports-scientist/the-lockdown-wheelie-project-9a9d8eedd42c

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/389239.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

api地理编码_通过地理编码API使您的数据更有意义

api地理编码Motivation动机 In my second semester of my Master’s degree, I was working on a dataset which had all the records of the road accident in Victoria, Australia (2013-19). I was very curious to know, which national highways are the most dangerous …

SiamBAN论文学习

SiameseBAN论文来源论文背景主要贡献论文分析网络框架创新点一:Box Adaptive Head创新点二:Ground-truth创新点三:Anchor Free论文流程训练部分:跟踪部分论文翻译Abstract1. Introduction2. Related Works2.1. Siamese Network Ba…

实现klib_使用klib加速数据清理和预处理

实现klibTL;DRThe klib package provides a number of very easily applicable functions with sensible default values that can be used on virtually any DataFrame to assess data quality, gain insight, perform cleaning operations and visualizations which results …

MMDetection修改代码无效

最近在打比赛,使用MMDetection框架,但是无论是Yolo修改类别还是更改head,代码运行后发现运行的是修改之前的代码。。。也就是说修改代码无效。。。 问题解决办法: MMDetection在首次运行后会把一部分运行核心放在anaconda的环境…

docker etcd

etcd是CoreOS团队于2013年6月发起的开源项目,它的目标是构建一个高可用的分布式键值(key-value)数据库,用于配置共享和服务发现 etcd内部采用raft协议作为一致性算法,etcd基于Go语言实现。 etcd作为服务发现系统,有以下的特点&…

SpringBoot简要

2019独角兽企业重金招聘Python工程师标准>>> 简化Spring应用开发的一个框架;      整个Spring技术栈的一个大整合;      J2EE开发的一站式解决方案;      自动配置:针对很多Spring应用程序常见的应用功能&…

简明易懂的c#入门指南_统计假设检验的简明指南

简明易懂的c#入门指南介绍 (Introduction) One of the main applications of frequentist statistics is the comparison of sample means and variances between one or more groups, known as statistical hypothesis testing. A statistic is a summarized/compressed proba…

Torch.distributed.elastic 关于 pytorch 不稳定

错误日志: Epoch: [229] Total time: 0:17:21 Test: [ 0/49] eta: 0:05:00 loss: 1.7994 (1.7994) acc1: 78.0822 (78.0822) acc5: 95.2055 (95.2055) time: 6.1368 data: 5.9411 max mem: 10624 WARNING:torch.distributed.elastic.agent.server.api:Rec…

0x22 迭代加深

poj2248 真是个新套路。还有套路剪枝...大到小和判重 #include<cstdio> #include<iostream> #include<cstring> #include<cstdlib> #include<algorithm> #include<cmath> #include<bitset> using namespace std;int n,D,x[110];bool…

云原生全球最大峰会之一KubeCon首登中国 Kubernetes将如何再演进?

雷锋网消息&#xff0c;11月14日&#xff0c;由CNCF发起的云原生领域全球最大的峰会之一KubeConCloudNativeCon首次登陆中国&#xff0c;中国已经成为云原生领域一股强大力量&#xff0c;并且还在不断成长。 毫无疑问&#xff0c;Kubernetes已经成为容器编排事实标准&#xff…

分布分析和分组分析_如何通过群组分析对用户进行分组并获得可行的见解

分布分析和分组分析数据分析 (DATA ANALYSIS) Being a regular at a restaurant is great.乙 eing定期在餐厅是伟大的。 When I started university, my dad told me I should find a restaurant I really liked and eat there every month with some friends. Becoming a reg…

python 工具箱_Python交易工具箱:通过指标子图增强图表

python 工具箱交易工具箱 (trading-toolbox) After a several months-long hiatus, I can finally resume posting to the Trading Toolbox Series. We started this series by learning how to plot indicators (specifically: moving averages) on the top of a price chart.…

PDA端的数据库一般采用的是sqlce数据库

PDA端的数据库一般采用的是sqlce数据库,这样与PC端的sql2000中的数据同步就变成了一个问题,如在PDA端处理,PDA端的内存,CPU等都是一个制约因素,其次他们的一个连接稳定及其间的数据传输也是一个难点.本例中通过在PC端的转化后再复制到PDA上面,这样,上面所有的问题都得到了一个有…

bzoj 1016 [JSOI2008]最小生成树计数——matrix tree(相同权值的边为阶段缩点)(码力)...

题目&#xff1a;https://www.lydsy.com/JudgeOnline/problem.php?id1016 就是缩点&#xff0c;每次相同权值的边构成的联通块求一下matrix tree。注意gauss里的编号应该是从1到...的连续的。 学习了一个TJ。用了vector。自己曾写过一个只能过样例的。都放上来吧。 路径压缩的…

商米

2019独角兽企业重金招聘Python工程师标准>>> 今天看了一下商米的官网&#xff0c;发现他家的东西还真的是不错。有钱了&#xff0c;想去体验一下。 如果我妹妹还有开便利店的话&#xff0c;我会推荐他用这个。小巧便捷&#xff0c;非常方便。 转载于:https://my.osc…

python交互式和文件式_使用Python创建和自动化交互式仪表盘

python交互式和文件式In this tutorial, I will be creating an automated, interactive dashboard of Texas COVID-19 case count by county using python with the help of selenium, pandas, dash, and plotly. I am assuming the reader has some familiarity with python,…

不可不说的Java“锁”事

2019独角兽企业重金招聘Python工程师标准>>> 前言 Java提供了种类丰富的锁&#xff0c;每种锁因其特性的不同&#xff0c;在适当的场景下能够展现出非常高的效率。本文旨在对锁相关源码&#xff08;本文中的源码来自JDK 8&#xff09;、使用场景进行举例&#xff0c…

数据可视化 信息可视化_可视化数据以帮助清理数据

数据可视化 信息可视化The role of a data scientists involves retrieving hidden relationships between massive amounts of structured or unstructured data in the aim to reach or adjust certain business criteria. In recent times this role’s importance has been…

seaborn添加数据标签_常见Seaborn图的数据标签快速指南

seaborn添加数据标签In the course of my data exploration adventures, I find myself looking at such plots (below), which is great for observing trend but it makes it difficult to make out where and what each data point is.在进行数据探索的过程中&#xff0c;我…

使用python pandas dataframe学习数据分析

⚠️ Note — This post is a part of Learning data analysis with python series. If you haven’t read the first post, some of the content won’t make sense. Check it out here.Note️ 注意 -这篇文章是使用python系列学习数据分析的一部分。 如果您还没有阅读第一篇文…