# A Collaborative Framework for Customized E-Learning Services by Analytic Hierarchy Processing
## 4 The Framework Based on Analytic Hierarchy Process
### The Proposed Two-Stage AHP Model  
Since the purpose of the final decision is to generate an intermixed course unit combination for a learner, namely \(S\), the outer stage criteria should be set by \(S\). However, as the unit relationships within a course should be determined by instructors (or experts), we design the decision model as a structure of two-stage AHP model as shown in Figure 8. That is, the outer stage concerns the learner side, and the inner stage corresponds to the instructors' side. The top two levels are defined by the learner, and the bottom two levels are defined by the instructors. We explain both stages bottom-up as follows:  
1. The inner stage: The purpose of this layer is to rank the units in each course. To achieve this goal, instructors have to define the pairwise intra-course comparisons of the associated units and define the pairwise inter-course scale ratios between the course and other courses. However, for \(n\) units, there are \(n(n-1)/2\) comparisons that should be considered, and such tedious tasks may challenge the patience of instructors. Fortunately, the multiplicative transitivity property can be employed to reduce the complexity of the above dull task. For example, suppose there are \(n\) units, then instructors only need to set the \((n-1)\) pairwise comparisons of the entries above the matrix diagonal as follows: \[R_{12}=u_{1}/u_{2},\,R_{23}=u_{2}/u_{3},\,...,\,R_{(n-1)(n)}=u_{(n-1)}/u_{(n)}\] (1) Other ratio scales above the diagonal can be derived based on the transitivity property, e.g., \(R_{13}=R_{12}\times R_{23}=u_{1}/u_{2}\times u_{2}/u_{3}=u_{1}/u_{3}\), \(R_{24}=R_{23}\times R_{34}=u_{2}/u_{3}\times u_{3}/u_{4}=u_{2}/u_{4},\,...,\,R_{(n-2 )(n)}=R_{(n-2)(n-1)}\times R_{(n-1)(n)}=u_{(n-2)}/u_{(n-1)}\times u_{(n-1)}/u_{ (n)}=u_{(n-2)}/u_{n}\). Since \(R_{ii}=1\), for \(1\leq i\leq n\) and \(R_{ij}=1/R_{ji}\), the complete matrix can be obtained. 2. The outer stage: Based on the criteria of learner \(S\), the purpose of this layer is to generate the priorities of intermixed units selected from different courses to form a newly recommended course for \(S\). To achieve this goal, the intra-course topic weights derived by the inner stage will be adopted. Suppose there are six factors (e.g., degree of difficulty (DoD), relationship, importance, sequence, bloom's taxonomy, and time constraints) can be set by \(S\), which we explain as follows: 1. Degree of difficulty (DoD): It uses 1, 3, 5, 7, and 9 to respectively represent equal difficulty, weak difficulty, essential difficulty, very difficult and absolute difficulty; and use 2, 4, 6, 8 as the intermediate difficulties between the two adjacent judgments, respectively. 2. Relationship: It indicates the degree to which a unit can be learned independently; that is, the lower the connection with other units, the higher the chance that it can be disassembled. Its main purpose is to combine certain units that cannot be studied independently into a set to provide options for subsequent course combinations. The semantics of each scale of 1 to 9 are: absolutely irrelevant, very irrelevant, quite irrelevant, slightly irrelevant, equally relevant, slightly relevant, quite relevant, relevant, and extremely relevant. 3. Importance: This represents the importance of different courses, as well as the intra-course importance between units. Such criterion scales can be determined by instructors with different weights. The semantics of each scale of 1 to 9 are: absolutely unimportant, very unimportant, quite unimportant, slightly unimportant, equally important, slightly important, quite important, extremely important, and absolutely important. 4. Sequence: It denotes the order of dependency between certain units in a course. For example, learning JavaScript programming requires a basic knowledge of computer programming. Then, a computer programming unit of a course becomes the prerequisite of a JavaScript unit.