Prediction of Road Transport of Wood in Uruguay: Approach with Machine Learning

: Among the activities that burden capital in the supply chain of forest-based industries, the activity of road transport of wood deserves to be highlighted. Machine learning techniques are applied the knowledge extracted from real data, and support strategies that aim to maximize the resources destined for it. Based on variables inherent to the wood transport activity, we veriﬁed whether machine learning models can act as predictors of the volume of wood to be transported and support strategic decision-making. The database came from companies in the pulp and paper segments, which totaled 26,761 data instances. After the data wrangling process, machine learning algorithms were used to build models, which were optimized from the hyperparameter adjustment and selected to compose the blended learning hierarchy. In addition to belonging to different methodological basis, a CatBoost Regressor, Decision Tree Regressor, and K Neighbors Regressor were selected mainly for providing minimal values to errors metrics and maximal values to determination coefﬁcient. The learning by stack stands out, with a coefﬁcient of determination of 0.70 and an average absolute percentage error of 6% in the estimation of the volume of wood to be transported. Based on variables inherent to the wood transport process, we veriﬁed that machine learning models can act in the prediction of the volume of wood to be transported and support strategic decision-making.


Introduction
Road transport of wood can be optimized by adjusting several factors which make up the activity. Thus, the extraction of knowledge generated through data, that is, a relational database makes it possible to identify target variables that can be estimated and, consequently, provide support to forest managers' strategies. Planning is a strategic component, which can make decision-making more efficient and faster.
The planning is divided into decision-making levels, relating them to the application time horizon and the type of decision taken. Levels must be integrated to avoid inconsistent solutions. Strategies determine the line of action of the project, being carried out in the long term; tactics, organize medium-term activities; and operations, aim at routine, short-term decisions [1][2][3][4].
When it comes to strategic-level planning, it is an organizational process of strategies and decision-making, concerning overall long-term objectives. The line of action is elaborated before the initial phase of the action, aggregating information that organizes the operational plan, which allows the employees to carry out the allocation of resources, stipulating the risks, a strategy that is capable of reducing environmental impacts and social networks, identifying possible long-term gains [5][6][7][8].
The execution of strategic planning in the forestry sector can provide the optimization of activities, generate more assertive decision-making, as well as intelligently obtain inputs, reducing operating costs. Planning has been widely applied in the sector, such as in pulp and paper industries, for the management of planted forests and forest transport [9][10][11][12].
The detailing of the planning corroborates the increase in the efficiency of forestry activities when using wood resources. It avoids environmental disturbances and helps to develop an ideal route for the transport of wood, which can guarantee maximum profit from the transported products. The transport of wood is considered an expensive process, being the activity with one of the highest costs in the forestry sector [13][14][15][16].
The transport of wood consists of the movement of the bundles to the consumer units. In this connection between the planted forests and the manufacturing units, there is the possibility of carrying out this activity through the road modal, whose displacement can be carried out by trucks, in addition to presenting a varied offer of vehicles and short travel time. Proper planning of this activity can contribute to the performance of forestry activities or the supply chain, reducing costs. Some factors significantly affect the operational cost of road transport of wood, for example, the displacement, the condition of the road and the distance between the places of supply and the consumer [17][18][19][20][21][22].
Machine learning concerns the scientific study of algorithms and statistical models which are used by machine systems to perform specific and efficient tasks. It is noteworthy that this tool does not require strict programming. Machine learning algorithms fall into different types of learning, supervised or unsupervised [23][24][25].
The machine learning can be used to automate and manage forestry activities, such as the application in road transport of wood. The algorithms are used to analyze the data sets and, later, build decision-making systems. The goal of machine learning is about achieving goodness of fit in an independent test suite, as it can minimize deviations between actual and predicted results [26][27][28][29].
The methods based on machine learning can be applied predictively in order to predict the state and future values of the system. The construction of the predictive model is carried out from various resources, so that there are parameters within these models that are determined from historical data. The machine learning methods allow the creation of data-driven models and algorithms, which mostly have predictive capacity [30][31][32][33].
The machine learning is considered a promising solution for road transport of wood, since it can contribute to reducing congestion, improving employee safety, reducing human errors, mitigating unfavorable environmental impacts, optimizing energy performance, improve productivity and transport efficiency. The when developing a model through machine learning algorithms, it becomes possible to predict and establish strategies for problems in the forestry sector [34][35][36][37].
Based on variables inherent to the wood transport process, we verified whether machine learning models can act as predictors of the volume of wood to be transported and support strategic decision-making.

