I really like talking with AB about arithmetic and her strategies for doing problems.  All this Common Core stuff about breaking up into hundreds and tens and ones that people like to make fun of?  That’s how she does things.  She can describe her process a lot more articulately than most grownups can, because it’s less automatic for her.  I learn a lot about how to teach math by watching her learn math.

Orioles postmortem 2016

What is there to say?  Should Showalter have used Britton?  Probably.  When?  Probably when O’Day came in, when the Orioles desperately needed a double play to keep the game tied.  (But O’Day got the double play ball anyway.)  Barring that, you bring Britton in to start the 11th, I think, because Britton doesn’t give up home runs and you’ve got the home run guys coming up.  But what difference does it make?  The Orioles weren’t hitting, not off Liriano, not off anybody.  Jimenez would have been come in to pitch the 12th or 13th anyway.  The real mistake was pinch hitting Reimold for Kim.  Why?  Kim is the only guy on the team who gets on base.  Maybe he walks and Machado comes up and you have an actual chance.  Reimold is a bad defender, too; his misplay in the 11th, letting Devon Travis get to third, could have been decisive if Encarnacion had hit a single instead of a home run.

I said on Twitter it reminded me of the last game of the 1997 ALCS, but when I think it over, this one was a lot less heartbreaking.  In that game, Mike Mussina delivered one of the best Orioles playoff starts of my lifetime, and we wasted it.  Ten hits and five walks and we couldn’t push one run across.

And here’s the thing.  That 1997 team was the best Orioles squad in 15 years, and you had the real sense it was a one-shot deal.  The next year we were back to losing.  The 2016 team is probably the third-best in the last five years, and the main contributors will all be back next year.  It’s been a big adjustment, rooting for a team that’s consistently good, but my ability to absorb this loss makes me think it’s finally starting to sink in.


91 white friends

Just ran across this hunk of data journalism from the Washington Post:

In a 100-friend scenario, the average white person has 91 white friends; one each of black, Latino, Asian, mixed race, and other races; and three friends of unknown race. The average black person, on the other hand, has 83 black friends, eight white friends, two Latino friends, zero Asian friends, three mixed race friends, one other race friend and four friends of unknown race.

Going back to Chris Rock’s point, the average black person’s friend network is eight percent white, but the average white person’s network is only one percent black. To put it another way: Blacks have ten times as many black friends as white friends. But white Americans have an astonishing 91 times as many white friends as black friends.

100 friends and only one black person!  That’s pretty white!

It’s worth taking a look at the actual study they’re writing about.  They didn’t ask people to list their top 100 friends.  They said to list at most seven people, using this prompt:

From time to time, most people discuss important matters with other people. Looking back over the last six months – who are the people with whom you discussed matters important to you?

The white respondents only named 3.3 people on average, of whom 1.9 were immediate family members.  So a better headline wouldn’t be “75% of white people have no black friends,” but “75% of whites are married to another white person, have two white parents, and have a white best friend, if they have a best friend”  As for the quoted paragraph, it should read

In a 100-friend scenario, the average white person has 57 immediate family members.

Who knew?

(Note:  I just noticed that Emily Swanson at Huffington Post made this point much earlier.)







Portuguese vs. Portuguese

The Portuguese edition of “How Not To Be Wrong” just arrived at my house.  “Portuguese” as in “from Portugal” and as distinct from the Brazilian edition.  Interesting how two versions of the book in the same language can be rather different!  Here’s the opening paragraph in Portugal:

Agora mesmo, numa sala de aula algures no mundo, uma estudante esta a reclamar com o seu professor de matematica.  Este acabou de lhe pedir para usar uma parte substancial do seu fim de semana a calcular uma lista de trinta integrais definidas.

And in Brazil:

Neste exato momento, numa sala de aula em algum lugar do mundo, uma aluna esta xingando o professor de matematica.  O professor acaba de lhe pedir que passe uma parte substancial de seu fim de semana calculando uma lista de trinta integrais definidas.

Ok, those are not too far off.  Here’s how some lines of John Ashbery’s “Soonest Mended” are translated in Portugal:

E vimos que ambos temos razao, ainda que nada

Tenha resultado em coisa alguma; os avatares

Do nosso conformismo perante as regros,

E ficar sempre por casa, fizeram de nos — bem, en certo sentido — <<bons cidadaos>>

