Quantitative Risk Assessment in Construction Disputes Based on Machine Learning Tools

: A high monetary value of the construction projects is one of the reasons of frequent disputes between a general contractor (GC) and a client. A construction site is a unique, one-time, and single-product factory with many parties involved and dependent on each other. The organizational dependencies and their complexity make any fault or mistake propagate and inﬂuence the ﬁnal result (delays, cost overruns). The constant will of the parties involved results in completing a construction object. The cost increase, over the expected level, may cause settlements between parties difﬁcult and lead to disputes that often ﬁnish in a court. Such decision of taking a client to a court may inﬂuence the future relations with a client, the trademark of the GC, as well as, its ﬁnance. To ascertain the correctness of the decision of this kind, the machine learning tools as decision trees (DT) and artiﬁcial neural networks (ANN) are applied to predict the result of a dispute. The dataset of about 10 projects completed by an undisclosed contractor is analyzed. Based on that, a much bigger database is simulated for automated classiﬁcations onto the following two classes: a dispute won or lost. The accuracy of over 93% is achieved, and the reasoning based on results from DT and ANN is presented and analyzed. The novelty of the article is the usage of in-company data as the independent variables what makes the model tailored for a speciﬁc GC. Secondly, the calculation of the risk of wrong decisions based on machine learning tools predictions is introduced and discussed.


