Writeup of the DjangoCon Europe 2019 talk »Here Come The Robots - Django and Machine Learning« by Tom Dyson
Tom Dyson: Technical director at Torchbox, a UK web agency. Also runs the Wagtail CMS project.
Artificial Intelligence is a superset of other things like robotics, machine learning, natural language processing. But let's talk about it – the first version of life was the evolution of early life. The first version was the cultural age, when humans came along (and later on figured out how to improve themselves). And the next version might just be a version of life that can not only improve some parts, but all of itself – there come the robots (maybe in 30 years? who really knows). Let's not assume an apocalypse for now.
According to François Chollet, lassical programming uses rules and data to produce answers. Machine Learning uses data and answers to produce rules. His book "Deep Learning with Python" is an excellent primer on the topic.
Image recognition felt like a futuristic technology, and now you can do it in about 15 lines of python. Check out the live demo, using the Microsoft service.
Practical application: Can be used to suggest titles, for example – never to set them, but to suggest, augmenting user experience. See also: This Is Not A Real Person.
Figure out what the attitude of a text's author is feeling. Live demo of a pretty unimpressive IBM Watson trying to figure out feelings. The Google API just tells you a magnitude of good vs bad, and is a bit better at this.
Practical application: Find highly charged messages in customer service, analyze large amounts of natural language.
Extracting entities from texts can be very useful to figure out what texts are about, including their contexts. Demo via Google API.
Practical application: Interlinks in content management ("see also"), etc.
This is a bit more than regular programming. You'll have to prepare data, train your model, evaluate the results, and only then use it. The Demo uses Amazon and a well-known database on animals, listing features of animals in a 0/1 way.
You'll have to read up on a lot of machine learning stuff, such as overfitting, which is something easy to run into. You'll also have to work very hard to avoid teaching prejudices and biases into your model – if it's learning from the past, for instance, it's going to learn that the past was right, and will try to steer the future to be the same.