Search Menu

The basics of AI and machine learning through Company Z

We are all familiar with the world of online commerce.

Find out more about the fundamentals of AI and machine learning from Z Company. Enter now and don't miss it.

Nelson Alejandro Rodríguez

We buy plane tickets, clothes, book services or even do our supermarket shopping from our devices or computers. Some of us navigate this digital universe more easily than others, but we all adapt, looking for the most convenient way to interact with the platforms around us. Now, imagine what happens behind those platforms: what do companies do with all that data you generate every time you browse, compare prices or buy something? While they must respect your privacy and the confidentiality of your information, they can also use artificial intelligence (AI) and Machine Learning to improve your experience. How do they do it? Now I’ll explain how it all works, using company Z, an imaginary online retailer, as an example.

Subscribe to Telefónica’s blog and find out before anyone else.





The magic of Supervised Learning: Predicting behaviour based on the past

Imagine that company Z receives a large amount of data through its online channel. Every time you log in to check a data plan, browse products or interact with customer service, valuable data is generated. Company Z could use this data to create a Supervised Learning model . With this type of Machine Learning, Company Z could predict your future behaviour based on your past interactions.

Example: Company Z’s team ‘feeds’ their model with tagged data from previous customers, such as the products they purchased and the times they contacted customer service. With this history, the model can learn to predict which products you might be interested in purchasing. For example, if you have browsed the ‘premium packages’ section several times, the system can recommend related products based on your browsing pattern.

Discovering hidden patterns: Unsupervised Learning in action

But … what happens when there are no clear labels indicating what is going to happen? Sometimes, Company Z has large volumes of data that seem chaotic, with no apparent pattern. This is where unsupervised learning comes in. This type of Machine Learning allows algorithms to find groups or segments of customers with similar behaviour, without needing to know in advance what they are looking for.

Example: By applying an Unsupervised Learning algorithm, Company Z discovers that some users tend to browse their site at night, while others browse mainly on weekends. From this finding, they can create group-specific promotions, such as night-time discounts for users who log on after hours, thus improving the personalisation of the customer experience.

Learning from interaction: How Reinforcement Learning optimises the experience

Now, let’s say Company Z wants to improve the customer experience through a virtual assistant that constantly learns from every interaction. This is where Reinforcement Learning comes in. This type of Machine Learning learns through direct interaction with users and continuously improves based on the rewards it receives, i.e. when it responds in a way that satisfies the customer.

Example: Company Z could implement a chatbot that uses Reinforcement Learning. Each time the chatbot correctly resolves a customer’s query, it learns that that path was helpful. Over time, this virtual assistant becomes more efficient, responding faster and more accurately, and improving the customer experience with each interaction.

Feature selection: The right data at the right time.

Of course, with so much data available, not all of it is useful for making accurate predictions. This is where feature selection comes in, which involves identifying the most relevant variables to train the model on. In the case of Company Z, customer behavioural data, such as purchase history, browsing time and customer service interactions, may be the most valuable features for building a good predictive model.

Example: Company Z analyses which user characteristics are most important for predicting user behaviour. They find that the number of times a user has visited a product page is more relevant than their geographic location. Thus, they optimise their model by removing irrelevant data and keeping only the data that really helps to improve predictions.

Avoiding overfitting: The balance between generalising and specialising

When Company Z builds an AI model, it must be wary of overfitting. This problem occurs when the model overfits the training data and cannot generalise well to new data. A model that knows a few users perfectly well, but fails with the majority is not useful.

Example: To avoid this problem, Company Z uses techniques such as regularisation and cross-validation, ensuring that its model is flexible enough to predict behaviours of customers who have not yet interacted much with the platform. Thus, the system does not just stick with the history of a few, but can extrapolate for all customers.

Regression vs. classification: Different types of predictions

Depending on the type of question Company Z wants to answer, it will use either regression or classification models. Regression is used when you need to predict a continuous value, such as how much time a customer will spend browsing the web. Classification, on the other hand, predicts categories, for example, based on whether a customer buys a specific product or not.

Example: If company Z wants to predict the likelihood that a customer will purchase an additional service, they would use a ranking model . On the other hand, if they want to predict the approximate monthly expenditure of a customer, they would opt for a regression model.

Bias-variance tradeoff: Finding the perfect balance

When building a model for company Z, it is critical to manage the bias-variance tradeoff, the delicate balance between having a model that is too simple (high systemic error) and not capturing enough detail, and one that is too complex (high variance) and overfitting the data.

Example: Company Z makes sure that its model is neither too simple nor too complicated. A well-fitting model has a good balance between capturing general patterns without obsessing over irrelevant details.

Performance evaluation: How do we know it works?

Finally, Company Z should measure the performance of the model to ensure that the predictions are accurate. Metrics vary depending on the type of problem being solved. In classification, they may use accuracy or F1-score to measure how well they are predicting whether a customer will buy a service or not. In regression, they will use metrics such as mean absolute error (MAE) to see how close the predictions are to the actual values.

Example: Company Z evaluates their prediction model to see if they are correctly recommending products. They find that they have a high F1-score, which means that the system is effective at both detecting customers who will buy and not making false assumptions about those who will not.

Conclusions

In the end, what companies like Company Z do with your data is not just a matter of storing information. Using AI and Machine Learning, they can transform data into intelligent decisions that improve the user experience. Knowing the basics of AI is essential to understanding how companies are using this data ethically and responsibly to anticipate your needs, giving you what you’re looking for before you even ask for it. In the fast-paced world of digital commerce, AI is becoming the invisible engine that connects businesses to their customers in a more effective and personalised way.

Share it on your social networks


Communication

Contact our communication department or requests additional material.

Celebrate with us the Telefónica Centenary
START THE ADVENTURE
Exit mobile version