|
1 | 1 | { |
2 | 2 | "cells": [ |
| 3 | + { |
| 4 | + "cell_type": "markdown", |
| 5 | + "metadata": {}, |
| 6 | + "source": [ |
| 7 | + "# Report Generation for Heart Failure Prediction\n", |
| 8 | + "Here's an example to demonstrate how we can generate a report as we proceed through all the steps to train and evaluate a model. For this purpose, we are going to use Kaggle's heart prediction failure dataset and gradually populate the report with information about dataset, model and results." |
| 9 | + ] |
| 10 | + }, |
3 | 11 | { |
4 | 12 | "cell_type": "code", |
5 | 13 | "execution_count": null, |
6 | 14 | "metadata": {}, |
7 | 15 | "outputs": [], |
8 | 16 | "source": [ |
| 17 | + "\"\"\"Imports.\"\"\"\n", |
| 18 | + "\n", |
9 | 19 | "import copy\n", |
10 | 20 | "import inspect\n", |
11 | 21 | "import os\n", |
|
23 | 33 | "from tqdm import tqdm\n", |
24 | 34 | "\n", |
25 | 35 | "from cyclops.data.slicer import SliceSpec\n", |
| 36 | + "from cyclops.evaluate import evaluator\n", |
26 | 37 | "from cyclops.evaluate.metrics import create_metric\n", |
27 | 38 | "from cyclops.evaluate.metrics.experimental.metric_dict import MetricDict\n", |
28 | 39 | "from cyclops.report import ModelCardReport\n", |
29 | 40 | "from cyclops.report.plot.classification import ClassificationPlotter\n", |
30 | 41 | "from cyclops.report.utils import flatten_results_dict" |
31 | 42 | ] |
32 | 43 | }, |
33 | | - { |
34 | | - "cell_type": "markdown", |
35 | | - "metadata": {}, |
36 | | - "source": [ |
37 | | - "# Report Generation for Heart Failure Prediction\n", |
38 | | - "Here's an example to demonstrate how we can generate a report as we proceed through all the steps to train and evaluate a model. For this purpose, we are going to use Kaggle's heart prediction failure dataset and gradually populate the report with information about dataset, model and results." |
39 | | - ] |
40 | | - }, |
41 | 44 | { |
42 | 45 | "cell_type": "markdown", |
43 | 46 | "metadata": {}, |
|
105 | 108 | "metadata": {}, |
106 | 109 | "outputs": [], |
107 | 110 | "source": [ |
108 | | - "df.describe().T" |
| 111 | + "print(df.describe().T)" |
109 | 112 | ] |
110 | 113 | }, |
111 | 114 | { |
|
531 | 534 | "metadata": {}, |
532 | 535 | "outputs": [], |
533 | 536 | "source": [ |
534 | | - "from cyclops.evaluate import evaluator\n", |
535 | | - "\n", |
536 | | - "\n", |
537 | 537 | "# Create Dataset object\n", |
538 | 538 | "heart_failure_data = Dataset.from_pandas(df_test)\n", |
539 | 539 | "\n", |
|
557 | 557 | ")" |
558 | 558 | ] |
559 | 559 | }, |
560 | | - { |
561 | | - "cell_type": "code", |
562 | | - "execution_count": null, |
563 | | - "metadata": {}, |
564 | | - "outputs": [], |
565 | | - "source": [ |
566 | | - "result" |
567 | | - ] |
568 | | - }, |
569 | | - { |
570 | | - "cell_type": "code", |
571 | | - "execution_count": null, |
572 | | - "metadata": {}, |
573 | | - "outputs": [], |
574 | | - "source": [ |
575 | | - "results_flat" |
576 | | - ] |
577 | | - }, |
578 | 560 | { |
579 | 561 | "cell_type": "markdown", |
580 | 562 | "metadata": {}, |
|
878 | 860 | ], |
879 | 861 | "metadata": { |
880 | 862 | "kernelspec": { |
881 | | - "display_name": "cyclops", |
| 863 | + "display_name": "Python 3 (ipykernel)", |
882 | 864 | "language": "python", |
883 | 865 | "name": "python3" |
884 | 866 | }, |
|
892 | 874 | "name": "python", |
893 | 875 | "nbconvert_exporter": "python", |
894 | 876 | "pygments_lexer": "ipython3", |
895 | | - "version": "3.10.11" |
| 877 | + "version": "3.10.12" |
896 | 878 | } |
897 | 879 | }, |
898 | 880 | "nbformat": 4, |
899 | | - "nbformat_minor": 2 |
| 881 | + "nbformat_minor": 4 |
900 | 882 | } |
0 commit comments