def detected_change(self):
    " Detects concept change in a drifting data stream.\n\n        The ADWIN algorithm is described in Bifet and Gavaldà's 'Learning from\n        Time-Changing Data with Adaptive Windowing'. The general idea is to keep\n        statistics from a window of variable size while detecting concept drift.\n\n        This function is responsible for analysing different cutting points in\n        the sliding window, to verify if there is a significant change in concept.\n\n        Returns\n        -------\n        bln_change : bool\n            Whether change was detected or not\n\n        Notes\n        -----\n        If change was detected, one should verify the new window size, by reading\n        the width property.\n\n        "
    bln_change = False
    bln_exit = False
    bln_bucket_deleted = False
    self.mint_time += 1
    n0 = 0
    if (((self.mint_time % self.mint_clock) == 0) and (self.width > self.mint_min_window_longitude)):
        bln_reduce_width = True
        while bln_reduce_width:
            bln_reduce_width = (not bln_reduce_width)
            bln_exit = False
            n0 = 0
            n1 = self._width
            u0 = 0
            u1 = self.total
            v0 = 0
            v1 = self._variance
            n2 = 0
            u2 = 0
            cursor = self.list_row_bucket.last
            i = self.last_bucket_row
            while ((not bln_exit) and (cursor is not None)):
                for k in range(cursor.bucket_size_row):
                    n2 = self.bucket_size(i)
                    u2 = cursor.get_total(k)
                    if (n0 > 0):
                        v0 += (cursor.get_variance(k) + (((((1.0 * n0) * n2) * ((u0 / n0) - (u2 / n2))) * ((u0 / n0) - (u2 / n2))) / (n0 + n2)))
                    if (n1 > 0):
                        v1 -= (cursor.get_variance(k) + (((((1.0 * n1) * n2) * ((u1 / n1) - (u2 / n2))) * ((u1 / n1) - (u2 / n2))) / (n1 + n2)))
                    n0 += self.bucket_size(i)
                    n1 -= self.bucket_size(i)
                    u0 += cursor.get_total(k)
                    u1 -= cursor.get_total(k)
                    if ((i == 0) and (k == (cursor.bucket_size_row - 1))):
                        bln_exit = True
                        break
                    abs_value = (1.0 * ((u0 / n0) - (u1 / n1)))
                    if ((n1 >= self.mint_min_window_length) and (n0 >= self.mint_min_window_length) and self.__bln_cut_expression(n0, n1, u0, u1, v0, v1, abs_value, self.delta)):
                        bln_bucket_deleted = True
                        self.detect = self.mint_time
                        if (self.detect == 0):
                            self.detect = self.mint_time
                        elif (self.detect_twice == 0):
                            self.detect_twice = self.mint_time
                        bln_reduce_width = True
                        bln_change = True
                        if (self.width > 0):
                            n0 -= self.delete_element()
                            bln_exit = True
                            break
                cursor = cursor.get_previous()
                i -= 1
    self.mdbl_width += self.width
    if bln_change:
        self._n_detections += 1
    self.in_concept_change = bln_change
    return bln_change
Detects concept change in a drifting data stream.

The ADWIN algorithm is described in Bifet and Gavaldà's 'Learning from
Time-Changing Data with Adaptive Windowing'. The general idea is to keep
statistics from a window of variable size while detecting concept drift.

This function is responsible for analysing different cutting points in
the sliding window, to verify if there is a significant change in concept.

Returns
-------
bln_change : bool
    Whether change was detected or not

Notes
-----
If change was detected, one should verify the new window size, by reading
the width property.
def detected_change(self):
    " Detects concept change in a drifting data stream.\n\n        The ADWIN algorithm is described in Bifet and Gavaldà's 'Learning from\n        Time-Changing Data with Adaptive Windowing'. The general idea is to keep\n        statistics from a window of variable size while detecting concept drift.\n\n        This function is responsible for analysing different cutting points in\n        the sliding window, to verify if there is a significant change in concept.\n\n        Returns\n        -------\n        bln_change : bool\n            Whether change was detected or not\n\n        Notes\n        -----\n        If change was detected, one should verify the new window size, by reading\n        the width property.\n\n        "
    bln_change = False
    bln_exit = False
    bln_bucket_deleted = False
    self.mint_time += 1
    n0 = 0
    if (((self.mint_time % self.mint_clock) == 0) and (self.width > self.mint_min_window_longitude)):
        bln_reduce_width = True
        while bln_reduce_width:
            bln_reduce_width = (not bln_reduce_width)
            bln_exit = False
            n0 = 0
            n1 = self._width
            u0 = 0
            u1 = self.total
            v0 = 0
            v1 = self._variance
            n2 = 0
            u2 = 0
            cursor = self.list_row_bucket.last
            i = self.last_bucket_row
            while ((not bln_exit) and (cursor is not None)):
                for k in range(cursor.bucket_size_row):
                    n2 = self.bucket_size(i)
                    u2 = cursor.get_total(k)
                    if (n0 > 0):
                        v0 += (cursor.get_variance(k) + (((((1.0 * n0) * n2) * ((u0 / n0) - (u2 / n2))) * ((u0 / n0) - (u2 / n2))) / (n0 + n2)))
                    if (n1 > 0):
                        v1 -= (cursor.get_variance(k) + (((((1.0 * n1) * n2) * ((u1 / n1) - (u2 / n2))) * ((u1 / n1) - (u2 / n2))) / (n1 + n2)))
                    n0 += self.bucket_size(i)
                    n1 -= self.bucket_size(i)
                    u0 += cursor.get_total(k)
                    u1 -= cursor.get_total(k)
                    if ((i == 0) and (k == (cursor.bucket_size_row - 1))):
                        bln_exit = True
                        break
                    abs_value = (1.0 * ((u0 / n0) - (u1 / n1)))
                    if ((n1 >= self.mint_min_window_length) and (n0 >= self.mint_min_window_length) and self.__bln_cut_expression(n0, n1, u0, u1, v0, v1, abs_value, self.delta)):
                        bln_bucket_deleted = True
                        self.detect = self.mint_time
                        if (self.detect == 0):
                            self.detect = self.mint_time
                        elif (self.detect_twice == 0):
                            self.detect_twice = self.mint_time
                        bln_reduce_width = True
                        bln_change = True
                        if (self.width > 0):
                            n0 -= self.delete_element()
                            bln_exit = True
                            break
                cursor = cursor.get_previous()
                i -= 1
    self.mdbl_width += self.width
    if bln_change:
        self._n_detections += 1
    self.in_concept_change = bln_change
    return bln_change