|
21 | 21 | from mlpro.oa.streams import OAStreamTask |
22 | 22 | from mlpro.oa.streams.tasks.clusteranalyzers import ClusterAnalyzer, Cluster |
23 | 23 | from mlpro.oa.streams.tasks.clusteranalyzers.clusters.properties.body import cprop_size_geo |
24 | | -from mlpro.oa.streams.tasks.changedetectors.driftdetectors.drifts.clusterbased import DriftCBSize |
| 24 | +from mlpro.oa.streams.tasks.changedetectors.driftdetectors.drifts.clusterbased import DriftCBSize, DriftCBSizeGeo |
25 | 25 | from mlpro.oa.streams.tasks.changedetectors.driftdetectors.clusterbased.generic import DriftDetectorCBGenSingleGradient |
26 | 26 |
|
27 | 27 |
|
28 | 28 |
|
29 | 29 | # Export list for public API |
30 | | -__all__ = [ 'DriftDetectorCBGenSizeChange' ] |
| 30 | +__all__ = [ 'DriftDetectorCBGenSizeChange', |
| 31 | + 'DriftDetectorCBGenGeoSizeChange' ] |
31 | 32 |
|
32 | 33 |
|
33 | 34 |
|
@@ -57,6 +58,49 @@ def __init__( self, |
57 | 58 | p_thrs_inst : int = 0, |
58 | 59 | p_thrs_clusters : int = 1 ): |
59 | 60 |
|
| 61 | + super().__init__( p_clusterer = p_clusterer, |
| 62 | + p_property = cprop_size_geo, |
| 63 | + p_thrs_lower = p_thrs_lower, |
| 64 | + p_thrs_upper = p_thrs_upper, |
| 65 | + p_cls_drift = p_cls_drift, |
| 66 | + p_name = p_name, |
| 67 | + p_range_max = p_range_max, |
| 68 | + p_ada = p_ada, |
| 69 | + p_duplicate_data = p_duplicate_data, |
| 70 | + p_visualize = p_visualize, |
| 71 | + p_logging = p_logging, |
| 72 | + p_drift_buffer_size = p_drift_buffer_size, |
| 73 | + p_thrs_inst = p_thrs_inst, |
| 74 | + p_thrs_clusters = p_thrs_clusters ) |
| 75 | + |
| 76 | + |
| 77 | + |
| 78 | + |
| 79 | + |
| 80 | +## ------------------------------------------------------------------------------------------------- |
| 81 | +class DriftDetectorCBGenGeoSizeChange (DriftDetectorCBGenSingleGradient): |
| 82 | + """ |
| 83 | + Cluster based Drift detector for the change of the cluster size. |
| 84 | + """ |
| 85 | + |
| 86 | + C_NAME = 'Size' |
| 87 | + |
| 88 | +## ------------------------------------------------------------------------------------------------- |
| 89 | + def __init__( self, |
| 90 | + p_clusterer : ClusterAnalyzer, |
| 91 | + p_thrs_lower : float, |
| 92 | + p_thrs_upper : float, |
| 93 | + p_cls_drift : type = DriftCBSizeGeo, |
| 94 | + p_name : str = None, |
| 95 | + p_range_max = OAStreamTask.C_RANGE_THREAD, |
| 96 | + p_ada : bool = True, |
| 97 | + p_duplicate_data : bool = False, |
| 98 | + p_visualize : bool = False, |
| 99 | + p_logging=Log.C_LOG_ALL, |
| 100 | + p_drift_buffer_size : int = 100, |
| 101 | + p_thrs_inst : int = 0, |
| 102 | + p_thrs_clusters : int = 1 ): |
| 103 | + |
60 | 104 | super().__init__( p_clusterer = p_clusterer, |
61 | 105 | p_property = cprop_size_geo, |
62 | 106 | p_thrs_lower = p_thrs_lower, |
|
0 commit comments