and in Brazil:

Esta vendo, ambos estavamos certos, embora nada

Tenha de algum modo chegado a nada; os avatares

Da nossa comformidade com regras e viver

Em torno de casa fizeram de nos … bem, num sentido, “bons cidadaos”

I don’t know whether Ashbery’s poems have official Portuguese translations.  The only one I could find of “Soonest Mended” was in a book of criticism by V.B. Concagh, where the last two lines were rendered

Deste conformarmo-nos as regras e fazermos a nossa vida

Ca por casa fizeram de nos — bem, num certo sentido, “bons cidadaos”

The line I hit very hard in English is  “For this is action, this not being sure.”  That last phrase is rendered

  • (Portugal) esta incerteza
  • (Brazil) essa falta de certeza
  • (Concagh) este nao esta seguro

I don’t read Portuguese but the last, most literal rendering seems best to me, assuming I’m right that it captures something of the “not the way you’d normally say it”-ness of the Ashbery:  “this uncertainty” or “this lack of certainty” in English don’t have at all the same quality.

Note:  Because I was feeling lazy I have omitted all diacritical marks.  Lusophones are welcome to hassle me about this if it makes the quotes ambiguous or unreadable.


Tagged , , ,

Such shall not become the degradation of Wisconsin

I’ve lived in Wisconsin for more than a decade and had never heard of Joshua Glover.  That’s not as it should be!

Glover was a slave who escaped Missouri in 1852 and settled in Racine, a free man.  He found a job and settled down into a new life.  Two years later, his old master found out where he was, and, licensed by the Fugitive Slave Act, came north to claim his property.  The U.S. marshals seized Glover and locked him in the Milwaukee courthouse. (Cathedral Square Park is where that courthouse stood.)   A Wisconsin court issued a writ holding the Fugitive Slave Law unconstitutional, and demanding that Glover be given a trial, but the federal officers refused to comply.  So Sherman Booth, an abolitionist newspaperman from Waukesha, gathered a mob and broke Glover out.  Eventually he made it to Canada via the Underground Railroad.

Booth spent years tangled in court, thanks to his role in the prison break.  Wisconsin, thrilled by its defiance of the hated law, bloomed with abolitionist fervency.  Judge Abram Daniel Smith declared that Wisconsin, a sovereign state, would never accept federal interference within its borders:

“They will never consent that a slave-owner, his agent, or an officer of the United States, armed with process to arrest a fugitive from service, is clothed with entire immunity from state authority; to commit whatever crime or outrage against the laws of the state; that their own high prerogative writ of habeas corpus shall be annulled, their authority defied, their officers resisted, the process of their own courts contemned, their territory invaded by federal force, the houses of their citizens searched, the sanctuary or their homes invaded, their streets and public places made the scenes of tumultuous and armed violence, and state sovereignty succumb–paralyzed and aghast–before the process of an officer unknown to the constitution and irresponsible to its sanctions. At least, such shall not become the degradation of Wisconsin, without meeting as stern remonstrance and resistance as I may be able to interpose, so long as her people impose upon me the duty of guarding their rights and liberties, and maintaining the dignity and sovereignty of their state.”

The sentiment, of course, was not so different from that the Southern states would use a few years later to justify their right to buy and sell human beings.  By the end of the 1850s, Wisconsin’s governor Alexander Randall would threaten to secede from the Union should slavery not be abolished.

When Booth was arrested by federal marshals in 1860, state assemblyman Benjamin Hunkins of New Berlin went even further, introducing a bill declaring war on the United States in protest.  The speaker of the assembly declared the bill unconstitutional and no vote was taken.  (This was actually the second time Hunkins tried to declare war on the federal government; as a member of the Wisconsin territorial assembly in 1844, he became so outraged over the awarding of the Upper Peninsula to Michigan that he introduced an amendment declaring war on Great Britain, Illinois, Michigan, and the United States!)

Milwaukee has both a Booth Street and a Glover Avenue; and they cross.

Madison has a Randall Street (and a Randall School, and Camp Randall Stadium) but no Glover Street and no Booth Street.  Should it?






Tagged , , , , , ,

Kevin Jamieson, hyperparameter optimization, playoffs

Kevin Jamieson gave a great seminar here on Hyperband, his algorithm for hyperparameter optimization.

