Skip to content

Commit

Permalink
update nb
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrakenhoff committed Aug 14, 2024
1 parent 0f36e49 commit a358ad0
Showing 1 changed file with 113 additions and 112 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 27,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -439,219 +439,219 @@
" <tbody>\n",
" <tr>\n",
" <th>2015-06-27 14:30:41</th>\n",
" <td>99.0</td>\n",
" <td>99</td>\n",
" <td>-2</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2012-09-24 15:00:00</th>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>-2</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2016-12-23 10:00:00</th>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>-2</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2016-12-23 11:00:00</th>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>-2</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2016-12-23 12:00:00</th>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>-2</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2016-12-23 13:00:00</th>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>-2</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2016-12-23 14:00:00</th>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>-2</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2016-12-23 15:00:00</th>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>-2</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2016-12-23 16:00:00</th>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>-2</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2016-12-23 17:00:00</th>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>-2</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2016-12-23 18:00:00</th>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>-2</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2016-12-23 19:00:00</th>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>-2</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2016-12-23 20:00:00</th>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>-2</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2016-12-23 21:00:00</th>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>-2</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2016-12-23 22:00:00</th>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>-2</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2016-12-23 23:00:00</th>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>-2</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2016-12-24 00:00:00</th>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>-2</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2016-12-24 01:00:00</th>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>-2</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2016-12-24 02:00:00</th>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>-2</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2016-12-24 03:00:00</th>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>-2</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2016-12-24 04:00:00</th>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>-2</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2016-12-24 05:00:00</th>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>-2</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2016-12-24 06:00:00</th>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>-2</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2016-12-24 07:00:00</th>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>-2</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2016-12-24 08:00:00</th>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>-2</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" spikes dry hardmax combine\n",
"2015-06-27 14:30:41 99.0 -2 NaN NaN\n",
"2012-09-24 15:00:00 NaN -2 NaN NaN\n",
"2016-12-23 10:00:00 NaN -2 NaN NaN\n",
"2016-12-23 11:00:00 NaN -2 NaN NaN\n",
"2016-12-23 12:00:00 NaN -2 NaN NaN\n",
"2016-12-23 13:00:00 NaN -2 NaN NaN\n",
"2016-12-23 14:00:00 NaN -2 NaN NaN\n",
"2016-12-23 15:00:00 NaN -2 NaN NaN\n",
"2016-12-23 16:00:00 NaN -2 NaN NaN\n",
"2016-12-23 17:00:00 NaN -2 NaN NaN\n",
"2016-12-23 18:00:00 NaN -2 NaN NaN\n",
"2016-12-23 19:00:00 NaN -2 NaN NaN\n",
"2016-12-23 20:00:00 NaN -2 NaN NaN\n",
"2016-12-23 21:00:00 NaN -2 NaN NaN\n",
"2016-12-23 22:00:00 NaN -2 NaN NaN\n",
"2016-12-23 23:00:00 NaN -2 NaN NaN\n",
"2016-12-24 00:00:00 NaN -2 NaN NaN\n",
"2016-12-24 01:00:00 NaN -2 NaN NaN\n",
"2016-12-24 02:00:00 NaN -2 NaN NaN\n",
"2016-12-24 03:00:00 NaN -2 NaN NaN\n",
"2016-12-24 04:00:00 NaN -2 NaN NaN\n",
"2016-12-24 05:00:00 NaN -2 NaN NaN\n",
"2016-12-24 06:00:00 NaN -2 NaN NaN\n",
"2016-12-24 07:00:00 NaN -2 NaN NaN\n",
"2016-12-24 08:00:00 NaN -2 NaN NaN"
" spikes dry hardmax combine\n",
"2015-06-27 14:30:41 99 -2 0 0\n",
"2012-09-24 15:00:00 0 -2 0 0\n",
"2016-12-23 10:00:00 0 -2 0 0\n",
"2016-12-23 11:00:00 0 -2 0 0\n",
"2016-12-23 12:00:00 0 -2 0 0\n",
"2016-12-23 13:00:00 0 -2 0 0\n",
"2016-12-23 14:00:00 0 -2 0 0\n",
"2016-12-23 15:00:00 0 -2 0 0\n",
"2016-12-23 16:00:00 0 -2 0 0\n",
"2016-12-23 17:00:00 0 -2 0 0\n",
"2016-12-23 18:00:00 0 -2 0 0\n",
"2016-12-23 19:00:00 0 -2 0 0\n",
"2016-12-23 20:00:00 0 -2 0 0\n",
"2016-12-23 21:00:00 0 -2 0 0\n",
"2016-12-23 22:00:00 0 -2 0 0\n",
"2016-12-23 23:00:00 0 -2 0 0\n",
"2016-12-24 00:00:00 0 -2 0 0\n",
"2016-12-24 01:00:00 0 -2 0 0\n",
"2016-12-24 02:00:00 0 -2 0 0\n",
"2016-12-24 03:00:00 0 -2 0 0\n",
"2016-12-24 04:00:00 0 -2 0 0\n",
"2016-12-24 05:00:00 0 -2 0 0\n",
"2016-12-24 06:00:00 0 -2 0 0\n",
"2016-12-24 07:00:00 0 -2 0 0\n",
"2016-12-24 08:00:00 0 -2 0 0"
]
},
"execution_count": 12,
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"corrections = detector.get_corrections_dataframe()\n",
"corrections = detector.get_corrections_dataframe(as_correction_codes=True)\n",
"corrections"
]
},
Expand All @@ -674,9 +674,10 @@
"text/plain": [
"[<CorrectionCode.NO_CORRECTION: 0>,\n",
" <CorrectionCode.BELOW_THRESHOLD: -2>,\n",
" <CorrectionCode.ABOVE_THRESHOLD: 2>,\n",
" <CorrectionCode.EQUAL_VALUE: 1>,\n",
" <CorrectionCode.NOT_EQUAL_VALUE: -1>,\n",
" <CorrectionCode.EQUAL_VALUE: 1>,\n",
" <CorrectionCode.ABOVE_THRESHOLD: 2>,\n",
" <CorrectionCode.MODIFIED_VALUE: 4>,\n",
" <CorrectionCode.UNKNOWN_COMPARISON_VALUE: 99>]"
]
},
Expand Down Expand Up @@ -990,10 +991,10 @@
{
"data": {
"text/plain": [
"{1: <traval.ts_comparison.SeriesComparisonRelative at 0x72fa510d18a0>,\n",
" 2: <traval.ts_comparison.SeriesComparisonRelative at 0x72fa510d0e50>,\n",
" 3: <traval.ts_comparison.SeriesComparisonRelative at 0x72fa50f000d0>,\n",
" 4: <traval.ts_comparison.SeriesComparisonRelative at 0x72fa50f02200>}"
"{1: <traval.ts_comparison.SeriesComparisonRelative at 0x7fc95e7b9a80>,\n",
" 2: <traval.ts_comparison.SeriesComparisonRelative at 0x7fc95e7b90f0>,\n",
" 3: <traval.ts_comparison.SeriesComparisonRelative at 0x7fc95e7d4040>,\n",
" 4: <traval.ts_comparison.SeriesComparisonRelative at 0x7fc95e7d64a0>}"
]
},
"execution_count": 16,
Expand Down Expand Up @@ -1102,7 +1103,7 @@
"output_type": "stream",
"text": [
"\u001b[0;31mType:\u001b[0m BinaryClassifier\n",
"\u001b[0;31mString form:\u001b[0m <traval.binary_classifier.BinaryClassifier object at 0x72fa50f03ca0>\n",
"\u001b[0;31mString form:\u001b[0m <traval.binary_classifier.BinaryClassifier object at 0x7fc95e7d7f40>\n",
"\u001b[0;31mFile:\u001b[0m ~/github/traval/traval/binary_classifier.py\n",
"\u001b[0;31mDocstring:\u001b[0m Class for calculating binary classification statistics.\n",
"\u001b[0;31mInit docstring:\u001b[0m\n",
Expand Down Expand Up @@ -1273,7 +1274,7 @@
"output_type": "stream",
"text": [
"\u001b[0;31mType:\u001b[0m property\n",
"\u001b[0;31mString form:\u001b[0m <property object at 0x72fa5d52b970>\n",
"\u001b[0;31mString form:\u001b[0m <property object at 0x7fc96adbb920>\n",
"\u001b[0;31mDocstring:\u001b[0m \n",
"Specificity or True Negative Rate.\n",
"\n",
Expand Down

0 comments on commit a358ad0

Please sign in to comment.