# Replicating File Segments between Multi-Cloud Nodes in a Smart City: A Machine Learning Approach
## 5 Using Machine Learning for Partial Replication and Selecting the Candidate Node  
Multivariable regression is a statistical method used in machine learning to model the relationships between multiple independent variables and a dependent variable. It is a  
Figure 1: Replicas environment. powerful tool for analysing complex datasets and it is used in a wide range of applications, including finance, healthcare, marketing and social sciences. In simple linear regression, a single independent variable is used to predict the value of a dependent variable. However, in many real-world scenarios, a single independent variable may not be enough to fully explain the variability in the dependent variable. For example, in predicting the price of a house, factors such as location, size, number of rooms and age of the house may all be important, and a multivariable regression model can capture the influence of each of these factors on the house price. Multivariable regression models can take different forms, including linear regression, logistic regression and polynomial regression. Linear regression is the most commonly used form and involves finding a line that best fits the data points by minimising the sum of the squared errors between the predicted values and the actual values. Logistic regression is used when the dependent variable is binary, such as predicting whether a customer will buy a product or not. Polynomial regression is used when the relationship between the independent and dependent variables is nonlinear. One of the advantages of multivariable regression is its ability to control confounding variables. Confounding variables are variables that are correlated with both the independent and dependent variables and can lead to spurious associations. Multivariable regression allows the inclusion of these variables in the model, thereby providing more accurate estimates for the effects of the independent variables on the dependent variable. Multivariable regression is a valuable tool for data analysis and can provide insights into the relationships between variables and help in making predictions about future outcomes. However, it is important to ensure that the assumptions of the model are met and the model is not overfitting the data, as this can lead to inaccurate predictions. Careful data cleaning and feature selection are essential to ensure that the model is robust and generalisable to new data. A multivariable regression can be represented by a general equation, given by:  
\[\mathbb{Y}=\beta_{0}+\beta_{1}X_{1}+\beta_{2}X_{2}+\ldots+\beta_{n}X_{n} \tag{7}\]  
Here, \(\mathbb{Y}\) is the dependent variable and \(X_{i}\) represents the \(i\)th independent variable. The coefficients \(\beta_{i}\) are the weights assigned to each independent variable, indicating the strength of its relationship with the dependent variable. The coefficient \(\beta_{0}\) is the intercept, which represents the expected value of the dependent variable when all independent variables are zero. It is also known as the constant term or the error term, as it captures the overall effect of any unmeasured factors or errors in the model. In this paper, the aim is to select the most efficient server for replication based on several parameters. Since the task's execution time depends on multiple variables, such as the server's processing power, memory size and network bandwidth, we employ multivariable linear regression. This technique allows us to create a model that can predict the duration required to execute a task on each server, given the various parameters. To train our model, we use historical data that include information about previous tasks and the servers used to complete them, as well as the corresponding execution times. Once the model is trained, we can use it to predict the duration required to execute a new task on each available server. The model we use for prediction is represented by Equation (54).