Here’s the idea.  Doing machine learning involves making a lot of choices.  You set up your deep learning neural thingamajig but that’s not exactly one size fits all:  How many layers do you want in your net?  How fast do you want your gradient descents to step?  And etc. and etc.  The parameters are the structures your thingamajig learns.  The hyperparameters are the decisions you make about your thingamajig before you start learning.  And it turns out these decisions can actually affect performance a lot.  So how do you know how to make them?

Well, one option is to pick N choices of hyperparameters at random, run your algorithm on your test set with each choice, and see how you do.  The problem is, thingamajigs take a long time to converge.  This is expensive to do, and when N is small, you’re not really seeing very much of hyperparameter space (which might have dozens of dimensions.)

A more popular choice is to place some prior on the function

F:[hyperparameter space] -> [performance on test set]

You make a choice of hyperparameters, you run the thingamajig, based on the output you update your distribution on F, based on your new distribution you choose a likely-to-be-informative hyperparameter and run again, etc.

This is called “Bayesian optimization of hyperparameters” — it works pretty well — but really only about as well as taking twice as many random choices of hyperparameters, in practice.  A 2x speedup is nothing to sneeze at, but it still means you can’t get N large enough to search much of the space.

Kevin thinks you should think of this as a multi-armed bandit problem.  You have a hyperparameter whose performance you’d like to judge.  You could run your thingamajig with those parameters until it seems to be converging, and see how well it does.  But that’s expensive.  Alternatively, you could run your thingamajig (1/c) times as long; then you have time to consider Nc values of the hyperparameters, much better.  But of course you have a much less accurate assessment of the performance:  maybe the best performer in that first (1/c) time segment is actually pretty bad, and just got off to a good start!

So you do this instead.  Run the thingamajig for time (1/c) on Nc values.  That costs you N.  Then throw out all values of the hyperparameters that came in below median on performance.  You still have (1/2)Nc values left, so continue running those processes for another time (1/c).  That costs you (1/2)N.  Throw out everything below the median.  And so on.  When you get to the end you’ve spent N log Nc, not bad at all but instead of looking at only N hyperparameters, you’ve looked at Nc, where c might be pretty big.  And you haven’t wasted lots of processor time following unpromising choices all the way to the end; rather, you’ve mercilessly culled the low performers along the way.

But how do you choose c?  I insisted to Kevin that he call c a hyperhyperparameter but he wasn’t into it.  No fun!  Maybe the reason Kevin resisted my choice is that he doesn’t actually choose c; he just carries out his procedure once for each c as c ranges over 1,2,4,8,…. N; this costs you only another log N.

In practice, this seems to find hyperparameters just as well as more fancy Bayesian methods, and much faster.  Very cool!  You can imagine doing the same things in simpler situations (e.g. I want to do a gradient descent, where should I start?) and Kevin says this works too.

In some sense this is how a single-elimination tournament works!  In the NCAA men’s basketball finals, 64 teams each play a game; the teams above the median are 1-0, while the teams below the median, at 0-1, get cut.  Then the 1-0 teams each play one more game:  the teams above the median at 2-0 stay, the teams below the median at 1-1 get cut.

What if the regular season worked like this?  Like if in June, the bottom half of major league baseball just stopped playing, and the remaining 15 teams duked it out until August, then down to 8… It would be impossible to schedule, of course.  But in a way we have some form of it:  at the July 31 trade deadline, teams sufficiently far out of the running can just give up on the season and trade their best players for contending teams’ prospects.  Of course the bad teams keep playing games, but in some sense, the competition has narrowed to a smaller field.




Tagged , , , , ,

Roger Ailes, man of not many voices

From Janet Maslin’s review of Gabriel Sherman’s book about Roger Ailes:

Among those who did speak on the record to Mr. Sherman is Stephanie Gordon, an actress who in one part of that show dropped the towel she wore. She was asked by Mr. Ailes to come to his office for a Sunday photo session and felt extremely uncomfortable about having to do this for the producer. But she says Mr. Ailes could not have been nicer. He took pictures and later sent her a signed print inscribed: “Don’t throw in the towel, you’re a great actress. Roger Ailes.” But Mr. Sherman also has a story from a woman named Randi Harrison, also on the record, who claims Mr. Ailes offered her a $400-a-week job at NBC, saying: ‘If you agree to have sex with me whenever I want, I will add an extra hundred dollars a week.”

