diff --git a/river/drift/adwin_c.pyx b/river/drift/adwin_c.pyx index 322859c780..889145481b 100644 --- a/river/drift/adwin_c.pyx +++ b/river/drift/adwin_c.pyx @@ -241,7 +241,7 @@ cdef class AdaptiveWindowing: break bucket = self.bucket_deque[idx] - for k in range(bucket.current_idx - 1): + for k in range(bucket.current_idx): n2 = self._calculate_bucket_size(idx) # length of window 2 u2 = bucket.get_total_at(k) # total of window 2 # Warning: means are calculated inside the loop to get updated values. @@ -307,6 +307,7 @@ cdef class AdaptiveWindowing: + (1.0 / (n1 - self.min_window_length + 1))) epsilon = (sqrt(2 * m_recip * self.variance_in_window * delta_prime) + 2 / 3 * delta_prime * m_recip) + return fabs(delta_mean) > epsilon diff --git a/river/drift/test_drift_detectors.py b/river/drift/test_drift_detectors.py index 665a3f4eb2..cff6f37c2f 100644 --- a/river/drift/test_drift_detectors.py +++ b/river/drift/test_drift_detectors.py @@ -28,7 +28,7 @@ def test_adwin(): - expected_indices = [1055] + expected_indices = [1023] detected_indices = perform_test(drift.ADWIN(), data_stream_1) assert detected_indices == expected_indices diff --git a/river/ensemble/streaming_random_patches.py b/river/ensemble/streaming_random_patches.py index ac4ee26b68..415b30be10 100644 --- a/river/ensemble/streaming_random_patches.py +++ b/river/ensemble/streaming_random_patches.py @@ -407,7 +407,7 @@ class SRPClassifier(BaseSRPEnsemble, base.Classifier): >>> metric = metrics.Accuracy() >>> evaluate.progressive_val_score(dataset, model, metric) - Accuracy: 71.97% + Accuracy: 72.17% Notes ----- diff --git a/river/forest/adaptive_random_forest.py b/river/forest/adaptive_random_forest.py index 6ec1bada2c..dd9a757f4d 100644 --- a/river/forest/adaptive_random_forest.py +++ b/river/forest/adaptive_random_forest.py @@ -565,7 +565,7 @@ class ARFClassifier(BaseForest, base.Classifier): >>> metric = metrics.Accuracy() >>> evaluate.progressive_val_score(dataset, model, metric) - Accuracy: 71.17% + Accuracy: 67.97% The total number of warnings and drifts detected, respectively >>> model.n_warnings_detected(), model.n_drifts_detected() @@ -849,7 +849,7 @@ class ARFRegressor(BaseForest, base.Regressor): >>> metric = metrics.MAE() >>> evaluate.progressive_val_score(dataset, model, metric) - MAE: 0.788619 + MAE: 0.772113 """ diff --git a/river/forest/online_extra_trees.py b/river/forest/online_extra_trees.py index a13707bdb0..ee361007eb 100644 --- a/river/forest/online_extra_trees.py +++ b/river/forest/online_extra_trees.py @@ -614,7 +614,7 @@ class OXTRegressor(ExtraTrees, base.Regressor): >>> metric = metrics.RMSE() >>> evaluate.progressive_val_score(dataset, model, metric) - RMSE: 3.127311 + RMSE: 3.16212 References ---------- diff --git a/river/imblearn/chebyshev.py b/river/imblearn/chebyshev.py index 5bc1a769bc..5c9c3baaf7 100644 --- a/river/imblearn/chebyshev.py +++ b/river/imblearn/chebyshev.py @@ -162,10 +162,10 @@ class ChebyshevOverSampler(base.Wrapper, base.Regressor): ... metrics.MAE(), ... print_every=500 ... ) - [500] MAE: 1.673902 - [1,000] MAE: 1.743046 - [1,001] MAE: 1.741335 - MAE: 1.741335 + [500] MAE: 1.629786 + [1,000] MAE: 1.663799 + [1,001] MAE: 1.66253 + MAE: 1.66253 References ---------- diff --git a/river/tree/hoeffding_adaptive_tree_regressor.py b/river/tree/hoeffding_adaptive_tree_regressor.py index 89aeae0d20..6c609cc8f4 100644 --- a/river/tree/hoeffding_adaptive_tree_regressor.py +++ b/river/tree/hoeffding_adaptive_tree_regressor.py @@ -140,7 +140,7 @@ class HoeffdingAdaptiveTreeRegressor(HoeffdingTreeRegressor): >>> metric = metrics.MAE() >>> evaluate.progressive_val_score(dataset, model, metric) - MAE: 0.823026 + MAE: 0.917576 """