# Fast Reaction to Sudden Concept Drift in the Absence of Class Labels
## 3 The Proposed Approach
### The DMDDM-S Algorithm
```
``` Require: \(S\): data stream of examples (labelled),  Forgetting factor \(\alpha:\) 0 \(<<\)\(\alpha<\)\(-1\)  Admissible change: \(\delta=0.1\),  Drift threshold: \(\lambda=100\)  Base Classifiers (Hoeffding Tree, Perceptron): L = 2 \(M_{T}:1.0D\) \(|W_{ld}|=100\) \(|W_{uld}|=100\) \(b,c=0\) Result: Drift \(\in\) {TRUE, FALSE}
1 foreach example \(x^{t}\in S\)do
2\(C_{v}\) prediction = get prediction using \(x^{t}\);
3\(C_{u}\) prediction = get prediction using \(x^{t}\);
4 if\(C_{v}\) prediction = 0.0 and \(C_{u}\) prediction = 1.0 then
5b++;
6 end if
7 if\(C_{u}\) prediction = 0.0 and \(C_{v}\) prediction = 1.0 then
8c++;
9 end if
10 Disagreement, \(D_{u,v}=b+c/L\);
11\(S_{w;\alpha}(t)=D_{w;\alpha}+\alpha\times S_{w;\alpha}(t-1)\);
12\(N_{\alpha}(t)=1+\alpha\times N_{\alpha}(t-1)\);
13\(M_{\alpha}(t)=\frac{S_{w;\alpha}(t)}{N_{\alpha}(t)}\);
14\(Sum\_Discertify=Sum\_Discertify+M_{\alpha}(t)\);
15\(m_{T}=(m_{T}+M_{\alpha}(t)-(Sum\_Discertify/instances\_Seen)-\delta)\);
16\(M_{T}=min(M_{T},m_{T})\);
17\(PH_{test}=m_{T}-M_{T}\);
18 if\(PH_{test}>\lambda\)then
19 Return TRUE ;
20\(W_{ld}\longleftarrow W_{ld}\cup W_{uld}\) ;
21\(N_{ld}=K-\textit{PrototypeClustering}(W_{ld})\) ;
22 foreach example \(x^{t}\in N_{ld}\)do
23\(train\) classifier \(C_{v}\) and \(C_{u}\) using \(x^{t}\)
24
25 end if
26 ifclass is missingthen
27 if\(|W_{uld}|=|uld|\)then
28 remove oldest instance in \(W_{uld}\) and add \(x^{t}\) to \(W_{uld}\)
29 else
30\(W_{uld}\longleftarrow W_{uld}\cup x^{t}\)
31 end if
32 else
33\(Incrementally train\) classifier \(C_{v}\) and \(C_{u}\) using \(x^{t}\)
34 end if
35 if\(|W_{ld}|=|ld|\)then
36 remove oldest instance in \(W_{ld}\) and add \(x^{t}\) to \(W_{ld}\)
37 else
38\(W_{ld}\longleftarrow W_{ld}\cup x^{t}\)
39 end if
40
41 end if
42
43 end if
44
45 end if
46
47 end if
48
49 end if
50\(W_{ld}\longleftarrow W_{ld}\cup x^{t}\)
51 end for
510
52 end for
53 return\(W_{ld}\)
```

**Algorithm 1**Pseudocode of Diversity Measure as a Drift Detection Method in a Semi-Supervised Environment (DMDDM-S)

``` Require: \(S\): data stream of examples (labelled),  Forgetting factor \(\alpha:\) 0 \(<<\)\(\alpha<\)\(-1\)  Admissible change: \(\delta=0.1\),  Drift threshold: \(\lambda=100\)  Base Classifiers (Hoeffding Tree, Perceptron): L = 2 \(M_{T}:1.0D\) \(|W_{ld}|=100\) \(b,c=0\) Result: Drift \(\in\) {TRUE, FALSE}
5 for each example \(x^{t}\in S\)do
6\(C_{v}\) prediction = get prediction using \(x^{t}\);
7\(C_{v}\) prediction = get prediction using \(x^{t}\);
8 if\(C_{v}\) prediction = 0.0 and \(C_{u}\) prediction = 1.0 then
8b++;
8 end if
8 if\(C_{u}\) prediction = 0.0 and \(C_{v}\) prediction = 1.0 then
8c++;
8 end if
80 Disagreement, \(D_{u,v}=b+c/L\);
81\(S_{w;\alpha}(t)=D_{w;\alpha}+\alpha\times S_{w;\alpha}(t-1)\);
82\(N_{\alpha}(t)=1+\alpha\times N_{\alpha}(t-1)\);
83\(M_{\alpha}(t)=\frac{S_{w;\alpha}(t)}{N_{\alpha}(t)}\);
84\(Sum\_Discertify=Sum\_Discertify+M_{\alpha}(t)\);
85\(m_{T}=(m_{T}+M_{\alpha}(t)-(Sum\_Discertify/instances\_Seen)-\delta)\);
86\(M_{T}=min(M_{T},m_{T})\);
87\(PH_{test}=m_{T}-M_{T}\);
88 if\(PH_{test}>\lambda\)then
89 Return TRUE ;
90\(W_{ld}\longleftarrow W_{ld}\cup W_{uld}\) ;
91\(N_{ld}=K-\textit{PrototypeClustering}(W_{ld})\) ;
92 foreach example \(x^{t}\in N_{ld}\)do
93\(train\) classifier \(C_{v}\) and \(C_{u}\) using \(x^{t}\)
94 end if
95
96 end for
97 ifclass is missingthen
98 if\(|W_{uld}|=|uld|\)then
99 remove oldest instance in \(W_{uld}\) and add \(x^{t}\) to \(W_{uld}\)
10 else
11\(W_{uld}\longleftarrow W_{uld}\cup x^{t}\)
12 end if
13  
99999  
100001
100 Figure 4: Illustration of the DMDDM-S evaluation. Figure 3: Framework of DMDDM-S.