# Recommendation Algorithm Based on Survival Action Rules
## 3 Methods
### Recommendation Induction
#### 3.3.1 Meta-Table  
Suppose there is a set \(D(A,T,\delta)\) of \(|D|\) examples. Each example is characterized by a set of attributes \(A=\{a_{1},a_{2},\ldots,a_{|A|}\}\), an observation time \(T\), and a survival status \(\delta\).  
Suppose a set \(RUL\) of survival action rules is induced from a \(D(A,T,\delta)\).  
The meta-table \(mD\) is a set of meta-examples, where each meta-example is described by a set of meta-attributes \(mA=\{ma_{i_{1}},ma_{i_{2}},\ldots,ma_{i_{m}}\}\), where \(m\leq|A|\).  
If \(a\in A\) does not occur in any of the elementary actions in \(RUL\), then the attribute \(ma\) corresponding to \(a\) is not a member of the set \(mA\).  
If an attribute \(a\in A\) is of the symbolic type and occurs in at least one elementary action in \(RUL\), then \(ma:=a\).  
If an attribute \(a\in A\) is of numeric type and occurs in at least one elementary action in \(RUL\), then the values for the corresponding meta-attribute \(ma\) are defined as follows.  
Figure 4: Syntheticdata—Kaplan–Meier plots for two attributes \(a\) and \(b\) used in the illustrative example of rule generation. Each subfigure presents two distinct curves. The red curve corresponds to data points that have attribute \(a\) set to the value \(v_{1}\) and \(b\) set to value \(w_{1}\) (**A–D**). The blue curve corresponds to data points that have attribute \(a\) set to the value \(v_{3}\) and \(b\) set to value \(w_{1}\) (**A**), \(w_{2}\) (**B**), \(w_{3}\) (**C**) or \(ANY\) (**D**) value.  
Let \(RUL_{S}\) denote a set of all the source rules (3) and \(RUL_{T}\)--a set of all the target rules. Suppose that the sets \(W_{a_{S}}\) and \(W_{a_{T}}\) contain all elementary conditions from \(RUL_{S}\) and \(RUL_{T}\), respectively, and are built on the attribute \(a\). The set \(W_{a}=W_{a_{S}}\cup W_{a_{T}}\) contains all elementary conditions that are based on \(a\). Each of these conditions is of the form \(a>v\) or \(a\leq v\), where \(v\) is a particular value of \(a\). To determine the value set for \(ma\), all such values \(v\) occurring in \(W_{a}\) are sorted. The values of the meta-attribute \(ma\) are then defined as sequential identifiers representing each interval created by this sorting process.  
Observation time \(T\) and survival status \(\delta\) are not defined in the meta-table because they are not needed for further consideration.  
Let us assume that two attributes a (symbolic) and \(b\) (numeric) are given.  
Consider a set of tree survival action rules:  
\[\text{IF }(a<21.5\to a>10)\wedge(b=0\to b=1) \tag{7}\] \[\text{THEN }(\hat{S1}_{S}\rightarrow\hat{S1}_{T})\] \[\text{IF }(a<-2.5\to a>21.5)\wedge(b=0\to b=1)\] (8) \[\text{THEN }(\hat{S2}_{S}\rightarrow\hat{S2}_{T})\] \[\text{IF }(a>21.5\to a<4.5)\text{ THEN }(\hat{S3}_{S}\rightarrow\hat{S3}_{T}) \tag{9}\]  
From these rules, we can construct the following sets of elementary conditions:  
\[W_{a}=\{a<-2.5,a<4.5,a>10,a>21.5,a<21.5\} \tag{10}\] \[W_{b}=\{b=0,b=1\} \tag{11}\]  
In \(W_{b}\), there are only two values of \(b\), so the set of values of \(mb\) is \(\{0,1\}\). From \(W_{a}\), we obtain the following partition of the set of values of \(a\):  
\[(min_{a},-2.5],(-2.5,4.5],(4.5,10],(10,21.5],(21.5,max_{a}), \tag{12}\]  
where \(min_{a}\) and \(max_{a}\) are the minimum and maximum values of \(a\). The partition is a sequence of intervals and defines the set of values of \(ma\), which consists of five values. Each value corresponds to one of the intervals in the partition (12). For example, the interval \((4.5,10]\) is assigned to the value \(3\) within \(ma\) because it is the third element in a sequence of intervals.  
A meta-table is defined as the Cartesian product of the value sets of \(ma\) and \(mb\), as shown in Table 1.  
Let us consider an example \(a=11\) and \(b=0\). This example is covered by the meta-example \((4,0)\).  
In general, if a meta-table has \(n\) attributes, each attribute \(ma_{i}\) (\(i\in 1,2,..,n\)) has \(l_{ai}\) values, then the meta-table has \(l_{a1}\cdot l_{a2}\cdot...\cdot l_{an}\) examples.