Introduction
An important condition accompanying smooth and consensual implementation of a construction project is a proportional and transparent division of risks between the parties of the contract, inter alia, the consequences of any disruptions arisen from an increase in the scope of work and extension of the completion time [1]. In this context, properly structured legal and contractual solutions are crucial, as they significantly reduce the risk of conflicts between cooperating parties and, in many cases, offer the chance to solve the aforementioned problems without any court involvement [2,3].
During the construction works execution, various types of unforeseen circumstances occur, affecting the course and progress of works causing the contractor's financial loss. In practice, the factors causing serious disturbances in the contractor's operations include the necessity to introduce changes and revisions in the scope of works (so-called change orders, e.g., due to design faults), lack of access to the construction site at the planned date, the necessity to suspend works and re-mobilize, logistic problems related to supplies, organization and coordination of works conducted by several subcontractors, adverse weather conditions [4]. The numerous disruptions are particularly severe for contractors in the current context of the ongoing COVID-19 pandemic, and resulted, e.g., in delays in the delivery of materials and equipment, slowdowns in operation due to the need to comply • increase in costs of contract execution (according to 85% of respondents), • missing or delayed key decisions (according to 63% of respondents), • different conditions at the construction site compared to those specified by the ordering party (a client) (according to 51% of respondents), • deficiencies and faults in documentation for investments conducted in the "design and build" formula (44% of respondents) and " build" formula (29% of responses), • incorrect contract administration (22%), lack of understanding of the contract by the parties and failure to meet their contractual obligations (according to 20% of respondents), • missing or delayed payments (20%), • disruptions caused by adverse weather conditions (17%).
According to the respondents [9], disputes arising at the stage of implementation of the contract matter do not find an amicable settlement due to: • fear of contractual parties of being responsible for the decisions made (according to 86% of respondents), • divergent perception of the purpose of the contract as a conflict of interests between the parties (according to 44% of respondents), • unwillingness to take action (34%), • ignorance and lack of qualifications of cooperating entities (19%).
Among the most popular tools for resolving disputes, respondents [9] indicated primarily the common court (71%) and the "wait-and-see" method (68%), but also negotiation (39%), mediation (3.5%) and arbitration (3.5% of respondents). Respondents considered negotiation (78%), common court (35.5%), mediation (29%), arbitration (15%) and conciliation (13.5%) to be the most effective methods of dispute resolution. The "wait-and-see" method was not considered an effective tool for resolving disputes between contracting parties (5%). It should be noted that the answers of the respondents show a clear disproportion between the methods that in practice are most often used to resolve disputes and those that are considered to be the most effective.
It may be assumed that in practice a combined strategy for resolving disputes is used. Initially, the conflicting parties try to wait out the situation (being fully aware of the ineffectiveness of this method), and in the next stage, they transfer the responsibility for resolving the dispute to a common court. This strategy is closely related to the fundamental Symmetry 2021, 13, 744 3 of 30 causes of disputes between cooperating parties, which include lack of decisiveness, the inertia to make decisions, fear of liability, and passivity to take action. An additional factor pointed out by contractors is the significant increase in the costs of construction projects and the lack of adequate valorization formulas in the contents of contracts to reflect the actual level of changes in construction output prices [10,11]. As a consequence, they result in unprofitable contracts, ineffective solutions and high social costs. Completion of an uncompleted construction contract by a contractor selected in a new tender procedure is more expensive than, for example, increasing the amount of the original contractor's remuneration or adjusting the amount of remuneration stipulated in the contract, which currently cannot be performed by the contractor due to a drastic price increase. In such circumstances, it is reasonable for the contractor to seek an independent judicial resolution of the dispute [12,13].
The results of a survey [9] conducted by CAS indicate that projects of large scope and long duration, implemented with public funds (under the provisions of the Public Procurement Law) and by large entities (e.g., government agencies) are primarily exposed to serious disputes between contracting parties. Public sector investments (primarily road, rail and energy infrastructure construction) mainly due to the high uncertainty of the contractor regarding the terms of performance of the contract matter, are considered to generate more disputes than private projects [9,14]. The scale of these investments makes the cost increase of their implementation significant. According to [9], the largest number of disputes occurs during the implementation of road infrastructure (in 90% of cases) and rail infrastructure (47% of cases). Public procurers are considered difficult business partners, characterized by a high aversion to amicable solutions. This is caused by, among other things, systemic solutions, the obligation to apply public finance discipline, and legal regulations which significantly limit flexibility, e.g., in disposing of funds and making independent decisions that consider the current circumstances of investment implementation. It may be assumed that a large number of infrastructure projects and, at the same time, the reluctance of contracting authorities to find out-of-court solutions to disputed situations will result in an increase in the number of court proceedings in the coming years.
To sum up-the practice shows that common courts and legislation fail to keep up with the frequent changes that occur in the construction process, in the area of technology, construction organization, financial and insurance instruments. These new solutions of different nature undoubtedly influence the length of proceedings, their complexity and costs connected to dispute settlement. Regardless of its original cause, a dispute where the parties involved in the project cannot find an agreement and a way to resolve the conflict within the mechanisms provided in the content of the concluded contract, is usually settled in a court. Such a solution is not beneficial for any of the parties involved-it requires a long time to wait for a court decision and generates additional costs. In this context, alternative dispute resolution tools should be taken into account, that allow to find a quicker and a relatively cheaper method to solve a conflict such as negotiations, mediation and arbitration. Moreover, in public procurement contracts, a clear asymmetry in the distribution of risks between the parties to the contract occurs. In the current situation of instability in the construction market, any changes in the project environment particularly affect in particular one of the parties to the contract. Additionally, the disproportionate distribution of the parties' responsibilities and rights in the contract give rise to difficult relationships, conflicts and, ultimately, disputes settable only in a court. In practice, the interests of the contracting authority are better protected than those of the contractor. This is caused mainly by the fact that the terms of contracts are prepared by the contracting authority, which include requirements arising under the Public Procurement Law, and they are not subject to negotiation, so contractors do not have the opportunity to introduce clauses that protect their interests. This results in a long-term litigation and the dominant position of the ordering party. Its favorable contractual provisions cause, that in many cases, the bad financial situation of the contractor is further aggravated in a court. For Symmetry 2021, 13, 744 4 of 30 this reason, a contractor's decision about legal action is fraught with additional risk and multicriteria estimation of potential gains and losses [15,16].
Decisions can be supported with multicriteria methods [17][18][19], but also with machine learning tools-one of possible approaches supporting this process is Bayesian statistical decision theory providing a mathematical model to make decisions in conditions of uncertainty [20]. In the context of disputes in construction industry, the authors decided however to use decision trees (DT) and artificial neural networks (ANN) considering their application values.
Machine learning tools are widely used to support decision problems. The existing models predict the occurrence of construction disputes and provide decision-support information necessary to select the appropriate resolution strategy before a dispute occurs [21,22]. Other studies focus on investigating factors affecting the outcome of litigation, as well as on predicting the outcome of construction litigation itself [16,[23][24][25]. In order to predict the optimal solution in a conflict situation, the authors applied various tools, including ANN [16,22,25] and DT [16,22,23], having based on data from a wide variety of sources: directly from courts, online databases, literature. The data was frequently collected from a wide variety of construction projects executed in many different countries and obtained from many different construction companies. Therefore, the novelty of the proposed method of a decision support is based on the historical dispute cases of only one contractor. What is more, predictions are based solely on time and financial data usually collected by a contractor.
The subject of the article is quantitative risk assessment in construction disputes based on machine learning tools. The article presents the most common causes of conflicts between parties of the construction contract, defines the background of the problem as well as introduces an example incorporating a real-life problem. By using DT and ANN the authors present application possibilities of the tools supporting the contractor's decisionmaking process in the conflict situation with a client.
The process of getting to the proposed decision support method is presented in Figure 1. The applied tools, i.e., artificial neural networks (ANN), decision trees (DT), and association analysis are presented in Section 2. Then, the association rules concerning the provided real dataset on construction contracts problems are found. They are the base of a much wider database, simulated and described in Section 2.2. The full simulated database is presented in Appendix A. Then, in Section 3, the accuracy of automatic classifiers is verified on that extended database. To model other, less structured cases the database is step by step modified, distorted and the accuracy of the classifiers is checked at every level of modifications. The results achieved in Section 3 are discussed in Section 4. There The applied tools, i.e., artificial neural networks (ANN), decision trees (DT), and association analysis are presented in Section 2. Then, the association rules concerning the provided real dataset on construction contracts problems are found. They are the base of a much wider database, simulated and described in Section 2.2. The full simulated database is presented in Appendix A. Then, in Section 3, the accuracy of automatic classifiers is verified on that extended database. To model other, less structured cases the database is step by step modified, distorted and the accuracy of the classifiers is checked at every level of modifications. The results achieved in Section 3 are discussed in Section 4. There is also an example of application the proposed working-out the decision together with the proposed the risk read-out from the machine learning models that support the decision-making process. The findings are summarized and concluded in Section 5.

Supporting Tools
The main goal of the article is to find an optimal strategy for GC being in a conflict situation with a client, based on the historical data (real cases) regarding similar investments completed in the last six years. Considering the available data it was decided to use classification and regression trees based on their classification properties [26][27][28][29]. The second tool applied for calculations was artificial neural networks (multilayer perception MLP type). They were considered since the machine learning tool has been successfully applied in many construction problems supporting the optimal decision based on historical data and declared parameters [30][31][32][33].

Decision Trees-Classifier
Classification and regression trees (C&RT) allow for both the creation of models to solve the regression problems (where the dependent variable is a quantitative feature) and solving classification problems (with qualitative dependent variable). The classic C&RT algorithm was popularized by Breiman et al. [28]. In the most general terms, the goal of analysis using the tree-building algorithm is to find a set of logical partitioning conditions, of type "if, then", leading to an unambiguous classification of objects [34].
There are three types of elements crating the decision tree model. The selected (by the built-in algorithm) attributes are split in the decision nodes (also called split nodes or internal nodes). The top split node can be named the root node. Each split creates two branches -the second type of the decision tree elements. At the end of each branch there is another split node or the leaf node (often called the leaf or the end node). The third type of the decision tree elements -leaf nodes -classify the target (dependent variable) [35]. A specific independent variable is assigned to each decision node together with its threshold value (the basis of a division on two branches). When the leaf node is reached, its content presents the expected value of dependent variable for independent variables meeting the rules found in split nodes [36]. The decision tree creates the flowchart that categorize the selectedby the built-in algorithm -types of data. The multi-end of the flowchart i.e. the leaves should contain the independent variable of one, predefined class. That is the aim of the algorithm [35].
The most critical parameter of the decision tree is its depth i.e. number of split nodes between the root node and a leaf. The deeper is the tree, the more accurately the output is classified. However, the risk of overfitting is higher then [26,37]. The decision trees are incapable of of predicting the continuous target. Nevertheless, this disadvantage can be overcome if the the range of the output values is limited and there are many leaves found [26,28].
Despite the above-mentioned limitations, the advantages of the decision tree method made it widely applied for classification and prediction problems, e.g., for Finding a decision tree for a specific set of data and pre-defined output does not require a high computational effort. The method can be applied for the both categorical and numerical types of data in one dataset. However, the greatest advantage of the decision tree method is clear structuring the input dataset -the independent variables. The subsets of input data supports appearance of a certain class (or value) of the output. The structure of the tree can be drawn in a form of a flowchart and can be easily interpreted by a user. So, the knowledge of machine learning issues is not critical to explain phenomena based on the decision trees found [35].

Artificial Neural Networks-Classifier
Artificial neural networks (ANNs) are a well-known branch of machine learning. The first attempts to apply ANN in construction took place in the early 1990s. Artificial neural networks were considered as a potential tool to support decision-making in civil engineering. They have been successfully applied in construction, supporting the optimal decision based on historical data and declared parameters.
In the area of construction, ANN were used, among others, to: • forecasting the flow of costs in construction projects [30] increasing the efficiency of design and adaptation of municipal water infrastructure [51].
Feed-forward, multilayer neural networks are often used in publications focused on solving civil engineering problems. Historical data serves as training data: its analysis allows to identify the main factors characterizing and significantly impacting the given problem. Those factors are incorporated into the neural model as input variables. The training algorithm typically selected is one of the most popular ones [52]-the backpropagation, where the weights and biases are adjusted layer by layer from the output layer toward the input layer. The whole process is then repeated until a satisfactory error level is reached or becomes stationary. It was also applied in that case study.

Association Analysis-Rules Finding Tool
The association analysis, called also market basket analysis was originally invented to enhance the sales of supermarkets [53]. The contents of the clients' baskets-in the supermarkets-were searched to find the simultaneity of the appearance of specific goods. If found, it allows to modify prices or shelf layouts. The association analysis results are read through the two basic ratios: support (sup) and confidence (conf) defined below (1,2) [54,55]. where: B -so-called body of the rule (the predecessor) H -so-called head of the rule (the consequent) n(B→H) -number of cases of the simultaneous appearance of body and head The predecessor B and the consequent H are the states or phenomena. Their joint appearance is a subject of the association analysis. The rule, if B appears, then H also appears (denoted as B → H ) is described by the support and the confidence. The confidence of 100% (the highest possible) means that the appearance of B makes, every time, H also appear. To describe it as a strong rule, support of this rule has to be calculated. If the support equals to 1% (for the 100 rows database) it means that B → H happened only once. It can be by chance. There is no strict definition, the parameters of the rule can make it assessed as a strong one [56]. Every time it depends on the analyzed problem. The predecessor can be constructed as a conjunction of several conditions/states to be met (e.g., the temperature was rising a.m. and it reached 31 • C, and the atmospheric pressure was declining a.m.-it will be denoted ). Then the rule for appearance of an afternoon storm (H) can be calculated and assessed.
Nowadays, the market basket analysis applications cover a much wider area. Despite its original applications (they can be still found e.g., [57]) there is a spectrum of the association analysis applications. For example, it is applied in: insurance for risk assessment [63].
The tool was also utilized for solving problems in civil engineering e.g., for: • quality management in a precast concrete elements production [64], • detection of bid-rigging in the construction industry [65], • construction project risk assessment [46], • traffic safety issues [66,67].
The rules that can be found in the database help to describe the analyzed processes or to find the critical elements of the processes. Just for those features, the association analysis is applied to analyze the original database and to simulate a much wider database analyzed then.

Original Database and the Problem to Solve
Information presented in the article refers to real construction projects and was made available by the management of a large construction company operating in Europe. The company specializes mainly in "design-bid-build" and "design-build" project delivery systems as a substitute investor and a general contractor (GC), however, the examples below (Table 1) also include 'build' project delivery system. The form of settlement for each project is a lump sum.
The project X, which is the problem to be solved, is currently executed by a company in Poland. Due to significant defects in the project documentation provided by a client (IN), identified during works execution, it was necessary to extend the scope of the works (to a total value of 2.0 million monetary units). Having the detailed analysis of the consequences of completing the additional works, GC demanded from IN an annex to the contract, increasing the agreed lump-sum remuneration and extending the deadline. IN rejected GC's claims. At the stage of works execution, GC considered the following options: to stop further construction works or to continue works without the annex to the contract and guarantee of payment for the additional scope of work, i.e., pursuing the claim after works completion.
To identify the best course of action GC conducted research, using the methods of experts group, brainstorming and preliminary hazard analysis. The research included 12 experts-directly involved in the project (among them: the Project Manager, Site Man- ager, Accounting Specialist, Contracts Specialist). Eleven of the experts 'preferred' to continue and one expert preferred to stop.
22 . (r)-the allowed cost increase; (k)-1 for 'Design and Build', 0 for 'Build' (based on design provided by a client); (d)-the recorded delay in days due to unplanned works; (u)-cost including contractual fine for breaching the contract deadline, fine for subcontractors for GC breaching the deadline (e.g., not making the site available for further works on time), the maintenance cost of the construction site, employees and equipment; (q)-the total fixed cost increase arisen from the delay (d * u); (s)-1 for 'yes', 0 for 'no'; (w)-1 for 'the sentence favorable for a GC', 0 for 'the opposite cases'.
After an in-depth risk analysis of both solutions, GC decided to continue the investment. GC completed works in line with the signed contract, as well as the additional works what resulted in a higher cost and deadline extension. GC estimates the delay at 120 workdays. The previous course of negotiations indicated that IN would not sign the annex. This means that after the completion of the works IN will claim the contractual fine for GC's delay (most probably it will be claimed from GC's guarantee bond).
The decision that GC faces is whether after the completion of works to pursue its claims in court to enforce the fee for additional works, the contractual fines claimed by IN, as well as costs of the court case and lost benefits (benefits lost due to the extended time of works, e.g., GC could not start another contract timely, what has numerous consequences, including financial ones: GC had to pay a contractual fine to subcontractors and the investor-client). GC's previous practice indicates that in none of the analyzed cases (10 examples are presented in Table 1) at the stage of works execution had GC decided to go to court. Such decisions were made only after the project had been completed. At the same time, GC is aware that in case of litigation the claims may be rejected incurring a high additional cost.

