How Algorithms Will Change Our Lives

Part One The nature of the beast!

By Douglas Rabasha

Earlier this year a father in Wisconsin got mad at Facebook (FB) as it had started to send his 16-year-old daughter advertising for baby foods and complained to the platform in a rage, aghast that FB has become so intrusive into the life of his daughter and his family.

What he did not know was that his daughter has been searching for items of pregnancy for some days as she had missed her period. Unbeknown to her parents she had started to have sexual relations at 15 and had sadly become pregnant.

Algorithms

The story shows how social media can be more knowing about its users than even the users themselves, yet alone parents and guardians. The pin point accuracy of its understanding can be put down to the algorithms that they use. Had the girl enquired once about pregnancy it may not have determined interest in baby food. Every girl in the world acquaints herself with maternal matters and the probability of it being motivated by actual pregnancy is slim.

Two enquiries, and at late at night, it looks more probable, while three plus being online for 3 hours searching for information, then it looks almost certain that the user is pregnant and five times per day for five days running then it is an absolute certainly, and the user can be flagged as a teen pregnancy with 100 percent certainty for the advertisers to step in.

This is what advertisers are paying for. To apply mathematical models to predict the interests we have and the choices that we make. These models are called algorithms.

In simple terms, an algorithm is a set of instructions that a computer (or a human) can follow to solve a problem or accomplish a task. (“What is an Algorithm?”) These instructions are usually arranged in a logical sequence and are designed to produce a specific output or result. For example, here’s a simple algorithm for making a peanut butter and jelly sandwich: 1. Gather the necessary ingredients (bread, peanut butter, jelly), 2) Place two slices of bread on a plate or surface. 3) Spread peanut butter on one slice of bread using a knife. 4) Spread jelly on the other slice of bread using a separate knife. 6) Put the two slices of bread together with the peanut butter and jelly sides facing each other. 7)Cut the sandwich in half, if desired. Another example of an algorithm is the process for finding the square root of a number:1) Start with a guess. 2) Divide the number by the guess. 3) Average the guess and the result of the division. 4) Use the average as a new guess. 5 Repeat steps 2-4 until the difference between the guess and the result is small enough. These are just a couple of examples of how algorithms work. In essence, they are simply step-by-step instructions for achieving a specific goal or outcome.

 

Facebook Algorithms

Now let us look at one of the most prominent users of algorithms. Facebook uses algorithms in a variety of ways to improve the user experience and to better target advertisements. Here are some examples: News Feed algorithm: Facebook’s News Feed algorithm determines which posts and updates appear in a user’s News Feed. The algorithm uses a variety of factors, such as the user’s past behavior, the popularity of the post, and the relevance of the content, to determine what to show. Ad targeting algorithm: Facebook’s ad targeting algorithm uses data about a user’s behavior, interests, and demographic information to determine which ads to show. Advertisers can use this information to target specific groups of users based on their interests, behaviours, or demographics. Content moderation algorithm: Facebook’s content moderation algorithm helps to detect and remove content that violates the platform’s community standards. The algorithm uses machine learning to analyse posts, comments, and images for content that may be harmful or offensive. Recommendation algorithm: Facebook’s recommendation algorithm suggests content to users based on their past behavior and interests. For example, if a user frequently engages with cooking content, the algorithm may suggest new recipes or cooking videos. Ranking algorithm: Facebook uses a ranking algorithm to determine the order in which content appears in a user’s News Feed.

 

Algorithm Factors

The algorithm considers a variety of factors, such as the user’s past behavior and the popularity of the content, to determine what to show and in what order. Overall, Facebook uses algorithms to help personalize and optimize the user experience, to better target ads, and to moderate content on the platform.

Algorithms apply probabilistic modelling using logistic regression that is commonly used for binary classification tasks. A good example is political advertising on Facebook, this algorithm could be used to predict whether a user is likely to support a particular political candidate or issue based on their past behavior and demographic information. Here’s how the logistic regression algorithm might work: Facebook collects data about a user’s past behavior on the platform, such as the pages they’ve liked, the posts they’ve shared, and the comments they’ve made. Facebook also collects demographic information about the user, such as their age, gender, and location. Facebook uses this data to train a logistic regression model, which learns to predict whether a user is likely to support a particular political candidate or issue based on their behavior and demographics. When a political campaign wants to target a specific audience, they provide Facebook with information about the target demographic, such as age range, location, and interests. Facebook uses the logistic regression model to predict which users in the target demographic are most likely to support the political candidate or issue. The campaign can then use this information to target ads specifically to those users who are most likely to be receptive to the message. It’s important to note that Facebook uses a variety of algorithms and techniques for ad targeting, and logistic regression is just one example. The exact algorithms and techniques used by Facebook are constantly evolving as the company seeks to improve ad targeting and user experience on the platform.

Given the increasing imminence of the 2024 general election in Botswana, there should be a modicum of interest in the mathematics of an algorithm. p(y=|1|x) = |1| / (|1| + exp(-(b0 + b1*x1 + b2*x2 + . . . bn*xn)))  In this equation, p(y=1|x) represents whether a user is likely to support the candidate (1 for yes, 0 for no), and x1, x2, and x3 represent the user’s age, gender, and location, respectively. The b0, b1, b2, and b3 values are the coefficients of the logistic regression model, which are learned during the training process. To train the model, Facebook would use a dataset of users who have expressed support for the candidate in the past, as well as users who have not. The model would learn to predict whether a user is likely to support the candidate based on their age, gender, and location. Once the model is trained, the campaign can use it to target ads specifically to users who are most likely to support the candidate. For example, if the model predicts that a 35-year-old female living in a particular city is highly likely to support the candidate, the campaign can target ads specifically to that demographic. Precisly the same games can be played in Botswana.