What does AI have to do with all this? Artificial Intelligence has nothing to do with love, nor with heartbreak, but this Valentine’s Day we can predict an infidelity.
Every day, we see how Artificial Intelligence is incorporated into more and more facets of our lives by the hand of the digitization. Because, in its origins, the advances of these technologies were restricted to the business or industrial fields. However, today, it has also jumped into the field of everyday life of ordinary people, making us see as natural things that a few years ago were pure “science fiction”.
Today, in “honor to Valentine’s Day”, in LUCA’s blog we have planned to play you a little joke. Because we are not going to talk about love, but rather the opposite: of infidelities. Although “unofficial” loves can also be real, right?
And what does Artificial Intelligence have to do with all this? AI has nothing to do with love, or heartbreak. But we can use it to “learn” from the data and help us predict whether a person is going to have an “adventure” or not. In summary, build an AI-based” infidelity predictor”.
The data we’re going to use to create the predictor is some “old acquaintances” of Machine Learning learners. This is the “Affairs ” dataset, based on a survey conducted by Redbook magazine in 1974, in which married women were asked about their extramarital affairs. (For more information, refer to the original work published in 1978 by the Journal of Political Economy).
From 6366 anonymous answers (collected by mail or by phone; by the way, how long, expensive and expensive it was to do surveys a few years ago), are defined 9 variables (age, years of marriage, valuation of their marriage, number of children, educational level, occupation, occupation of the husband, and religiosity “time “dedicated” to having an affair), and a new variable, fidelity. We will apply a classification algorithm (in this example, a simple logistic regression that it will make it possible to predict for a proposed new case (e.g. 25-year-old woman, 2 years of marriage, no children, university studies, something religious etc.) the likelihood that you will be unfaithful (or not) to your partner.
As a curiosity, in the previous analysis of the data, curious things can be seen, such as the fact that the least number of infidelities occurs at extreme educational levels: women with a basic level of education or professionals with a very high qualification. We can also see how it is in the first years of marriage when a greater number of infidelities are observed. Other observations, very logical, show how as the feeling of religiosity increases, or the level of appreciation of their marriage, infidelities are less likely. Also, when the number of children increases (no time for adventures!).
Jokes aside, always keep in mind where they come from the data the algorithm feeds on. So, if we talk about a survey of 1974, carried out in the United States, where only women are asked, we can imagine a large number of biases of local type, economic etc.Although we consider different educational levels and occupations, being a reader of a magazine already supposes a certain conditioning. We should also take into account the reliability of the capture and processing process of the data.
In any case, as an exercise to learn Data Science, and as entertainment for” Valentine’s Day ” it serves us. If someone is encouraged to create their own predictor, in LUCA’s blog we explain how to do it, step by step.
Happy Valentine’s Day!