The Rules Found
There is a substantial gap in the contracts' values (see Table 1). The contractor completed four contracts with a value over PLN 18.5 million and six contracts lower than PLN The confidence of the rule is the maximum one i.e., 100%. However, there are millions of similar rules, as the threshold of Rule 1 can be from the range PLN 6.30-7.25 million. For further calculation, the following form of the Rule 1 is considered.
The opposite form of Rule 1 to its form presented as (5) is the following one: All these three rules presented in (3), (4), and (5) have 100% confidence as well as the rule presented below. ( Another finding is that taking the client to a court is successful if the contract value is PLN 7.25 million or higher. This Rule 2 can be written down as: As before, here the variations of this 100% confident Rule 2 are also possible, e.g., This rule is true for this specific 10-row database. To get a favorable sentence, it is necessary to sue the client. Considering that Rule 3 can be formulated (see (9)).
Although both rules (Rules 2 and 3) have 100% confidence, Rule 3 reflects the real conditions better. There are no contracts settled based on unit prices of the construction works. The idea of creating the reserve (r) is to use it to cover unpredicted costs arisen during the contract execution. It allows to reach the planned profit. It is hard to predict the value of additional works (a) and additional costs arisen from the delay in a contract completion date (q). However, it can be observed in Table 1 that these two values are greater than 0 in every contract. Based on that, it is checked if the reserve covers the sum of costs a and q, by calculating the e value for each contract: The following Rule 4 is found: Every time the contractor had not reached the planned profit, they sued the client. The confidence of Rule 4 is 100%. Applying a favorable sentence as a consequence of the rule (it creates the Rule 5), the confidence then decreases to 80%. One time (out of five) the sentence was not favorable for the contractor. Rule 5-considering also the necessity of taking a client to a court before the sentence-can be presented as: There is one more, strong rule found: if a client is sued and the contract time extension is longer than 40% of the planned time, then the sentence is not favorable for the contractor. This Rule 6 (presented in (12)) is called "a rule" but it is only one case in the database, and its confidence is 100%.
There are certainly many other rules to discover even in such a small database with lower or much lower confidence, e.g., The confidence of this Rule 7 is 67% (four contracts with favorable sentences out of 6 contracts based on designs provided by clients). Another meaningless rule (according to the authors' opinion) is: The confidence of the rule presented in (15) is 100%. Despite the theoretical strength of this rule, ensuring a favorable sentence by assuming high reserve before the contract is signed, is not reasonable. One of the rules with a contract scope as a consequence is Rule 8.
This time the confidence of the rule is 67%. The basic statistics of the contractor's completed projects parameters are presented in Table 2. The following rules were chosen for further analysis: Rule 1 (in form presented in (5)), Rule 3 (presented in (9)), Rule 4 (presented in (11)), Rule 5 (presented in (12)), Rule 6 (presented in (13)), the Rule 8 (presented in (16)). Their basic association analysis parameters, i.e., confidence, support, and lift are presented in Table 3. There, n serves as a number of contracts meeting the rule and m serves as a number of contracts meeting the condition of a rule's predecessor. Although the selected rules are very strong, their meaning for the contractor having only 10 contracts completed in its portfolio is low. There are numerous companies with much higher experience. Willing to prove the usefulness of machine learning tools for working out the decision of taking a client to a court, it is necessary to create a much wider, simulated database. It was already proved in [21] and [22] that with the use of machine learning a high accuracy of disputes' results (or occurrence) can be achieved. However, these analyses refer to the disputes of many contractors being parties in them. The novelty of the prosed approach is making an automatic classification based on data collected by a single contractor (gathered from their experience). It was decided to overcome the problem of confidentiality of this kind financial and other type of data, by simulating the database based on the rules found for a real 10-row database provided. The contractor-the database provider-avoids in this case disclosing a full set of managerial, financial information, that is crucial for their competitiveness. Certainly, publicly known the level of profit and the level of the reserve (for cost increase) will lower the competitiveness of any contractor. Therefore, the database was created, providing 100 rows of data. The base of the simulated database are the rules presented in Table 3.

The Simulated Database
The intermediate aim is to create a database that could simulate data concerning 100 completed construction contracts. The rules presented in Table 3 and the real contracts' basic statistics presented in Table 1 are the base. The simulated contract values v (s) are created based on the following Formula (17): where rnd is a random value from the range (0; 1) based on the linear distribution. Similarly, u (s) values and d (s) values are calculated. To simulate the other contracts' parameters several ratios are calculated (based on real data) for each original contract. Their minimum and maximum values are presented in Table 4. Next, the following Formulas (18)- (21) are applied to calculate the simulated planned cost, planned profit, reserve, and cost of additional works.
To simulate the planned time the Pearson's correlation is calculated between the contract values and the planned time. As it was found that it equals 0.951 (quite high linear correlation), the simulated contract times are created through the following procedure: Then, the time extension can be simulated. To do so, the histogram is presented of the ratio d to t for the original contracts (see Figure 2). the simulated contracts' values; • the calculated simulated contract times are manually modified to provide the Pearson's correlation 0.951 of the simulated times and the simulated contract's values.
Then, the time extension can be simulated. To do so, the histogram is presented of the ratio d to t for the original contracts (see Figure 2). The sequence of simulating the values in a 100-row database is: • simulating the contract values; • simulating the planned cost, the planned profit, and the value of additional works (based on simulated contract values); • simulating the reserve (based on simulated profit); • simulating the unit cost; • simulating the contracts' planned times (based on the procedure described above); • simulating the extensions of time, based on simulated contracts' planned times, and keeping the shape of histogram presented in Figure 2; • calculating the simulated total cost increase (d*u); • assigning the simulated contracts' scopes according to Rule 8; • assessing which clients of simulated contracts are sued (based on the intersection of cases arisen from Rule 1 and Rule 4; the rule is formulated as Rule 9 and presented in (23)); • assessing which simulated case won in a court (based on the intersection of cases arisen from Rule 3, Rule 5, and the rule opposite to Rule 6; the rule is formulated as Rule 10 and presented in (24)).
The simulated dataset is presented in Appendix A. The values of the selected parameters for the real 10-row database and the simulated 100-row database are presented in Table 5. The association analysis parameters of Rules 8, 9, and 10 for these two databases are compared in Table 6. Based on the information presented in Tables 5 and 6, it can be stated that the patterns of these two databases are not identical. However, considering also almost identical Pearson's correlation coefficients (between contract values and planned times) the presented parameters are sufficiently close to assume that 100-row simulated database considers several, important dependencies in data discovered in the real, 10-row database. It is to emphasize that creating the simulated database perfectly reflecting 10-row database would be useless-the same relations will appear then in the original and the simulated databases. That is why the distributions of independent variables are not analyzed for original data and just a linear distribution is applied for simulation. The aim is achieved. As presented in Table 6, the databases are similar but not identical. Finally, the simulated database is large enough to apply machine learning tools and 100 contracts completed and it is still a real value for a construction company operating for several years.

Results
In the case of completing any contract by a certain company, its financial results are calculated. Finding them on the nonsatisfactory level, and having a real base to state that more works are executed than paid, the contractor's management board (or other entitled person or group of decision-makers) have to undertake the decision of taking a client to a court (if other methods are not successful) or not undertaking any action. There are several issues to be considered, but one of them is the history of the contractor's disputes. It can be done through an automatic model classifying the new case to the two subsets "the win" (w = 1) and "the loss" (w = 0) based on the past cases learned.

Classifications of the Simulated Data
The decision tree-presented in Figure 3-based on the following independent variables (v, c, p, r, k, t, a, d, u, q, e) 100% correctly classifies the cases. The algorithm built-in Statistica 13.1 (by Dell) software chose only a, e, v, d, and k variables to build the tree (for 10 cases in the leaf as a criterion of stop splitting the nodes).  A perfect classification is achieved, however, there are leaves with the very low number of cases (ID = 8-3 cases, ID = 13-2 cases, ID = 15-only one case). The reasoning based on them could be much more misleading than based on leaves with a higher number of cases (e.g., ID = 14 24 cases or ID = 9 7 cases there). It was decided to cut the tree by the condition of minimum five cases in a leaf. The result is presented in Figure 4. A perfect classification is achieved, however, there are leaves with the very low number of cases (ID = 8-3 cases, ID = 13-2 cases, ID = 15-only one case). The reasoning based on them could be much more misleading than based on leaves with a higher number of cases (e.g., ID = 14 24 cases or ID = 9 7 cases there). It was decided to cut the tree by the condition of minimum five cases in a leaf. The result is presented in Figure 4.  This lowered the overall accuracy of DT to 94% (observed w = 0 six times is classified as w = 1). The confusion matrix is presented in Table 7.

Observed/Predicted
Predicted w = 1 Predicted w = 0 Observed w = 1 31 0 Observed w = 0 6 63 Extending the number of inputs to DT by the parameters presented in Table 4 and a + q value does not increase the accuracy of DT classification.
Then, the artificial neural network is applied to the same database for this classification problem. Nonbinary data are normalized with the linear method. The software allows to search the best network (with only one hidden layer) through choosing a different number of neurons in a hidden layer, choosing the activation functions in the hidden and in the output layer and by choosing the training algorithm (while the weights of neurons are searched for minimizing the output error). There is the same set of inputs This lowered the overall accuracy of DT to 94% (observed w = 0 six times is classified as w = 1). The confusion matrix is presented in Table 7. Table 7. Confusion matrix for DT with cut leaves.

Observed/Predicted Predicted w = 1 Predicted w = 0
Observed w = 1 31 0 Observed w = 0 6 63 Extending the number of inputs to DT by the parameters presented in Table 4 and a + q value does not increase the accuracy of DT classification.
Then, the artificial neural network is applied to the same database for this classification problem. Nonbinary data are normalized with the linear method. The software allows to search the best network (with only one hidden layer) through choosing a different number of neurons in a hidden layer, choosing the activation functions in the hidden and in the output layer and by choosing the training algorithm (while the weights of neurons are searched for minimizing the output error). There is the same set of inputs applied as for DT, however, there are 12 input neurons (ask is a category and has to be split on 0-1 or 1-0 pairs of input). According to only 100 rows in the database, the cross-validation process is applied (six folds are applied and every time five of the best classifying models are saved). There are 31 cases in the database where w = 1. Therefore, the existence of five or six cases with w = 1 is provided (in the test subset and in the validating subset) for every fold. The test subset serves for finding the moment of stop training the network. The validating subset is applied for the assessment of the accuracy of the model. The overall accuracy 92.4% for the validating subset is achieved (92.9% for the "loss" category and 91.7% for the "won" category). The confusion matrix is presented in Table 8 (the results from the cross-validation are summed-up, not averaged). To improve the accuracy, the number of inputs is limited with different independent variables eliminated (one by one), but it does not provide higher accuracy of the ANN model. Moreover, considering only six independent variables taken from the ranking produced by the decision tree (presented in Figure 5) does not increase the accuracy of the ANN model either. applied as for DT, however, there are 12 input neurons (ask is a category and has to be split on 0-1 or 1-0 pairs of input). According to only 100 rows in the database, the cross-validation process is applied (six folds are applied and every time five of the best classifying models are saved). There are 31 cases in the database where w = 1. Therefore, the existence of five or six cases with w = 1 is provided (in the test subset and in the validating subset) for every fold. The test subset serves for finding the moment of stop training the network. The validating subset is applied for the assessment of the accuracy of the model. The overall accuracy 92.4% for the validating subset is achieved (92.9% for the "loss" category and 91.7% for the "won" category). The confusion matrix is presented in Table 8 (the results from the cross-validation are summed-up, not averaged). To improve the accuracy, the number of inputs is limited with different independent variables eliminated (one by one), but it does not provide higher accuracy of the ANN model. Moreover, considering only six independent variables taken from the ranking produced by the decision tree (presented in Figure 5) does not increase the accuracy of the ANN model either.

Classifications of the Modified Simulated Data
The proper classifications of the proposed tools is verified considering the mathematical point of view (e.g., by a cross-validation for ANN, by setting the conditions for splitting the nodes in DT). As the database is not real, it only reflects the reality at a certain level, it is decided to disturb the level of reflecting the reality by the simulated database i.e., the level of meeting the rules found in the original database. To verify the classification properties of DT and ANN for less structured data, the original simulated database is modified (this modification is further noted as mod-1). Approximately 20% of cases with w = 1 (six of them) are changed by assigning to them w = 0 (in rows 23,42,52,57,85,96). Simultaneously, six cases with s = 1 and w = 0 are changed by assigning w = 1 to them (in rows 1,7,11,41,54,56). The mod-1 lowers the accuracy of a DT. Based on the same set of independent variables (and the same criteria of the stop), the overall accuracy

Classifications of the Modified Simulated Data
The proper classifications of the proposed tools is verified considering the mathematical point of view (e.g., by a cross-validation for ANN, by setting the conditions for splitting the nodes in DT). As the database is not real, it only reflects the reality at a certain level, it is decided to disturb the level of reflecting the reality by the simulated database i.e., the level of meeting the rules found in the original database. To verify the classification properties of DT and ANN for less structured data, the original simulated database is modified (this modification is further noted as mod-1). Approximately 20% of cases with w = 1 (six of them) are changed by assigning to them w = 0 (in rows 23,42,52,57,85,96). Simultaneously, six cases with s = 1 and w = 0 are changed by assigning w = 1 to them (in rows 1,7,11,41,54,56). The mod-1 lowers the accuracy of a DT. Based on the same set of independent variables (and the same criteria of the stop), the overall accuracy of DT classification is 92% (eight cases are misclassified). The confusion matrix is presented in Table 9. Table 9. Confusion matrix for DT for mod-1.

Observed/Predicted Predicted w = 1 Predicted w = 0
Observed w = 1 30 1 Observed w = 0 7 62 The structure of the tree is presented in Figure 6.
of DT classification is 92% (eight cases are misclassified). The confusion matrix is presented in Table 9.

Observed/Predicted
Predicted w = 1 Predicted w = 0 Observed w = 1 30 1 Observed w = 0 7 62 The structure of the tree is presented in Figure 6.  Searching for an increase in DT accuracy the types of inputs are extended considering the ratios presented in Table 4, as well as, an additional type of input is created equal to a+q (additional cost arisen from a contract delay and the cost of additional works are added). Then the confusion matrix is as presented in Table 10. The decision tree with its structure is presented in Appendix B as Figure A1. Table 10. Confusion matrix for DT (with extended input) for mod-1.

Observed/Predicted Predicted w = 1 Predicted w = 0
Observed w = 1 31 0 Observed w = 0 9 60 Similarly to the previous attempt to the classification, the accuracy of ANN classifications is searched. The confusion matrix from six folds (and five of the best classifying models for each fold) is presented in Table 11. Table 11. Confusion matrix for ANN, for mod-1.

Observed/Predicted Predicted w = 1 Predicted w = 0
Observed w = 1 125 40 Observed w = 0 15 285 Additionally, this time the attempts of reducing the number of inputs do not lower classification errors. Then, the database created-named as mod-1-is modified once more. The next six cases with w = 1 are changed by assigning w = 0 (in rows 3, 32, 46, 58 68, 82) and the other six cases with s = 1 and w = 0 are changed to w = 1 (in rows 4,18,19,30,44,66). Therefore, next, near 20% of cases are modified for the new database (named mod-2) to differ more from the original one-created with the application of the rules. The DT found for these data is presented in Figure A2 (see Appendix B), but the confusion matrix as Table 12 is presented below. The results from DT with extended data (presented in Figure A3) produce exactly the same confusion matrix as presented in Table 12.

Observed/Predicted Predicted w = 1 Predicted w = 0
Observed w = 1 29 2 Observed w = 0 5 64 The confusion matrix-results from ANN classifications-is presented in Table 13. The third modification made the database (named mod-3) different from the original one in approximately 60% of cases where w = 1. This time the next six cases (rows 12, 20, 38, 75, 92, 95) are changed (w = 1 to w = 0) and oppositely for the cases where s = 1 (rows 28, 55, 64, 69, 77, 88) w = 0 is changed to w = 1. The DT found is presented in Figure A4. The confusion matrix is presented in Table 14 below. Table 15 contains the confusion matrix based on the decision tree found for the extended input. This DT is presented in Figure A5.

Discussion
To interpret the results obtained by the tools applied, it is necessary to analyze the confusion matrix and the corresponding indicators to assess the diagnostic value of the classification.
In the field of machine learning and specifically in the problem of statistical classification, a confusion matrix is a table layout allowing visualization of the performance of an algorithm [68]. Considering the problem analyzed, which is the conflict between the contractor and the client, the confusion matrix presented in Table 17 indicates the possible variants of strategy from the contractor's perspective. Table 17. Confusion matrix-the possible variants of strategy from the contractor's perspective (interpretation of results).

Observed/Predicted Predicted w = 1 Predicted w = 0
Observed w = 1 TP-decision to sue a client to the court confirmed by the model  27)) [69].
Accuracy (ACC) indicates the proportion of correct classifications, however, it may yield misleading results if the data set is unbalanced [68]. Hence, as a complement, it is advisable to analyze recall, which is a true positive rate (probability of detection), as well as specificity, which is a true negative rate. All the results presented in Section 3 are transformed to the following ratios: ACC, recall and specificity. They are presented in Table 18. For every type of dataset, the DT tool outperforms the ANN classifier when accuracy and recall are considered. The specificity is better for the ANN classifier, for each dataset. The results presented separately for ANN and DT (see Figures 7 and 8). Accuracy (ACC) indicates the proportion of correct classifications, however, it may yield misleading results if the data set is unbalanced [68]. Hence, as a complement, it is advisable to analyze recall, which is a true positive rate (probability of detection), as well as specificity, which is a true negative rate. All the results presented in Section 3 are transformed to the following ratios: ACC, recall and specificity. They are presented in Table  18. For every type of dataset, the DT tool outperforms the ANN classifier when accuracy and recall are considered. The specificity is better for the ANN classifier, for each dataset. The results presented separately for ANN and DT (see Figures 7 and 8). The level of distortion of the data from the simulated dataset (mod-0) based on the rules found in the original dataset increases from mod 1 to mod-3. It influences a lot the recall of ANN. It decreases rapidly, while the decrease of the specificity is not considerable. It is due to the distortions made to the cases with s = 1 (clients sued). The subset of 69 cases with s = 0 is not modified for the purpose of creating mod-1 to mod-3. This made the specificity of ANN high. The recall of decision trees presents much higher resistance for the distortions made to the datasets. Their classifications (when w = 1 is presented as the result) are not perfect (as for mod-0). Nevertheless, the levels of recall are high, every time above 93.5% for mod-1 and mod-3 (and 100% for mod-0). Recall and specificity for DT and ANN are compared in Figure 9. The level of distortion of the data from the simulated dataset (mod-0) based on the rules found in the original dataset increases from mod 1 to mod-3. It influences a lot the recall of ANN. It decreases rapidly, while the decrease of the specificity is not considerable. It is due to the distortions made to the cases with s = 1 (clients sued). The subset of 69 cases with s = 0 is not modified for the purpose of creating mod-1 to mod-3. This made the specificity of ANN high. The recall of decision trees presents much higher resistance for the distortions made to the datasets. Their classifications (when w = 1 is presented as the result) are not perfect (as for mod-0). Nevertheless, the levels of recall are high, every time above 93.5% for mod-1 and mod-3 (and 100% for mod-0). Recall and specificity for DT and ANN are compared in Figure 9. The level of distortion of the data from the simulated dataset (mod-0) based on the rules found in the original dataset increases from mod 1 to mod-3. It influences a lot the recall of ANN. It decreases rapidly, while the decrease of the specificity is not considerable. It is due to the distortions made to the cases with s = 1 (clients sued). The subset of 69 cases with s = 0 is not modified for the purpose of creating mod-1 to mod-3. This made the specificity of ANN high. The recall of decision trees presents much higher resistance for the distortions made to the datasets. Their classifications (when w = 1 is presented as the result) are not perfect (as for mod-0). Nevertheless, the levels of recall are high, every time above 93.5% for mod-1 and mod-3 (and 100% for mod-0). Recall and specificity for DT and ANN are compared in Figure 9. We analyze the risk of failure i.e., wrong decision based on ANN classification, assuming that the mod-1 database reflects the real case. If the classifier predicts w = 1, it is suggested to make the decision of taking a client to a court. Its recall (presented in Table 18) is 75.8%. The false-positive rate (FPR) [68,70] is then: and it is equal 24.2%. Then, there is a danger of losing the case in a court. Therefore, it is a risk of wrong decision undertaken on the basis of the supporting model (w = 1 is predicted). Similarly, when w = 0 is suggested by the decision supporting tool, the risk of wrong decision (based on ANN classification result) is equal to false-negative rate (FNR) defined as: As the specificity of ANN for mod-1 is 95.0%, the risk of making the wrong decision is 5.0%. In case of materializing such risk (and not taking a client to a court), GC would lose benefits from a potential win in a court.
A similar reasoning can be made with a DT use, but it is recommended to utilize the feature of DT for a clear presentation of the process of classification in a form of a tree. Based on the same assumption (mod-1 represents a real case), the parameters of an analyzed project should be matched with the set of conditions of the tree (presented in Figure 6) until a leaf is reached. If the reached leaf suggests w = 1, e.g., it is ID = 12 leaf, the risk of a wrong decision is 50%, but for leaf ID = 12 the risk is 6/19 = 31.6%. However, it would be a risk-free decision if based on ID = 9 leaf.
It is recommended that the decision of taking a client to a court is supported by both models (ANN and DT). In case of agreement between suggested decisions from both models, the suggestions may be considered. The opposite suggestions found with these two models require comparison of the risk of each suggestion (calculated in different ways for ANN and DT), as well as, taking into account the policy of a specific GC. In case of w = 0 falsely suggested, GC will lose potential benefits. In case of falsely suggested w = 1, additional, not covered cost will be engaged without any benefit.
Analyzing the problem X (presented in Table 1 and described in Section 2.2.1.) it can be found that (considering the original 10-row dataset) the project X data meet at least two rules found. The project X value v x is greater than 18.60, so based on the rule found and presented in (8) there is 100% confidence of a favorable sentence in a court. Additionally, the rule presented in (12) is met. The total additional costs of the project X are not covered by the financial reserve. This makes the confidence 100% of winning the case in a court. However, there is the rule (13) which is not met by the parameters of the project X i.e., the delay of the completion date is lower than 40% of the scheduled time. Therefore, this rule indicating the loss in a court (if met), is not met. It is one more argument to sue a client.
Let us then assume that the project X was executed by a company, for which the mod-0 dataset is valid. If DT (presented in Figure A1) is used, the following way to reach a leaf should be taken, starting from split node ID = 1: e x < 0.0005, the node ID = 2 should be considered then; t x > 127.5, the node ID = 5 should be considered then; d x < 147, the node ID = 8 should be considered then; p x > 2.95. The leaf ID = 11 is reached. The read-out from the leaf is as follows: there are 14 projects meeting the same criteria (stated in split nodes), and for all of those disputes there were favorable court sentences. DT suggests the risk-free decision of taking a client to a court in case of project X. ANN classification confirms w = 1 for the project X input with recall 75.8%, so there is a 24.2% risk of a wrong decision (if the suggestion is considered).

