Archive - Page 2

March 19, 2020

Before I went on holiday this post by Mack Grenfell was doing the rounds about how to use calculus to pick the optimum value of marketing spend to maximise profit. As is often the case with online writing that I think is mostly good but which misses some important details I am not the target audience for that post but I still feel a response is worse writing. First of all, I think Mack does a very good job (better than I have ever done) of explaining why this is an important problem; there is a relationship between the amount spent on marketing and the return from it and this relationship has diminishing returns (i.e. you spend money on the best stuff first so extra money you add in after that won’t quite perform so well). If you can model this relationship between the level of spend and the number of conversions then you can use calculus to figure out at which point on the curve your maximum profit lies. One interesting question is what kind of model should you use for this relationship? Switch the line of best fit’s setting to logarithmic, it looks like this line fits the

March 6, 2020

I recently came across the paper Prediction is very hard, especially about conversion which describes a similar machine learning project to one I did for Haymarket Automotive so I thought it would be interesting to do a quick review of the paper and compare it with my own experiences. Knowing if a user is a “buyer” vs “window shopper” solely based on clickstream data is of crucial importance for e-commerce platforms seeking to implement real-time accurate NBA (“next best action”) policies. However, due to the low frequency of conversion events and the noisiness of browsing data, classifying user sessions is very challenging. My task was similar (identify those ready to buy a car vs. those who are just browsing the site for entertainment). These are unbalanced classes - there are way more just browsing the site - but not to the same extent as for an ecommerce store where less than 10% of people convert. They simplify the clickstream data by converting every hit into one of “view”, “click”, “detail” (product detail page), “add to cart”, “remove from cart” and “buy”. This is a good summary of everything a user can do on a fashion ecommerce site but it means

March 4, 2020

Here are some of the links I saved during February. This month I’ve selected links around the theme of sport. Sophie McKinna’s £15,000 funding gamble I’ve always been a sucker for a sporting underdog story and I really hope this one has the Hollywood ending I’ve been led to expect. Sophie McKinna (a British shotputter) turned down lottery funding and support from UK Athletics and instead continues to work in her main career as a prison officer whilst also being supported by local sponsors in Norfolk. Since taking this path she has improved her personal bests and qualified for the Tokyo Olympics. I find an athlete going out on their own and trying to thrive outside the system inspirational in so many ways. Ice cream vans & Finn and Gregor’s domestic Scottish rugby player Gordon Reid describes his feelings during the 2019 Calcutta Cup match against England which Scotland nearly won with a tremendous second half comeback. My Dad loves rugby and is a big Scotland fan so I take a mild interest and want to see the team do well. And (again) who can resist an underdog story where a nation of 5 million people (smaller than London!) takes

February 10, 2020

At the moment, my main hobby is rowing. A rowing boat with eight rowers has coxswain (cox) who steers the boat. He or she also has a microphone which is linked to speakers in the hull that they can use to communicate with and motivate the rowers. I have made a bot that imitates the styles and phrases often used by coxes during races. Generating the text takes around 3-5 minutes once you have pressed the button. Why not read more about how to make a bot like this below while you wait?
The coxwains in the training data often swear. Expect Robocox to do the same in the output Are you ready? How it all works An organisation called OpenAI trained a machine learning model on a very large amount of text from the Internet. We’ve trained a large-scale unsupervised language model which generates coherent paragraphs of text, achieves state-of-the-art performance on many language modeling benchmarks, and performs rudimentary reading comprehension, machine translation, question answering, and summarization—all without task-specific training. The model they trained is called GTP-2 and some versions of it are open source and available for free. The

February 7, 2020

Here is a list of some of the links that I saved during January Discovering a formula for the cubic In the UK you learn the formula for the roots of a quadratic equation in high school. At my school we were also taught the “completing the square” method for solving a quadratic equation which can also be used to derive the quadratic formula. At university I learned that formulae also existed for the roots of cubic, quartic and quintic equations and I remember proving in a group theory course that no such formula can exist for polynomials of a higher degree than this. But I never learned what the formula for solving a cubic (or anything else) was. This post shows that you can easily derive the quadratic formula if you assume a certain form of the results (which is kind of obvious because you know the two roots are equidistant from the min/max point on the parabola). Then it shows how to go through a similar process for the cubic. It isn’t quite so easy because it is not as obvious what form the roots should take. How a cabal of romance writers cashed in on Amazon Kindle