Posts

numerical testing of maximal power curve algorithm with variable activity expiration time

Image
Two posts back I proposed an algorithm for calculating maximal power data with a variable expiration date. For each duration, instead of retaining a single power point, I retain a list of power points where each retained point is the highest power for points of that age or newer. So going back in time for a given duration, the points are increasing power order as well as increasing age order. If my most recent effort was my highest power effort, then I have only one point in the list. In the opposite extreme, if my power decreases every activity going forward in time, I would have every activity in the list. But obviously that would be exceptional. Far more commonly powers at a given duration are sometimes higher, sometimes lower, so the number of retained points will be between the two extremes. Uploading activities to Strava on a near daily basis, it is not unusual for a user to have 1000 activities or more. So ideally this list needs to retain only a small fraction of the to...

post count through end of April

Image
At the end of 2012, I extrapolated a future schedule of blog posting which would gradually reduce the posting rate . This made sense, as I would have fewer subjects to write about, and I'd move on to spending more time doing other things. Then, at the end of 2013, I failed to follow this decreasing trajectory . It was a strong year, tied for the second most ever. Now this year I've had four consecutive months of at least 20 posts. Prior to 2014, I'd done that only 3 times. As a result, this year has been my greatest posting rate ever for the first 1/3rd of the year: This is obviously unsustainable, and frankly, slightly disturbing. But I supposed it's a positive thing that I keep getting ideas to post here.

algorithm for variable-lifetime maximal power curve derivation

The traditional problem with maximal power curves is they may contain rides so old that the power generated in those rides has little relevance to the present. So it's useful to truncate the data: to set an age limit for points used. But there may be a considerable data set to process for this purpose. Calculating a maximal power curve from scratch makes little sense. When calculating a curve from an entire data set, you start at the oldest activity, calculate the maximal powers for each duration for that set, then that's it. For each additional activity you compare the average power for each duration, extending the existing maximal power curve to longer durations if needed (constant work), then adding in points from the newert activity (extending that if needed). But with an adjustable age limit, it gets more complicated. Instead I need to retain, for each duration, all points which are the maximum power for their age or less. These numbers can be saved, for example, as a...

Maximal Power curves: thoughts on deweighting, depreciating, or retiring old data and the "do no harm" principle

Back in January and February I had a series of posts here on fitting maximal power curves using a heuristic model and a weighted nonlinear least-squares fitting procedure to fit to do an envelope fit, the curve passing through a series of "quality" power points rather than passing through the middle of points. The argument was that we don't produce our best possible power for all durations, but rather typically for a few durations, and so to predict what our maximal power is for a given duration, we need to interpolate or extrapolate based on the durations for which our efforts represented the best we could do. The weighting scheme was to assign a high weight (for example, 10 thousand) to errors of points falling above the modeled curve, and a lower weight (1) to points falling below the curve. This caused the curve, after an appriate number of iterations, to float to the top of the data point cloud, where it would essentially balance on the points consistent with the...

Dan Martin's crash in Liege-Bastogne-Liege

Image
Yesterday, full of self-loathing, I sat addicted to my laptop watching the final 45 km of Liege-Bastogne-Liege. I can't help it. I'm addicted. But the spring classics are done now, right? I'm free, right? I'll be able to resist the daily lure of the Giro, right? Sigh. But it was an exciting finish. Caruso and Pozzovivo got a gap which looked like it might just hold... then Daniel Martin of Garmin-Sharp, last year's winner, bridged up, passing the weaker Pozzovivo and just about reaching Caruso. One more corner, then 300 meters to the repeat victory... But amazingly, he crashed in the corner. Jonathan Vaughters, his manager, reacted: Heartbreak. — Jonathan Vaughters (@Vaughters) April 27, 2014 Here's the video on YouTube . As reported by CyclingNews , Daniel's post-race comments were: “It’s one thing to make a mistake or know what you’ve done but we figure that there’s a patch of oil or something. I think I had tears in my eyes before I even h...

testing speed limit algorithm with real data

Image
In previous post I proposed an algorithm for automated detection of speed limit violations from GPS data . Then in a later post I tested this on simulated data . Here I apply it to data which was collected by someone else during a short drive in San Francisco. I've a general 40 kph speed limit within the city (also previously here ), except on the interstate highways. This car trip didn't include any interstate highways, so it will be interesting to see how it would do with such a restriction. Here's the speed versus time. As you can see, it was a short trip, only around 8 minutes: It's mostly slow going, except for one stretch on Bayshore Boulevard, which is faster. That portion is generally 50 to 65 kph, Sure enough, this triggers the algorithm as speeding for a 40 kph limit. I assign a fine in dollars equal to the excess distance ahead of a "pace car" beyond the 50 meters allowed by the algorithm, at a ratio of one dollar per 100 meters. So if...

San Francisco anti-smoking law and sidewalks

Waiting in line last night on the sidewalk for the Bicycle Film Festival , people tightly packed along the building waiting for the doors to open, a chatty fellow behind me lit up a cigarette. Cigarette smoke is something I'm rarely exposed to for more than a few seconds, and despite the steady wind, the smell of the fumes was physically sickening, not to menton a tangible health risk. In fact, just typing this the next morning reminds me of the queasy feeling in my stomach as I tried my best to maximize my distance from him without losing my place in my line. What to do? Politely ask him, as a favor, to stop? Inform him that such behavior isn't acceptable (that option probably doesn't work so well, in my experience). I probably should have done the former. But instead I waited it out, resolute that if he tried another, I'd speak up. Fortunately one was enough for him. San Francisco likes to vigorously pat itself on the back for being anti-smoking, and indeed i...