Optimization for real-world data.<div><br></div><div>Morse code is a good one; which leads to the entropy of real-world English letters: how probable are the letters A, E, and Z? How probable is the 3-gram of letters 'AEZ'? A well-balanced tree could take this knowledge into account and sparsely add 'nodes' without needing to rebalance as often.</div><div><br></div><div>Pairtree with hashes is an interesting real-world problem. Filesystems have a max number of file entries per directory. A good cryptographic hash has equal probabilities of e.g. hexadecimal character occurrence for each digit: each digit character has an equal probability of following any other digit.</div><div><br></div><div>Shannon used these probabilities for something; I can't remember what it was?</div><div><br></div><div>One (TED-Ed) YouTube video I found mentioned sorting library books; what's the fastest way?</div><div><br></div><div>Sorting is not strictly necessary for top-k N-dimensional optimization: tracking high and low points doesn't require sorting the whole (then ordered or partially ordered) set.</div><div><br></div><div>Here's an example from <a href="https://wrdrd.github.io/docs/consulting/data-science#optimization" target="_blank">https://wrdrd.github.io/docs/<wbr>consulting/data-science#<wbr>optimization</a> :</div><div><br></div><div><div>Optimization⬅</div><div><a href="https://en.wikipedia.org/wiki/Mathematical_optimization" target="_blank">https://en.wikipedia.org/wiki/<wbr>Mathematical_optimization</a></div><div><br></div><div>Find local and global optima (maxima and minima) within an n-dimensional field which may be limited by resource constraints.</div><div><br></div><div># Global optima of a 1-dimensional list</div><div>points = [10, 20, 100, 20, 10]</div><div>global_max, global_min = max(points), min(points)</div><div>assert global_max == 100</div><div>assert global_min == 10</div><div><br></div><div># Local optima of a 1-dimensional list</div><div>sample = points[:1]</div><div>local_max, local_min = max(sample), min(sample)</div><div>assert local_max == 20</div><div>assert local_min == 10</div><div><br></div><div># A 2-dimensional list ...</div><div>points = [(-0.5, 0),</div><div> (0, 0.5),</div><div> (0.5, 0),</div><div> (0, -0.5)]</div><div><br></div><div><a href="https://en.wikipedia.org/wiki/Optimization_(disambiguation)" target="_blank">https://en.wikipedia.org/wiki/<wbr>Optimization_(disambiguation)</a></div><div><a href="https://en.wikipedia.org/wiki/Metaheuristic" target="_blank">https://en.wikipedia.org/wiki/<wbr>Metaheuristic</a></div><div><a href="https://en.wikipedia.org/wiki/Receiver_operating_characteristic" target="_blank">https://en.wikipedia.org/wiki/<wbr>Receiver_operating_<wbr>characteristic</a></div><div><a href="http://rayli.net/blog/data/top-10-data-mining-algorithms-in-plain-english/" target="_blank">http://rayli.net/blog/data/<wbr>top-10-data-mining-algorithms-<wbr>in-plain-english/</a></div><div><a href="http://scikit-learn.org/stable/tutorial/machine_learning_map/" target="_blank">http://scikit-learn.org/<wbr>stable/tutorial/machine_<wbr>learning_map/</a></div><div><a href="https://en.wikipedia.org/wiki/Firefly_algorithm" target="_blank">https://en.wikipedia.org/wiki/<wbr>Firefly_algorithm</a></div><br>On Thursday, August 16, 2018, Tobias Kohn <<a href="mailto:kohnt@tobiaskohn.ch" target="_blank">kohnt@tobiaskohn.ch</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div style="font-family:Arial;font-size:14px"><p>
I couldn't agree more! Such interactive programmes are often so much more valuable than hours of talking (even though doing interactive programmes all the time will wear the students out -- as always, there is golden middle here ^_^).<br>
<br>
Another idea in that direction is to make two or three groups, and then have a little competition of who can sort a pile of post-its (or whatever) fastest. And I would recommend to surprise the students. Once they have learned how to sort numbers, say, give them post-its with picture of animals, say, or melodies, or whatever you fancy. That forces them to think outside of the box, and suddenly computer science class becomes so much more meaningful and memorable!<br>
<br>
Yet another idea: how about sorting Morse code? Usually, we get it sorted from 'A' to 'Z'. But there are other ways, and before you know it, you are discussing trees...<br>
<br>
Cheers,<br>
Tobias<br>
<br>
<br>
Quoting kirby urner <<a href="mailto:kirby.urner@gmail.com" target="_blank">kirby.urner@gmail.com</a>>:</p>
<blockquote style="border-left:2px solid blue;margin-left:2px;padding-left:12px" type="cite">
<div dir="ltr">
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
I'm glad Tobias took the bull by the horns and didn't eschew a deeper look into the sorting algorithms.</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
As a big fan of animations, my reflex is to scour Youtube for graphical renderings of the different strategies, but then another thought crops up: lets get out of our seats and do choreography, Math is an Outdoor Sport! (PR poster). I should explain.</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
The relationships between programming and scripting theater "programmes" (old spelling) are deep. Give each student a postit with a number and have them *enact* the sorting algorithm. E.g. starting in a row, turn to person on your left (if there is one) and swap places if your postit number is higher... have directors and make a video. Now choreograph (enact, dance) in a different way.</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
Symphonies, plays, musicals, are so multi-track, so parallel, and yet we fail to exploit those intuitions sometimes.</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
Let the Theater Department handle it, in consultation with CS. Could go under the heading of "Unplugged". Likely the Hobbits are already doing this in New Zealand (NZ has pioneered unplugged more than most, plus has Hobbits).</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
Seriously, having lived in the Philippines where people routinely learn group dancing, I'm worried about only acting as teams in three capacities (a) cheerleader (b) athlete on the field (c) band. Theater is being eliminated in favor of competitive sports. Perhaps CS could come to the rescue and say "wait, we need Theater for our simulations".</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
More cerebral team-based activities might go a long way towards fighting the stereotype that computer programmers only live in artificially lit basements eating pizza. That's a physically damaging lifestyle, nothing to do with writing code or even doing math.</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
===</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
Regarding last night's tele-class (real time, <a href="http://zoom.us" target="_blank">zoom.us</a>), I worked through "cloning a github repo" as the core exercise, a repeat from last week, then went through the process of updating a notebook live, and pushing the changes back to the repo.</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
The repo was of course the one with yesterday's Jupyter Notebook about Ordering Polyhedrons by volume.</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
<a href="https://github.com/4dsolutions/SAISOFT" target="_blank">https://github.com/4dsolutions<wbr>/SAISOFT</a></div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
I tell them "cloning a github repo" is going to be important for when they want like a Jake Vanderplas tutorial, i.e. when they want to study a topic in more depth and the workshop is (A) on Youtube or similar service and (B) the workshop materials are free via github (a common enough pattern). </div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
I also reminded them how Google shares TensorFlow in the form of Colab exercises (Jupyter Notebooks).</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
One students asked "R or Python, which is winning in Data Science"? </div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
My answer: pandas is a relatively recent development and there's already lots of excellent curriculum based around R, which is likewise free / open source. The business world is rushing into Python because of DL / ML and so gains an R-like tool in the process, which enables better town-gown relations i.e. Harvard can talk to Facebook about Pytorch thanks to already teaching R in the stats department. </div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
In other words, it's not either/or, more like two communities forming a bridge via the common language of data science, which R and Python both reflect (as do some other languages / ecosystems, not aiming for comprehensivity here).</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
Kirby</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
</div>
<div class="gmail_extra">
<br>
<div class="gmail_quote">
On Wed, Aug 15, 2018 at 10:04 AM, Tobias Kohn <span dir="ltr"><<a href="mailto:kohnt@tobiaskohn.ch" target="_blank">kohnt@tobiaskohn.ch</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="font-family:Arial;font-size:14px">
<p>
<u>Hi Jurgis,</u></p>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
<br>
<br>
</div>
</blockquote></div>