# Relaxed Rule-Based Learning for Automated Predictive Maintenance: Proof of Concept
## 2 Relaxed Separate-and-Conquer Rule Learning approach
Having many variables has another interesting feature: the size of the truth table becomes very large (100 variables with domain 2 in each of them result in a truth table of \(2^{100}\) rows). This means that a training set (in which rows are explicitly presented) becomes _tiny_ compared to the whole truth table. It is interesting to see how an RL algorithms would cope with this situation. 2. The number of _extra values_. Suppose \(x\) is a variable occurring in the rules of \(f\). However, the domain of \(x\) may contain many values that do not take part in any interval of an AVP of \(x\) in \(f\). When there are many additional values, the event of the function \(f\) equal 1 becomes rare and hence it is more difficult for a rule learner to'spot' the rule. We will check truth tables with few and with many background values. Thus the options of few/many extra variables and few/many extra values give us 4 modes of testing combined. If we add presence/absence of random noise this will make 8 modes of testing in total. We perform experiments according to the above classification. Our conclusions based on these experiments are summarized below. 1. **Small number of extra variables. ** In this case the RSC algorithm _correctly_ reconstructs the original function. However, if we increase the number of values, the algorithm _splits_ the original rules so the number of resulting rules is larger than the number of the original rules. The effect of splitting can be demonstrated on the following example. Consider a rule \((x_{1},[1,10])\wedge(x_{2},[1,10])\). As a result of splitting this rule can be represented by the following collection of four rules \(\{[x_{1},[1,5])\wedge(x_{2},[1,5]),(x_{1},[1,5])\wedge(x_{2},[6,10]),(x_{1},[6, 10])\wedge(x_{2},[1,5]),(x_{1},[6,10])\wedge(x_{2},[6,10])\}\) The larger the intervals the stronger output of our algorithm is affected by splitting. This effect can be alleviated by using non-zero _prec_loss_ parameter, for instance, about half percent (_prec_loss_ is defined for the function _IsReplaces_ in Algorithm 3 in Section 2). As a result of this, the algorithm is 'encouraged' to move to a larger interval even if the resulting precision is slightly smaller. However, the fragmentation of the rules still exists. We believe this can be addressed by a post-learning algorithm that tries to simplify the already created rules [4]. This is an interesting topic for future research. 2. **Many extra variables. ** In this case, the RSC algorithm has tendency to include irrelevant variables into the rules. This inclusion has an interesting side effect: redundant variables in correct rules. For example, suppose we have a rule \([x_{1},[1,5])\wedge(x_{2},[1,5])\). If the number of variables is say 100 and the size of the sample of the truth table considered by the algorithm is say 1000 (tiny proportion of total number of \(2^{100}\) of the truth table) then there might be some irrelevant variable with an interval whose precision is better then any interval of \(x_{1}\) or \(x_{2}\). In this case the algorithm picks something like \((x_{10},[1,2])\) and then a relevant variable. This effect makes the collection of rules longer than needed. Still, in the vast majority of cases, the function of the collection of rules formed was exactly the function of the original rules. In about 1% of cases, we obtained rules with false positives. The reason for that is an effect of'shadowing': when a training set is so tiny compared to the 'full' data, some statistical 'anomalies' are possible. For example, it may happen that an interval of an irrelevant variable perfectly correlates with the rows where the function is 1. Clearly, in this case, the algorithm will pick the correlating interval of an irrelevant variable. The above situation can be fixed if the algorithm considers several random training sets of the same size. This allows the'stray' irrelevant variable to be'shaken off'.