# Semantic Description of Explainable Machine Learning Workflows for Improving Trust
## 4 Results  
The conceptual model of the ontology was developed in an OntoUML diagram that expresses typed relations between components, cardinality constraints for the relations, and constraints related to which element can be connected to others, formalizing specifications and axioms. The diagram is shown in Appendix A and contains three modules, namely (1) the General ML Module, represented within the grey UML package; (2) the Specific ML Module, in the yellow UML package; and (3) the Explanation Module, in the green UML package. The General ML Module is generic and has been developed to be reused to represent other ML processes and further adapted or specialized. Study has a purpose and consists of experiments, which have Workflow Executions. Workflows are composed by operations. Experiment has a goal, which is addressed by the ML Algorithm, e.g., Support Vector Machine (SVM) and Artificial Neural Network (NN). The operation is an event that receives data input, executes an implementation of the algorithm, receives parameter settings, and creates outputs, which can be an ML Model or a Model Evaluation. The Specific ML Module considers the different operations that are performed in the ML classification process, which consists of preprocessing the data, training the ML model, testing the ML model, and finally evaluating the ML model. Each of them is represented as a subclass of operation with the participants and the artifacts that are involved in the operation. First, Preprocess takes place to make the input data suitable to train and test the ML model, receiving as input InputData, and executing a PreprocessImplementation, which in turn implements a PreprocessingAlgorithm. The output of this operation is PreprocessedData, which can be specialized into the subclasses TrainData and TestData. Figure 4: Explanation generated by LIME for one instance, indicating a higher probability of recovery and the weights of the most impacting features for each class. TrainData participates in a Train operation that fits the ML model, executing an ML implementation and generating a fitted MLModel. The Test (Predict) receives TestData and executes a PredictImplementation, calling a fitted MLModel to predict output results. The prediction for each instance is represented by ResultInstance. Finally, an EvaluationModel operation for labeled data receives input results and compares them with TestData. It executes an EvaluateModelImplementation that implements an EvaluationProcedure, such as cross-validation or leave-one-out, taking into account EvaluationMeasures that need to be evaluated. This operation generates a ModelEvaluation that contains the values for the measurements specified by an EvaluationMeasure. The Explanation Module represents the post-hoc explanation process by adding the Explain and EvaluateExplanation operations with their corresponding participants. The first operation, Explain, aims to generate explanations by using results generated by a Test (Predict) operation and in some cases also using PreprocessedData. It executes the implementation of an ExplainableAlgorithm to generate an explanation, which can be classified as MLEplanation if it aims to explain the ML model, or as ResultExplanation, if it explains only a resulting instance. The relator ExplainsModel, between an MLModel and an Explanation, allows the logic behind an ML model to be obtained after the post-hoc method is applied. The operation EvaluateExplanation is related to the assessment of the explanations, executing an EvaluateExplanationImplementation to generate an ExplanationEvaluation. The operational ontology was obtained using the OntoUML plugin to transform the conceptual model to OWL, which can be manipulated in Protege to populate the ontology and to make further manual adjustments, such as including named relationships. This is necessary because the transformation only automatically transforms native relationships of OntoUML to their correspondents in gUFO. By evaluating the ontology, we assessed if the ontology meets its requirements.