# 5G/B5G Service Classification Using Supervised Learning
## 3 5G/B5G Service System Classifier Proposed
### ML Algorithm and Predictive Model  
The classification of services carried out in this work is based on the following premise: the services are in the form of a series of parameters (\(x\)) determined by the KPIs and KQIs that define them, and the corresponding labels (\(y\)) must be assigned according to these parameters. As mentioned above, the descriptive parameters of the services to be classified are in the form of a single database, and it is therefore necessary to partition it into two datasets, one of which is used to train the algorithm, and the other to predict or verify it. Splitting the database generates four new variables: _Xtrain_, _Xtest_, _Ytrain_, and _Ytest_. The training variable _Xtrain_ correlates with the input values for the 5G services that are selected to train the ML and _Ytrain_ algorithm with their respective output labels. The other two variables _Xtest_ and _Ytest_ correspond to the input and output variables for the testing and validation phase of the predictive model. \begin{table}
\begin{tabular}{c c c c c c c c c c c c c c c} \hline \hline
**Latency** & **jitter** & **Bil Rate** & **Packet** & **Peak Data** & **Peak Data** & **Mobility** & **Reability** & **Service** & **Survival** & **Expienced** & **Expienced** & **Interruption** & **Service** \\ **(ms)** & **(ms)** & **(Mpp)** & **Loss Rate** & **Rate DL** & **Rate UL** & **(Sm/lb)** & **(Sm/lb)** & **(Sm/lb)** & **(Sm/lb)** & **(Sm/lb)** & **(Sm/lb)** & **(Sm/lb)** & **Time (ms)** & **Service** \\ \hline
15 & 5 & 11 & 0.1 & 18 & 7 & 260 & 95 & 99 & 8 & 100 & 500 & 1000 & UHD,Video,Streaming \\
5 & 5.5 & 10 & 0 & 1 & 20 & 10 & 20 & 95 & 99 & 99 & 990 & 440 & 2000 & UHD,Video,Streaming \\
8 & 10 & 50 & 3.8 & 15 & 7 & 15 & 97 & 99 & 10 & 100 & 50 & 0 & 2 & Immers,Expected \\
80 & 1 & 0.5 & 1.00\(\sim\)05 & 18 & 7 & 15 & 97 & 99 & 10 & 100 & 50 & 0 & 2 & Immers,Expected \\
90 & 18 & 0.2 & 8.00\(\sim\)05 & 13 & 2 & 480 & 99.998 & 99.999 & 100 & 10 & 100 & 1000 & TGS \\
130 & 5 & 8 & 9.00\(\sim\)01 & 14 & 6 & 400 & 99.94 & 95 & 100 & 50 & 25 & 0 & 1000 \\
10 & 19 & 32 & 47 & 13 & 5 & 26 & 95.6 & 99.32 & 8.9 & 900 & 40 & 0.1 & Immers,Expected \\
2 & 3 & 15 & 8.00\(\sim\)09 & 0.2 & 0.2 & 100 & 99.999 & 9 & 1 & 10 & 100 & 0 & 0 \\
5 & 0.5 & 10 & 7.50\(\sim\)04 & 0.8 & 0.024 & 80 & 99.992 & 9 & 1 & 50 & 25 & 0 & Composed, Vehicles \\
1 & 0.05 & 0.6 & 1.00\(\sim\)07 & 15 & 6 & 28 & 99.999 & 99.999 & 0 & 1 & 10 & 100 & Industry,Automation \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Fragment of ten entries of the database built. The training phase involves passing training data to the ML algorithm to allow it to learn. The ML algorithm develops a function based on the training data (_Xtrain_) that provides the correct answer (_Ytrain_). Using _Xtrain_ and _Ytrain_, the algorithm learns, and a function _f_(_Xtrain_) = _Ytrain_ is generated that: identifies patterns in the training data, allows the attributes of the input data to be assigned to the target data (representing the answer to be predicted) and generates a model that captures these patterns. An ML algorithm is then applied whose objective is to create a function \(y=f(x)\) that is capable of predicting the value corresponding to any input object \(x\) (in the proposed system for the classification of services, these represent the KPIs and KQIs of 5G services). The ML algorithm must be trained with a set of parameters or characteristics of the different services to be classified. This training allows new known input values (\(x\)), new unknown labels (\(y\)) assigned since after the first training, the predictive model can provide results for new data. This means that once the ML algorithm is trained, the predictive model it generates is ready to predict or classify the requested services (see Figure 1). The result is a predictive model that can classify 5G services, which is generated by training the ML algorithm with the _Xtrain_ data.