Conclusions
The full set of data could not be provided by the construction company for the protection of the source of their competitive advantage. It is important to remember that the findings and conclusions are based on the simulated database reflecting the dependencies found for the original, 10-row database. However, as a quite high level of reflecting the reality is kept, it can be concluded that the findings underlined below can be confirmed in the real case of any other construction company (based on a full set of usually confidential managerial type data). The novelty of the proposed method of a decision support is based on the historical dispute cases of one contractor. Secondly, predictions of the effect of a dispute with a client are based solely on time and financial data usually collected by a contractor. The risk level of a particular decision is assessed as the probability of misclassifying the result of a dispute by ANN or DT classifier. The accuracy of decision trees and artificial neural networks is over 93%. The main findings based on DT and ANN application can be bulleted: • the accuracy is not a sufficient measure for the comparison of DT and ANN performance, • the risk of a wrong decision based on ANN can be measured by false-positive rate or false-negative rate (dependently on predicted class), • the higher the level of data distortion, the lower the recall of ANN, • even the recall of DT is quite stable (if data are distorted), it reflects an average performance; while reasoning for a particular new case, the risk of a wrong decision is calculated based on the leaf (so it can vary from case, to case), • working out the predictions from both tools allows for a more precise assessment of the risk of the decision (based on the consistency of the predictions), as the ANN's error of classification is an average one and the DT's error of classification may vary, depending on a leaf (relevant to the case).
The property of the method to find real relations (input-output) is confirmed by presented lowering accuracy of ANN for the databases with increasing level of distortion (from structured data, reflecting the original ones). The other group of advantages of the worked-out method is related to its ease of application: • predicting the outcome of a construction dispute can be successfully introduced practically in any type of a company if they have sufficient historical record of their disputes (however, it is confirmed for a construction company), • the method is based on time and financial type of data that are usually recorded-the historical cases can be easily retrieved, • the reliability of such tool increases with the size of the input database, • the method can be applied for the projects (and disputes) executed in one state (for the contractor's contracts executed there).
There is a significant part of information that each contractor does not share, as their competitive advantages depend on that. There can be many more financial types of information (not shared for this article) that influence the result. They should be used in real applications, as algorithms built in decision trees will choose the most influential independent variables. The method may bring weaker results if the completed projects are completed in different states with different legal systems and different construction practices. It is recommended to avoid such a varied data used as input.
The concept of quantifying the risk with the use of machine learning tools and the probability of misclassifications calculated through them will be explored by the authors. Data Availability Statement: All data supporting reported results can be found in Appendix A.

Conflicts of Interest:
The authors declare no conflict of interest.
Appendix A Table A1. The simulated dataset based on rules found for the original 10-row dataset.   Figure A1. The decision tree with the extended input for mod-1. Figure A1. The decision tree with the extended input for mod-1.     Figure A4. The decision tree for mod-3. Figure A4. The decision tree for mod-3. Figure A5. The decision tree for mod-3 (based on the extended input).