Case Study
We use structured data from road transport of wood, destined for the production of bleached Eucalyptus short fiber pulp. The forests were located in the western region of Uruguay (Table 1) and were planted with five species, namely: Eucalyptus dunnii Maiden; Eucalyptus grandis W. Hill ex Maiden; Eucalyptus saligna Sm.; Eucalyptus tereticornis Sm.; and Eucalyptus viminalis Labill. Wood was harvested using harvesters, that is, the cut-to-length system was used to cut, peel, and section the trees into logs measuring 4.80 m and 7.20 m in length.
Road transport of wood was carried out using three models of Load Carrier Compositions (LCC), ensuring a minimum ratio of 4.5 HP per ton, characterized as: LCC_1truncated truck with a single axle and a set of tandem axles and a trailer with two double axles, with a maximum length of 20.0 m and a combined total gross mass of 45.0 tons; LCC_2-tractor truck with a single axle and a set of axles in double tandem and a semitrailer with a set of double axles with a distance greater than 2.4 m between them, with a

Exploratory Analysis
The prediction of the volume of wood transported was estimated using five categorical attributes: age of the forest, number of days that the wood remained in the field after harvesting, forest species, combinations of cargo vehicles, and length of wood. Three other numerical factors were added: wood density, rainfall, and displacement speed with the wood load. The target variable selected was the volume of wood transported (m 3 ).
As they present a repetitive pattern, the forest age attribute was discretized, via clustering, into five categories. The number of days that the wood remained in the field after harvesting, length of wood, rainfall, and the speed of displacement with the wood load.
The dataset was composed of 26,761 instances and 10 attributes, which was partitioned into 90% for training the models and 10% for testing. A verification set is added with 1% of the observations from the initial set. To the detriment of the raw data obtained, outliers were removed.
Using the R programming language [38], data wrangling routines were implemented for planning, managing, and detecting the quality of data to be consumed by machine learning algorithms. To create a balanced dataset, the oversampling technique was applied [39]. Using the random forests algorithm [40], the importance of the attributes for the modeling process was observed and, through the spearman correlation [41], the parameters correlated with 5% of significance were excluded.

Model
In the automation of the machine learning workflow and model development, the PyCaret library [42] of the Python programming language was used. From the built workflow, supervised learning regression models were tested and evaluated [43,44].
The performances of five algorithms in default mode were tested: CatBoost, Decision Tree, K Neighbors, Automatic Relevance Determination, and AdaBoost. These algorithms were compared, above all, for their methodological basis, algorithms based on gradient, decision tree, clustering, linear, and ensemble. After the performance evaluation in default mode, according to Schratz et al. [45] and Andonie [46], the hyperparameters were adjusted to optimize the folds, iteration, tuning process, estimator, and method.
We selected the best models generated from each methodological basis and these were combined Blend and Stack models processes. The models were ordered and stacked on the learnings together in a hierarchical data structure. In each set of folds, we applied k-fold cross-validation, in line with Ghorbanzadeh et al. [47] and Arabameri et al. [48].
We tested machine learning algorithms and selected them according to their performance in predicting the volume of wood to be transported, using universal metrics for evaluating the performance of models [49][50][51][52], such as Mean Squared Error (MSE), root mean squared error (RMSE), Root Mean Squared Logarithmic Error (RMSLE), mean absolute error (MAE), mean absolute percent error (MAPE), and coefficient of determination (R 2 ). The actual performance of the selected model, five test subsets were created containing 100 randomly selected instances, thus applying the selected model over the test set and test subsets (Figure 1). on the learnings together in a hierarchical data structure. In each set of folds, we applied k-fold cross-validation, in line with Ghorbanzadeh et al. [47] and Arabameri et al. [48].
We tested machine learning algorithms and selected them according to their performance in predicting the volume of wood to be transported, using universal metrics for evaluating the performance of models [49][50][51][52], such as Mean Squared Error (MSE), root mean squared error (RMSE), Root Mean Squared Logarithmic Error (RMSLE), mean absolute error (MAE), mean absolute percent error (MAPE), and coefficient of determination (R 2 ).
The actual performance of the selected model, five test subsets were created containing 100 randomly selected instances, thus applying the selected model over the test set and test subsets (Figure 1).

