## 3 Proposed Transformation from List of Competencies to Tree of Competencies
### Branch Forming and Adjustment  
From the hierarchical clustering tree, the competency tree is formed recursively, analyzing all groups from the button to the top. For each node, the competency with the highest \(M\) value is assigned to be a parent node, while the rest of the competencies are assigned to be a child node. As the parent node is returned to the higher level of the hierarchical structure, it will be assumed as a node for analysis and one of the candidates to be a parent node. This forms a tree structure, where one competency will be assigned to be the root competency, while the rest competencies will form a hierarchical tree structure. The pseudocode of the free formation is presented in Algorithm 1. ```
1:\(M\), \(B\), \(M\),The first fix starts from the bottom, leaves, and finds the nodes with one branch/leaf only. The branch/leaf will be moved one level up to eliminate the children in this node. As multiple branches with one child element in them can be merged into one node, it must be revised to inspect whether this node should be divided into several branches. Therefore, the second fix, first of all, inspects how many child nodes exist in the node. If there are more than 2 competencies, then the \(M\) values are estimated for each of the competencies. The list of child nodes is divided into a branch with one parent and multiple child competencies only if the \(M\) value of the highest level competency in the list has a higher value than half of the child count in it. If the condition is applicable, the highest-level competency is assigned to be the parent, while all the remaining competencies will be a child competency. These two fixing functions are executed recursively, from the bottom to the top, and ensure the commodity and variation rules are met. ## 4 Validation of the Transformation Model

To validate the proposed model, different examples of competency trees were analyzed. These examples covered different abstraction-level competency trees--some were chosen as task-level competency trees, while the other ones were course-level competency trees. The evaluated competency trees were generated by different people or retrieved from e-learning courses. All those were taken from Lithuanian learning systems, covering examples in a range from primary school teaching plans to higher education study programs. To assure the quality of the competency tree, the test cases were obtained from persons (and their study courses) with experience in e-learning and expertise on hierarchy based (multi-level) competency evaluation. The test case trees were flattened to lists, leaving the competency text only, where, for each competency, the sentence was presented in a new line. The codes, or numbering, for each competency were generated; however, they were used just for visualization because codes were not used in the transformation model. All six examples of data and results of the transformation--generated tree--are presented in Appendix A, Table A1. The competency trees were up to 15 nodes, and 3 levels in each. This matches the usual case, where the test should have no more than 15 competencies, to avoid overloading the student with too large a variety of topics or skills to cover. Therefore, in e-learning systems, for each activity, just portion, or a subtree, of the overall competency tree is used. Here, the selected examples reflect the practical size of the trees. All test case competency lists were individually presented as input to the developed system for competency list automated transformation to competency tree. Each output of the transformation was compared to the initial competency trees. Only in 33% of the cases (cases no. 2 and 3) was the identical tree reconstructed from the competency list. Both cases included task level competencies in the field of math.