These don’t sound like the voices of the same man.

I think they totally sound like the voices of the same man.  It’s not like someone who sexually harasses one woman can be counted on to sexually harass every single woman within arm’s reach.  Bank robbers don’t rob every single bank!  “Why, I saw that man walk by a bank just the other day without robbing it — the person who told you he was a bank robber must just have been misinterpreting.  Probably he was just making a withdrawal and the teller took it the wrong way.”

And what’s more:  don’t you think Ailes kind of could have been nicer to Gordon?  Like, a lot nicer?  Look at that exchange again.  He put her in a position where she felt extremely uncomfortable, and declined to sexually assault her on that occasion.  Then he sent her a signed print, on which he wrote a message reminding her that he’d seen her naked body.

I think both these stories depict a man who sees women as existing mainly for his enjoyment, and a man who takes special pleasure in letting women know he sees them that way.  One man, one voice.


Tagged , ,

Are the 2016 Orioles the slowest team in baseball history?

The Orioles are last in the AL in stolen bases, with 17.  They also have the fewest times caught stealing, with 11; they’re so slow they’re not even trying to run.

But here’s the thing that really jumps out at you.  With just 17 games to play, the Orioles have 6 triples on the season.  And this is a team with power, a team that hits the ball to the deep outfield a lot.  Six triples.  You know what the record is for the fewest triples ever recorded by a team?  11.  By the 1998 Orioles.  This year’s team is like the 1998 squad without the speed machine that was 34-year-old Brady Anderson.   They are going to set a fewest-triples record that may never be broken.


Show report: Xenia Rubinos at the Frequency

Xenia Rubinos is a — ok, what is she?  A singer-songwriter-yeller-wreaker-of-havoc who plays an avant-garde version of R&B with a lot of loud, hectic guitar in it.  I’ve been pronouncing her name “Zenya” but she says “Senia.”  She played to about 100 people at the Frequency last Thursday.  She seems to belong in a much bigger place in front of a much bigger crowd, so much so that it feels a little weird to be right there next to her as she does her frankly pretty amazing thing.  Here’s “Cherry Tree,” from her 2013 debut, still her best song by my lights.  It would be most people’s best song.

This, live, was pretty close to the record.  Other songs weren’t.  Live, I thought she and her band sometimes sounded like Fiery Furnaces, which doesn’t come through on the records.  “Pan Y Cafe”, a fun romp on the album

is much more aggro live.  It’s kind of what the Pixies “Spanish songs” would be like if somebody who actually spoke Spanish wrote them.  (She likes the Pixies.)

Maybe I should make a post about the greatest shows I’ve seen in Madison.  This was one of them.  Who else?  Man Man in 2007.  The Breeders in 2009.  Fatty Acids / Sat Nite Duets in 2012.  I’ll have to think about this more thoroughly.


Tagged ,

Orioles 1, Red Sox 0

Was this it?  The game of the year, the game we’ll remember?  Gausman v. Porcello, both starters going 8 innings.  Gausman didn’t allow a run, Porcello just one, a home run to Mark Trumbo (of course, Trumbo).  Adam Jones got all of a Porcello pitch in the 3rd that looked to clear the Green Monster with yards to spare, but a brutal inbound wind knocked it out of the sky like a snipe.  Gausman hit 96 on his 109th pitch.  Jonathan Schoop backhanded a tough chance that took a weird hop and rolled partway up his wrist, and still managed to somehow flip the ball into his hand, like David Bowie in Labyrinth, and get the runner at first.  Schoop has the sweetest little “I made the play” smile in baseball, I think.  Manny Machado tagged up from first on a very deep fly by Chris Davis; Mookie Betts’s astonishingly throw got to second base with Machado no more than 2/3 of the way there.  He almost seemed to laugh at how out he was.  Zach Britton (of course, Britton) came in for the bottom of the 9th.  Battled with David Ortiz for 8 pitches, finally getting him to ground out to Chris Davis, who raced Ortiz, slow man versus slower man, to the bag.  Slow man won.  With two outs, Britton faced Hanley Ramirez, who swung three times, each time at a pitch farther removed from his person.  Orioles 1, Red Sox 0.  Nothing but must-win series from here onwards.

%d bloggers like this: