Creating an Art Period Classifier with Create ML

Assiatou Hann
4 min readMay 30, 2020

--

When I was little, I went to visit the Museum of Modern Art in NYC. As I looked at the paintings, I never understood why this was art. I remember thinking about this and asking: What’s the point of the painting? Later, I learned it was made during Modernism, which is an art period. Now, I’m sitting and wondering to myself: Wouldn’t it be cool if I made a machine learning model that can easily find what era a painting was made?

An Example of Modern art

What exactly is a Classifier?

A classifier is an algorithm that sorts data into labeled classes, or categories, of information. They are good examples of pattern recognition in machine learning. To sum up what machine learning is, it is a system that allows computers to learn automatically without human intervention. They work by taking data, finding the pattern, and applying the pattern. A good example of this is email spam classifiers. These classifiers look through emails and classify them as spam or not as spam. Classifiers are super useful as they make the most practical use of machine learning.

Classifiers are also usually put into two different categories: supervised learning and unsupervised learning. (You can find more info here). To summarize, supervised learning uses labeled data (which I used for this product) and learns to create an algorithm to make predictions. The goal of Supervised learning is to create an algorithm that can accurately predict something based on the given data. Unsupervised learning is when the model is given unlabeled data and it has to find a pattern to come up with an algorithm. The goal of unsupervised learning is to find the pattern within the data.

There are also different ways that classifiers classify images. Here are a few methods of how it does that:

An example of a Decision Tree

Decision Tree

Have you ever made a factor tree when you were little? A decision tree looks like that. They are sort of like a flowchart. You get a question and depending on what you answer you follow to the next question, and you repeat until you reach a final decision. Classifiers follow this same thing. They set up these if-then rules to follow to create ways to classify the data.

His Equation

Naive Bayes

Naive Bayes is a classifier that’s inspired by Bayes theorem. Bayes’ theorem describes the probability of an event based on past data. For example, if the risk of health problems increases as you age, Bayes’s theorem says the risk of getting health problems increases as you age.

An example of a Neural Network

Artificial Neural Networks

Artificial Neural Networks are a set of input and output layers that work together to classify data. Each layer contains nodes that have different weights and biases to help classify the data better. These networks usually have multiple hidden layers that help classify the data.

An example of K-Nearest Neighbor

K-Nearest Neighbor

This is known as a lazy learning algorithm that works on analyzing unknown places by classifying the nearest data-points. For example, if there is an unknown data point, it looks at other known data points near it to decide the best possible answer.

How I created the Machine Learning model

Now that we know more about classifiers, let’s get into how I built the model. For this model, I used Create ML’s tabular classifier model. This model works the same way the image classifier worked, but this model classifies data that is on a table and not images in a folder.

A layout of what it looks like when I first open the screen

In this model, there was a total of around 100 items I made for training. In the table, there were 4 columns: Artist, Title, period (time), and medium. My target(what results I wanted) was the period while the features (what the app would analyze) was the artist and the title.

A sample of the Table that I made

After I finished training the model, I was able to test the data. To test the data, I made another table, but this time I took out the period. Then, I imported the model. The model was able to get the testing right the first time. Once I finished, I exported the model and was able to upload it.

How it looks once I finish Testing the model to make sure it works well

After creating this model, I was able to learn more about Tabular Recommender and was able to create one.

So…what can you do with this?

With this model, people can find more art based on that period. If you notice that you like paintings with a certain subject or style to it, this classifier can help recommend people more art from that period.

--

--