how to form an algorithm
Answers
how to form an algorithm
by cumputer
The word “Algorithm” is like the word “Artificial intelligence” or “Machine learning”; it’s catchy and sounds important and useful, but, does anyone other than a scientist know what the word ‘algorithm’ actually means?
In my opinion, too little attention is given to practical use cases written in a language that can be understood by non-technical professionals. This article about algorithms is my attempt.
The following piece will give you a quick, non-technical overview of the steps we took at Cervinodata to get our first algorithm to work.
If you are a technical reader, there is a section at the bottom with more details about the technology we used to make our first algorithm work.
Step 1: Determine the goal of the algorithm
Before you even start thinking about technology or methodology, you need to determine the goal you wish to achieve. Ask yourself, “what do I want to get done that requires an algorithm?”
In our case we asked ourselves, “what do our clients need us to get done that requires an algorithm?”
We actually had two requests from multiple clients, resulting in two specific goals:
1. Provide insight into their cost per click (CPC) to help the marketer determine if they will reach their campaign target
2. Help the marketer to highlight campaigns that need attention, while saving them time by eliminating manual efforts that are typically needed to identify these
Based on these goals, we decided to build an algorithm that can do two things:
1. Predict the cost per click for the next 14 days
2. Detect anomalies that alert the user to go check the campaigns of a particular client
Why the cost per click (CPC)?
Cost per click is a leading indicator for many marketers where the costs and the ‘created campaigns’ are the input variables and the clicks are the result of that (or output variables).
The CPC connects the input and the output.
The reason why we did not use the cost per conversion, the cost per transaction, or results per ad spend (ROAS) is that there are many more clicks than conversions or transactions. Using cost per click allow us to see more accurate predictions with less data. Once the predictions are to our liking, we can use the same algorithm to test on the cost per transaction or ROAS with confidence.
Step 2: Access historic and current data
For any algorithm, input data is essential. We need sufficient historic data in order to distinguish test data from control data. Our control data must be set to check if our algorithm predicts CPC correctly. We use data from multiple clients and multiple platforms to have multiple checks. This will improve the end result.
Step 3: Choose the right model(s)
There are many models available online, but the question is, which one(s) do you need to get to reach your goal?
After testing multiple complex and less complex models, the ARIMA model was best suited for our purpose. This relatively simple model does not need a lot of data or variables (take weather as an example) to make a prediction, making it more practical.
The model you use should always strike a balance between simplicity and output. More complex models might give you more accurate results, but generally take more time to get right.
Results per platform
Originally we created an average cost per click for all platforms combined before predicting the cost per click, but that didn’t give us the desired results.
Hope it helps ☺️☘️