|
4 | 4 | "cell_type": "code", |
5 | 5 | "execution_count": 1, |
6 | 6 | "metadata": { |
7 | | - "collapsed": true |
| 7 | + "collapsed": true, |
| 8 | + "ExecuteTime": { |
| 9 | + "end_time": "2023-08-03T10:26:13.216424950Z", |
| 10 | + "start_time": "2023-08-03T10:26:12.464032816Z" |
| 11 | + } |
8 | 12 | }, |
9 | 13 | "outputs": [], |
10 | 14 | "source": [ |
|
43 | 47 | "name": "stderr", |
44 | 48 | "output_type": "stream", |
45 | 49 | "text": [ |
46 | | - "INFO:frouros:Trying to download data from https://nextcloud.ifca.es/index.php/s/2coqgBEpa82boLS/download to /tmp/tmpagpyvswq\n" |
| 50 | + "INFO:frouros:Trying to download data from https://nextcloud.ifca.es/index.php/s/2coqgBEpa82boLS/download to /tmp/tmpvrhnah8i\n" |
47 | 51 | ] |
48 | 52 | } |
49 | 53 | ], |
|
59 | 63 | "X_ref, y_ref, X_test, y_test = X[:split_idx], y[:split_idx].ravel(), X[split_idx:], y[split_idx:]" |
60 | 64 | ], |
61 | 65 | "metadata": { |
62 | | - "collapsed": false |
| 66 | + "collapsed": false, |
| 67 | + "ExecuteTime": { |
| 68 | + "end_time": "2023-08-03T10:26:14.629676415Z", |
| 69 | + "start_time": "2023-08-03T10:26:13.219694293Z" |
| 70 | + } |
63 | 71 | } |
64 | 72 | }, |
65 | 73 | { |
|
90 | 98 | "pipeline.fit(X=X_ref, y=y_ref)" |
91 | 99 | ], |
92 | 100 | "metadata": { |
93 | | - "collapsed": false |
| 101 | + "collapsed": false, |
| 102 | + "ExecuteTime": { |
| 103 | + "end_time": "2023-08-03T10:26:14.746515595Z", |
| 104 | + "start_time": "2023-08-03T10:26:14.631972871Z" |
| 105 | + } |
94 | 106 | } |
95 | 107 | }, |
96 | 108 | { |
|
105 | 117 | "detector = DDM(config=config)" |
106 | 118 | ], |
107 | 119 | "metadata": { |
108 | | - "collapsed": false |
| 120 | + "collapsed": false, |
| 121 | + "ExecuteTime": { |
| 122 | + "end_time": "2023-08-03T10:26:14.767517723Z", |
| 123 | + "start_time": "2023-08-03T10:26:14.717692323Z" |
| 124 | + } |
109 | 125 | } |
110 | 126 | }, |
111 | 127 | { |
|
132 | 148 | "source": [ |
133 | 149 | "for i, (X, y) in enumerate(zip(X_test, y_test)):\n", |
134 | 150 | " y_pred = pipeline.predict(X.reshape(1, -1))\n", |
135 | | - " error = 1 - int(y_pred == y)\n", |
| 151 | + " error = 1 - (y_pred.item() == y.item())\n", |
136 | 152 | " detector.update(value=error)\n", |
137 | 153 | " status = detector.status\n", |
138 | 154 | " if status[\"drift\"]:\n", |
139 | 155 | " print(f\"Drift detected at index {i}\")\n", |
140 | 156 | " break" |
141 | 157 | ], |
142 | 158 | "metadata": { |
143 | | - "collapsed": false |
| 159 | + "collapsed": false, |
| 160 | + "ExecuteTime": { |
| 161 | + "end_time": "2023-08-03T10:26:15.090283773Z", |
| 162 | + "start_time": "2023-08-03T10:26:14.762080041Z" |
| 163 | + } |
144 | 164 | } |
145 | 165 | }, |
146 | 166 | { |
|
0 commit comments