Results
With the interquartile ranges (IQR) and the metrics of descriptive statistics, that is, mean, standard deviation (Sd), minimum (Min) and maximum (Max), skewness and kurtosis, the initial profile of the data were characterized. Consequently, it was also discriminated by through categorical variables, the outliers were evidenced ( Table 2).

Results
With the interquartile ranges (IQR) and the metrics of descriptive statistics, that is, mean, standard deviation (Sd), minimum (Min) and maximum (Max), skewness and kurtosis, the initial profile of the data were characterized. Consequently, it was also discriminated by through categorical variables, the outliers were evidenced ( Table 2). With the remaining data instances of the outlier removal process, that is, with 26,052 data, the relative importance of the attributes was tested. It is noteworthy that the global importance of the density variable was present in 55.40% of the random forest algorithm adjustments, followed by the age of the forest and displacement speed with the wood load.
In 90% of the instances, 23,445 data were used for the training of the algorithms and 10% for the test. Furthermore, 1% of the initial dataset represented 2607 data instances for validation. The related attributes, per dataset, were not correlated with each other (p-value < 0.05).

Modeling
With the algorithms in default mode, the performances of the models with CatBoost Regressor, Decision Tree Regressor, and K Neighbors Regressor stood out (Table 3). Despite the mean absolute percent error being close, the three algorithms had the coefficient of determination maximized.
In addition to belong to different methodological basis, CatBoost Regressor, Decision Tree Regressor, and K Neighbors Regressor were selected mainly for providing minimal values to errors metrics and maximal values to determination coefficient.
After pre-processing the data and selecting the type of machine learning algorithm, the adjustment of the hyperparameters influences the results. We adjust the number of folds of the CatBoost Regressor, Decision Tree Regressor, and K Neighbors Regressor algorithms, permuting between 10, 20, 30, 40, or 50 folds. The algorithms CatBoost Regressor and Decision Tree Regressor were better adjusted with 50 folds, while for K Neighbors Regressor they were 30 folds (Table 4). The number of iterations (10, 20, 30, 40, or 50) and the adjustment process (Bayesian, Random, or Optuna) were also adjusted, also aiming to optimize performance metrics (Table 5). It is worth mentioning the maintenance of the RMSLE and MAPE metrics. Table 5. Selection of the value "Iteration" to "Adjustment Process", analyzing the determination coefficient and mean squared error metrics. We adjusted the value of the estimator hyperparameter (10, 20, 30, 40, or 50) and the sampling method between bagging and boosting. With the best performance in each adjustment, we selected the models (Table 6), with the adjusted hyperparameters, to apply the learnings together.

Model-Tuned
With the models built individually from the combination of data and the algorithms with adjusted hyperparameters, we applied the joint learning techniques by blending and stacking ensemble models (Table 7).
We simulated an application in an out-of-sample validation set, we estimated the average determination coefficient of the stack ensemble models in the 50 randomly generated samples and verified its consistency with the standard deviation (Figure 2A). We verified the tendency to minimize the mean absolute percent error ( Figure 2B).

