Monthly Archives: March 2019

Double check your work (Kaggle Women’s NCAA tournament 2019)

I’m writing about an attention-to-detail error immediately after realizing it.  It probably won’t matter, but if it ends up costing me a thousands-of-dollars prize, I’ll feel salty.  I thought I’d grouse in advance just in case.

The last few years I’ve entered Kaggle’s March Madness data science prediction contests.  I had a good handle on the women’s tournament last year, finishing in the top 10%.  But my prior data source – which I felt set me apart, as I scraped it myself – wasn’t available this year.  So, living my open-source values, I made a quick submission by forking a repo that a past winner shared on Kaggle and adding some noise.

Now, to win these contests – with a $25k prize purse – you need to make some bets, coding individual games as 1 or 0 to indicate 100% confidence that a team will win.  If you get it right, your prediction is perfect, generating no penalty (“log-loss”).  Get it completely wrong and the scoring rule generates a near-infinite penalty for the magnitude of your mistake – your entry is toast.

You can make two submissions, so I entered one with plain predictions – “vanilla” – and one where I spiced it up with a few hard-coded bets.  In my augmented Women’s tournament entry, I wagered that Michigan, Michigan State, and Buffalo would each win their first round games.  The odds of all three winning was was only about 10%, but if it happened, I thought that might be enough for me to finish in the money.

Michigan and Buffalo both won today!  And yet I found myself in the middle of the leaderboard.  I had a sinking feeling.  And indeed, Kaggle showed the same log-loss score for both entries, and I was horrified when I confirmed:

A comparison of my vanilla and spiced-up predictions
These should not be identical.

In case Michigan State wins tomorrow and this error ends up costing me a thousand bucks in early April, the commit in question will be my proof that I had a winning ticket and blew it.

Comment if you see the simple mistake that did me in:

Where is an AI code reviewer to suggest this doesn’t do what I thought it did?

As of this writing – 9 games in – I’m in 294th place out of 505 with a log-loss of 0.35880.  With the predictions above, I’d be in 15th place with a log-loss of 0.1953801, and ready to benefit further from my MSU prediction tomorrow.

The lesson is obvious: check my work!  I consider myself to be strong in that regard which makes this especially painful.  I could have looked closely at my code, sure, but the fundamental check would have been to plot the two prediction sets against each other.

That lesson stands, even if the Michigan State women fall tomorrow and render my daring entry, and this post, irrelevant.  I’m not sure I’ll make time for entering these competitions next year; this would be a sour note to end on.

Open letter to Ann Arbor city council ahead of climate funding vote

Tonight, March 4th 2019, Ann Arbor City Council will be discussing a resolution sponsored by Councilmember Jane Lumm to divert funding away from fighting climate change.  The city had planned to use almost $1 million/year to fund its Climate Action Plan.

Here’s what I wrote to my council members (Ali Ramlawi and Chip Smith) as well as Mayor Taylor and the rest of council.

————–

Dear Ali, Chip, and other councilmembers –

I hope this finds you well.

I’ll be candid with you: some days, I’m terrified of climate change. In the abstract, I’m worried about the most vulnerable, say, the many millions in Bangladesh who will flee their homes by 2050 as the seas rise. But what terrifies me, what I think about when I pace with my youngest son in the middle of the night, is what could happen here in Ann Arbor, to my family.

Science is clear: if we don’t make radical changes, at all levels, climate change will destabilize the planet. Ann Arbor may be one of the last places to be affected, but in a worst-case scenario, a collapse of global civilization would spare no one. What happens if food and goods stop arriving? If power goes down, if medical supplies are gone, if we descend into dystopia? Our society is too complex to be unwound back to pre-industrial times.

But I try not to dwell on that possibility. Both because it’s unproductive – even paralyzing – and because that dystopian future isn’t written yet.

On my more optimistic days, I feel lucky to be alive now, at the time of reckoning. We are privileged to be the ones at the wheel as the bus hurtles toward the cliff. And a low-carbon world doesn’t mean austerity – it could be even more beautiful than what we have now, if we get their on our own terms.

To take the path toward paradise, or even survival, we must act on all levels. We must cut carbon emissions in half by 2030*. Of course, federal and state governments must lead on massive tasks like the switch to renewable energy, and individual actions will add up. But cities play a critical role, too. You are best positioned to lead us toward fulfilling the goals of our Climate Action Plan, and you can pull on levers like housing, zoning, construction code, parking, and more. Climate change touches, and is touched by, everything.

In the scale of what action is needed, tonight’s funding vote – 880k/year? – is just a tiny step. While I ask you to vote tonight to preserve the climate change funding, my real ask is that you dive into the fight for the survival of humanity, of other species, and of our families, in the months and years to come. It may be humanity’s most important decade as we turn the ship of civilization around toward the light. With our values, skills, and resources, Ann Arbor is one of the best-positioned communities in the world to lead the way.

If you’re not sure where to start when it comes to facing the climate crisis – or if you think I’m wrong, and immediate city-level action isn’t crucial to preserving humanity’s future – I’d love to meet for a cup of coffee to discuss. My kids are counting on you. Here’s to a thriving Ann Arbor, and Planet Earth, in 2100!

In hope,

Sam

* – In private: I’m not confident we’ll hit this 2030 target.  But we must try, as even if we miss, it matters how close we come.  As David Wallace-Wells writes to start this article, “It’s not too late.  In fact, it never will be … This a problem that gets worse over time the longer we produce greenhouse gas, and can be made better if we choose to stop. Which means that no matter how hot it gets, no matter how fully climate change transforms the planet and the way we live on it, it will always be the case that the next decade could contain more warming, and more suffering, or less warming and less suffering. Just how much is up to us, and always will be.”