kNN from Scratch in Python

Some of my favorite homework assignments last year asked my class to do this: code algorithms from scratch. I remember spending the day before my wedding frantically coding a kNN alogrithm using the L-1 and L-2 norms so that I could turn around a rough draft to my partner. Before you ask, I didn’t plan on being in grad school during my wedding, it just sort of worked out that way.

Read More
Kate EytchisonComment
Card Shuffling in Python

After my husband had a particularly lucky run with a new deck earlier this year, we started talking about the rules of shuffling. We had both heard that 7 shuffles was the minimum amount of shuffles required to thoroughly shuffle a deck, but neither of us knew if this was a proven fact or an old wives tail.

We also argued about whether it was even possible to quantify a deck of shuffled cards. How do you define shuffledness and more importantly, how do you measure it?

Read More