Simon gets serious with Linear Regression (Machine Learning)

Simon has been working on a very complicated topic for the past couple of days: Linear Regression. In essence, it is the math behind machine learning.

Simon was watching Daniel Shiffman’s tutorials on Linear Regression that form session 3 of his Spring 2017 ITP “Intelligence and Learning” course (ITP stands for Interactive Telecommunications Program and is a graduate programme at NYU’s Tisch School of the Arts).

Daniel Shiffman’s current weekly live streams are also largely devoted to neural networks, so in a way, Simon has been preoccupied with related stuff for weeks now. This time around, however, he decided to make his own versions of Daniel Shiffman’s lectures (a whole Linear Regression playlist), has been busy with in-camera editing, and has written a resume of one of the Linear Regression tutorials (he actually sat there transcribing what Daniel said) in the form of an interactive webpage! This Linear Regression webpage is online at: and the Gragient Descent addendum Simon made later is at: and

And here come the videos from Simon’s Liner Regression playlist, the first one being an older video you may have already seen:

Here Simon shows his interactive Linear Regression webpage:

A lecture of Anscombe’s Quartet (something from statistics):

Then comes a lecture on Scatter Plot and Residual Plot, as well as combining Residual Plot with Anscombe’s Quartet, based upon video 3.3 of Intelligence and Learning. Simon made a mistake graphing he residual plot but corrected himself in an addendum (end of the video):

Polynomial Regression:

And finally, Linear Regression with Gradient Descent algorithm and how the learning works. Based upon Daniel Shiffman’s tutorial 3.4 on Intelligence and Learning:




RGB Project in Codea using SVG Color Map

On Monday this week Simon spent hours converting hexadecimals into RGBA values for the 140 colors supported by all modern browsers and creating a color file in Codea. He used the w3schools color map available at and an html color codes converter 

Some of the color names were quite exotic (like Chartreuse or Bisque ), and we looked those up together in the dictionary. We also took a very close look at the relation between red, green and blue values and found out that red was added every time to make colors lighter, even in shades where you would not expect any red.

Simon later made a nice design pattern in Codea using the color file:



Islamic Star Pattern

Simon made this beautiful interactive Islamic star pattern from Daniel Shiffman’s one hour long coding challenge he devoted to the refugees. The coding challenge is based on this paper about computer visualizations of geometrical Islamic art.

Late last night Simon almost completed the project in Open Processing when the browser crashed. He had to start completely from scratch this morning. This time he worked in CodePen. You can play with his Islamic Star Pattern yourself at:

The code:

The project step by step. The algorithm involved building a grid of polygons and finding midpoints for the sides in those polygons and then making those midpoints send out rays at certain angles that meet to form star-like shapes:



Islamic Star Patterns Hankin Method 2

The above picture is from Craig Kaplan’s PhD thesis on Computer Graphics and Geometric Ornamental Design. Below Simon explains what distance δ means:

Asteroids Coding Challenge

Simon has built this fun Atari game where a spaceship shoots at asteroids with laser and breaks them down into pieces. It was actually another coding challenge by Daniel Shiffman that Simon had tried a couple months ago when he was just beginning to write code. Back then he got seriously stuck at the asteroids phase (using JavaScript and HTML5 canvas with the p5.js library to program the “laser” functionality and examine collision detection with the asteroids). This time around, however, he glided through the challenge, nearly effortlessly, in his own words. He did enjoy it immensely and even tried rebuilding it on the RaspberryPi, but had “a copy-paste issue”.

The code in online in the p5.js web editor. You can run it and play the game, you can also hit the Download button and play on a big screen!



Sentiment Analysis API and Front End Client

Simon was trying to apply the AFINN Sentiment Analysis list once again, following a whole playlist of tutorials by Daniel Shiffman. This time things got more complicated as Simon has built a Sentiment Analysis API and attempted to talk to it from a web page by building a simple front end client with HTML and the p5.js library.

He did finish building the text field and the area where he could submit new words and their values to the Sentiment Analysis list.  At the very end of the project he got stuck. When entering a text on his front end client he got all the words from the AFINN list as the response, instead of just the words from the text he entered.

He was thinking about where the bug might be, while riding back home from our vacation.

Unfortuneately this turned out to be a wrong guess. He hasn’t discovered what is wrong as of now.

Building a WordPress Website

Last week Simon decided he wanted to download WordPress (and MAMP) for his new laptop, too, and did it in something like one hour, maybe even less. Something that cost us both nearly three days the first time. He proceeded to building a “Learning WordPress” website and carried on for two days, until he got stuck. Says he will come back to this project at a later stage.




Here Simon tells me how he is going to turn his website into a blog using the REST API: