Skip to content

Commit

Permalink
Fix imports in tutorial notebooks, and model report desc
Browse files Browse the repository at this point in the history
  • Loading branch information
amrit110 committed Nov 14, 2023
1 parent c510b4a commit 8dec4a8
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 23 deletions.
18 changes: 10 additions & 8 deletions docs/source/tutorials/kaggle/heart_failure_prediction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -49,25 +49,27 @@
"from cyclops.report import ModelCardReport\n",
"from cyclops.report.plot.classification import ClassificationPlotter\n",
"from cyclops.report.utils import flatten_results_dict\n",
"from cyclops.tasks.mortality_prediction import MortalityPredictionTask\n",
"from cyclops.tasks import BinaryTabularClassificationTask\n",
"from cyclops.utils.file import join, load_dataframe"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"CyclOps offers a package for documentation of the model through a model card. The `ModelCardReport` class is used to populate and generate the model card as an HTML file. The model card has the following sections:\n",
"CyclOps offers a package for documentation of the model through a model report. The `ModelCardReport` class is used to populate and generate the model report as an HTML file. The model report has the following sections:\n",
"\n",
"- Overview: Provides a high level overview of how the model is doing (a quick glance of important metrics), and how it is doing over time (performance over several metrics and subgroups over time).\n",
"- Datasets: High level statistics of the training data, including changes in distribution over time.\n",
"- Quantitative Analysis: This section contains additional detailed performance metrics of the model for different sets of the data and subpopulations.\n",
"- Fairness Analysis: This section contains the fairness metrics of the model.\n",
"- Model Details: This section contains descriptive metadata about the model such as the owners, version, license, etc.\n",
"- Model Parameters: This section contains the technical details of the model such as the model architecture, training parameters, etc.\n",
"- Considerations: This section contains descriptions of the considerations involved in developing and using the model such as the intended use, limitations, etc.\n",
"- Quantitative Analysis: This section contains the performance metrics of the model for different sets of the data and subpopulations.\n",
"- Explainaibility Analysis: This section contains the explainability metrics of the model.\n",
"- Fairness Analysis: This section contains the fairness metrics of the model.\n",
"\n",
"We will use this to document the model development process as we go along and generate the model card at the end.\n",
"We will use this to document the model development process as we go along and generate the model report at the end.\n",
"\n",
"`The model card tool is a work in progress and is subject to change.`"
"`The model report tool is a work in progress and is subject to change.`"
]
},
{
Expand Down Expand Up @@ -579,7 +581,7 @@
},
"outputs": [],
"source": [
"mortality_task = MortalityPredictionTask(\n",
"mortality_task = BinaryTabularClassificationTask(\n",
" {model_name: model},\n",
" task_features=features_list,\n",
" task_target=\"outcome\",\n",
Expand Down
17 changes: 10 additions & 7 deletions docs/source/tutorials/nihcxr/cxr_classification.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,19 @@
"id": "198896c7",
"metadata": {},
"source": [
"CyclOps offers a package for documentation of the model through a model card. The `ModelCardReport` class is used to populate and generate the model card as an HTML file. The model card has the following sections:\n",
"CyclOps offers a package for documentation of the model through a model report. The `ModelCardReport` class is used to populate and generate the model report as an HTML file. The model report has the following sections:\n",
"\n",
"- Overview: Provides a high level overview of how the model is doing (a quick glance of important metrics), and how it is doing over time (performance over several metrics and subgroups over time).\n",
"- Datasets: High level statistics of the training data, including changes in distribution over time.\n",
"- Quantitative Analysis: This section contains additional detailed performance metrics of the model for different sets of the data and subpopulations.\n",
"- Fairness Analysis: This section contains the fairness metrics of the model.\n",
"- Model Details: This section contains descriptive metadata about the model such as the owners, version, license, etc.\n",
"- Model Parameters: This section contains the technical details of the model such as the model architecture, training parameters, etc.\n",
"- Considerations: This section contains descriptions of the considerations involved in developing and using the model such as the intended use, limitations, etc.\n",
"- Quantitative Analysis: This section contains the performance metrics of the model for different sets of the data and subpopulations.\n",
"- Explainaibility Analysis: This section contains the explainability metrics of the model.\n",
"- Fairness Analysis: This section contains the fairness metrics of the model.\n",
"\n",
"We will use this to document the model development process as we go along and generate the model card at the end.\n",
"We will use this to document the model development process as we go along and generate the model report at the end.\n",
"\n",
"`The model card tool is a work in progress and is subject to change.`"
"`The model report tool is a work in progress and is subject to change.`"
]
},
{
Expand Down Expand Up @@ -153,7 +155,7 @@
"id": "c7c9172a",
"metadata": {},
"source": [
"### Load Model and get Predictions"
"## Model Creation"
]
},
{
Expand All @@ -164,6 +166,7 @@
"outputs": [],
"source": [
"model = PTModel(DenseNet(weights=\"densenet121-res224-nih\"))\n",
"\n",
"model.initialize()\n",
"nih_ds = model.predict(\n",
" nih_ds,\n",
Expand Down
18 changes: 10 additions & 8 deletions docs/source/tutorials/synthea/los_prediction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -60,25 +60,27 @@
"from cyclops.report import ModelCardReport\n",
"from cyclops.report.plot.classification import ClassificationPlotter\n",
"from cyclops.report.utils import flatten_results_dict\n",
"from cyclops.tasks.mortality_prediction import MortalityPredictionTask"
"from cyclops.tasks import BinaryTabularClassificationTask"
]
},
{
"cell_type": "markdown",
"id": "a0c35352-ccef-47c9-8d1a-3062c62adb97",
"metadata": {},
"source": [
"CyclOps offers a package for documentation of the model through a model card. The `ModelCardReport` class is used to populate and generate the model card as an HTML file. The model card has the following sections:\n",
"CyclOps offers a package for documentation of the model through a model report. The `ModelCardReport` class is used to populate and generate the model report as an HTML file. The model report has the following sections:\n",
"\n",
"- Overview: Provides a high level overview of how the model is doing (a quick glance of important metrics), and how it is doing over time (performance over several metrics and subgroups over time).\n",
"- Datasets: High level statistics of the training data, including changes in distribution over time.\n",
"- Quantitative Analysis: This section contains additional detailed performance metrics of the model for different sets of the data and subpopulations.\n",
"- Fairness Analysis: This section contains the fairness metrics of the model.\n",
"- Model Details: This section contains descriptive metadata about the model such as the owners, version, license, etc.\n",
"- Model Parameters: This section contains the technical details of the model such as the model architecture, training parameters, etc.\n",
"- Considerations: This section contains descriptions of the considerations involved in developing and using the model such as the intended use, limitations, etc.\n",
"- Quantitative Analysis: This section contains the performance metrics of the model for different sets of the data and subpopulations.\n",
"- Explainaibility Analysis: This section contains the explainability metrics of the model.\n",
"- Fairness Analysis: This section contains the fairness metrics of the model.\n",
"\n",
"We will use this to document the model development process as we go along and generate the model card at the end.\n",
"We will use this to document the model development process as we go along and generate the model report at the end.\n",
"\n",
"`The model card tool is a work in progress and is subject to change.`"
"`The model report tool is a work in progress and is subject to change.`"
]
},
{
Expand Down Expand Up @@ -808,7 +810,7 @@
},
"outputs": [],
"source": [
"los_task = MortalityPredictionTask(\n",
"los_task = BinaryTabularClassificationTask(\n",
" {model_name: model},\n",
" task_features=features_list,\n",
" task_target=\"outcome\",\n",
Expand Down

0 comments on commit 8dec4a8

Please sign in to comment.