You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+76-35Lines changed: 76 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,22 +65,23 @@ Frouros is a Python library for drift detection in machine learning systems that
65
65
66
66
### Concept drift
67
67
68
-
As a quick example, we can use the wine dataset to which concept drift it is induced in order to show the use of a concept drift detector like DDM (Drift Detection Method).
68
+
As a quick example, we can use the breast cancer dataset to which concept drift it is induced and show the use of a concept drift detector like DDM (Drift Detection Method). We can see how concept drift affects the performance in terms of accuracy.
69
69
70
70
```python
71
71
import numpy as np
72
-
from sklearn.datasets importload_wine
72
+
from sklearn.datasets importload_breast_cancer
73
73
from sklearn.linear_model import LogisticRegression
74
74
from sklearn.model_selection import train_test_split
75
75
from sklearn.pipeline import Pipeline
76
76
from sklearn.preprocessing import StandardScaler
77
77
78
78
from frouros.detectors.concept_drift importDDM, DDMConfig
79
+
from frouros.metrics import PrequentialError
79
80
80
81
np.random.seed(seed=31)
81
82
82
-
# Load wine dataset
83
-
X, y =load_wine(return_X_y=True)
83
+
# Load breast cancer dataset
84
+
X, y =load_breast_cancer(return_X_y=True)
84
85
85
86
# Split train (70%) and test (30%)
86
87
(
@@ -90,14 +91,6 @@ X, y = load_wine(return_X_y=True)
90
91
y_test,
91
92
) = train_test_split(X, y, train_size=0.7, random_state=31)
92
93
93
-
# IMPORTANT: Induce/simulate concept drift in the last part (20%)
94
-
# of y_test by modifying some labels (50% approx). Therefore, changing P(y|X))
0 commit comments