As football fans, we sometimes wish we had the ability to predict the future.

This article is shared from Huawei cloud community “Using AI to predict the result of football game only 3 steps, see if your favorite team will win the next?” , author: HWCloudAI.

Remember the European Championships this summer? Twenty-four teams from different countries and regions played a total of 51 games. As the world’s top sports event, the European Cup has also attracted extensive attention from fans all over the world. I believe that many domestic fans have stayed up to watch the match during that period. As football fans, we sometimes wish we had the ability to predict the future and predict which team will win a game before it even starts. That sounds cool, but how can we do that?

As we know, there are many factors that affect the winning or losing of a football match. To predict the result of a match, we need to make comprehensive use of various data analysis, such as whether the team is at home or away, the data of the opposing teams in the past matches, the season of the match and so on. It is difficult to make a correct prediction only by manual analysis of these data. At this time, we can use the currently very popular AI technology to mine useful information from a large number of historical data by building a machine learning model, so as to help us predict the results of football matches.

Machine learning, AI, sounds lofty and daunting. Indeed, if it is in a few years ago, the developers want to achieve a specific case by using the method of machine learning, not only have abundant data analysis, data processing, characteristics of the engineering and so on various aspects of knowledge, but also from the beginning line of one line of code, there is not enough strong mathematical skills, data analysis and programming ability is hard to do.

I am very interested in machine learning, but I do not know much about it. Is there any way to get started quickly and realize some machine learning cases by myself? Of course, times have changed. With the rapid development of AI technology, there are many AI cloud service platforms. Users can easily complete the whole process of AI model development, training and deployment with a simple understanding of basic AI knowledge.

Huawei Cloud ModelArts is a very excellent product among many AI platforms. Taking machine learning as an example, ModelArts provides a visual machine learning modeling tool MLS. Users can build a complete machine learning model with less code or even zero code by dragging and dragging the mouse. This makes an otherwise extremely complex machine learning modeling process as simple as building blocks. Let’s take a look at how to predict soccer results based on MLS.

First, enter the Huawei Cloud ModelArts console, select Notebook in the development environment to create an MLS instance (see “Create and Open Notebook Instance Based on MLS Engine”), enter the Notebook and click the red box in the figure below to enter the MLS asset development interface.

MLS realizes data reading, data analysis, data processing, feature engineering, model engineering and other operations in the process of machine learning modeling through a series of operators. The essence of each operator is a code segment that can achieve specific functions. A large number of preset operators have been provided to users in MLS, covering most operations in the machine learning modeling process. Of course, if the preset operator cannot meet the needs of specific cases, users can also write custom operators according to their needs to achieve their desired functions.

After that, different operators can be connected according to certain rules to form an algorithm chain. Running the algorithm chain can complete each step in machine learning modeling, isn’t it very convenient and fast? Here is a demonstration of how to use MLS to build a machine learning model of soccer game prediction.

As shown in the figure above, we first read data and do some simple data processing. Since the purpose of this case is to learn from historical data to predict the future, we filter the early match data for machine learning model training, and select the recent match data for testing the effectiveness of the model. Prediction of football match results is a typical dichotomous problem. Here, the logistic regression classification algorithm commonly used in machine learning is selected for training, testing and classification result evaluation, and the training model is saved. Drag the corresponding operator as shown in the figure to the canvas on the right and connect it to complete the construction of the calculation chain. Then click the button on the top to run, and wait for the operator to turn green to indicate the completion of the operation.

At this point, we have completed the machine learning modeling process of football match result prediction, and then we can make use of the trained model to predict the result of matches that have not yet been carried out.

From the above case, we can see that MLS tool of Huawei Cloud ModelArts can be used to complete machine learning modeling very conveniently. In addition, for AI developers, rich resources are also essential, after all, we all hope to develop on the basis of predecessors, rather than to do something to repeat the wheel, so here we have to mention huawei cloud AI knowledge & training community AIGallery.

As shown in the figure, AIGallery provides a large number of AI algorithms, models, data, Notebook instances and various AI courses, covering many mainstream AI application scenarios. Users can find corresponding resources here according to their business needs and directly subscribe to start using them. Come and experience the fun of AI development by choosing a case that interests you.

AI Gallery Football match prediction case transmission gate:

  • European Championship Prediction Model from Scratch with Machine Learning (Pyspark)

  • European Cup forecast _ logistic regression

Click to follow, the first time to learn about Huawei cloud fresh technology ~