Discussion
The efficiency of road timber transport is primarily impacted by the volume of timber transported [53][54][55][56]. In the dataset evaluated, the association between the volume of wood transported with the attributes: age of the forest, number of days that the wood remained in the field after harvest, forest species, combinations of cargo vehicles, wood density, rainfall, and the displacement speed with wood load, guided the strategy of using it as a target variable.
Data as resources are essential to create resilience in the decision-making process to be deployed in the 4.0 forest. According to Visser [57] and Wang et al. [58] they support innovation, increase responsiveness, and assign flexibility to activity. However, they initially had to go through the data wrangling process. This step can be crucial for the feasi-

Discussion
The efficiency of road timber transport is primarily impacted by the volume of timber transported [53][54][55][56]. In the dataset evaluated, the association between the volume of wood transported with the attributes: age of the forest, number of days that the wood remained in the field after harvest, forest species, combinations of cargo vehicles, wood density, rainfall, and the displacement speed with wood load, guided the strategy of using it as a target variable. Data as resources are essential to create resilience in the decision-making process to be deployed in the 4.0 forest. According to Visser [57] and Wang et al. [58] they support innovation, increase responsiveness, and assign flexibility to activity. However, they initially had to go through the data wrangling process. This step can be crucial for the feasibility of building the model, as it measures the health of the data and certifies adherence to its construction. Despite the criticality, only 3% of the dataset was not able to be ingested by the algorithms.
With the application of the random forest algorithm, it was possible to identify the classification of the relative importance of the weighted regressors for building the model, by increasing the precision, decreasing the unexplained variation (IncNodePurity). In order of importance for the models, the wood density was obtained.
Frisk et al. [59] and Mobini et al. [60] also identified the density of the material to be transported as one of the main factors in estimating target variables related to road transport, such as transport cost and transported volume. With the combination of wood density and other relevant attributes for predicting the volume of wood to be transported, with machine learning algorithms, the models were built.
Exploring the capacity of the different calculations used by machine learning algorithms enhances the chance of previously obtaining a model with a reasonable fit. For this reason, the five different calculation strategies of the five algorithms tested were used.
The strategy of using boosting, decision tree, and clustering algorithms stood out. To enhance the prediction of the volume of wood to be transported, the gain of information obtained by the nodes of the decision tree, the penalty of the combination of sequential trees, and the non-parametric strategy structured in the dataset were used.
The scope of the optimization even incorporated machine learning algorithms, since they were agnostic in nature. According to Ojha et al. [61], they can be classified as evolutionary algorithms, as they allow a global optimization that iteratively guides a population towards a final population, solving several problems from the hyperparameter adjustment.
From the optimization of the hyperparameters, significant gains were noticed in the performance of the decision tree and KNN algorithms, the percentage increase in the coefficient of determination was 6% and 5%, respectively. On the other hand, as it has a more optimized structure, changes to the hyperparameters did not impact the performance of the CatBoost Regressor algorithm.
Furthermore, Zantalis et al. [28] and Tsolaki et al. [62] identified a gap in analyses that present the combination of different machine learning methods in solving transport problems. To increase the prediction of the volume of wood to be transported, joint learning by stack ensemble models was the method that returned the best performance.
The optimization of the volume of wood to be transported associated with the machine learning models mitigated the negative impacts of the absence of prior information in the strategic planning of forest managers. Through the application of the chosen model, the predictability of the volume to be transported provided support and evidence for the logistical capacity and performance, which were available.

Conclusions
Based on variables inherent to the wood transport process, we verified that machine learning models can act in the prediction of the volume of wood to be transported and support strategic decision-making.
The attributes of wood density, age of the forest, species, number of days that the wood remained in the field after harvesting, rainfall, and displacement speed with wood load are the attributes that make up the datasets of transport activities that impact the estimated volume of wood to be transported.
Among the learning models tested, the one learned by stack stands out with a coefficient of determination of 0.70 and an average absolute percentage error of 6%.
The predictability provided by machine learning methods applied on database from activity of road transport of wood offer support to strategic decision-making to forest managers. In addition, having defined the essential variables, the model must be observed and adjusted always that results show huge discrepancies of the metrics evaluated. As dynamic environment, regular monitoring will provide an assertiveness of the choices made by forest managers.