Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

start: correct plots configuration #5224

Merged
merged 3 commits into from
Apr 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 26 additions & 21 deletions content/docs/start/data-pipelines/metrics-parameters-plots.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,32 +70,37 @@ customize them by editing `dvc.yaml` to combine train and test plots.
### 💡 Expand to see how to customize metrics and plots

To combine train and test data, and to set other custom attributes like titles,
we add the following to `dvc.yaml`:
first disable DVCLive's default configuration by opening `src/evaluate.py`,
finding `with Live(EVAL_PATH) as live:`, and modifying it to
`with Live(EVAL_PATH, dvcyaml=False) as live:`. Then add the following custom
configuration to `dvc.yaml`:

<!-- prettier-ignore-start -->
```yaml
metrics:
- eval/metrics.json
- eval/metrics.json
plots:
- ROC:
template: simple
x: fpr
y:
eval/plots/sklearn/roc/train.json: tpr
eval/plots/sklearn/roc/test.json: tpr
- Confusion-Matrix:
template: confusion
x: actual
y:
eval/plots/sklearn/cm/train.json: predicted
eval/plots/sklearn/cm/test.json: predicted
- Precision-Recall:
template: simple
x: recall
y:
eval/prc/train.json: precision
eval/prc/test.json: precision
- eval/importance.png
- ROC:
template: simple
x: fpr
y:
eval/plots/sklearn/roc/train.json: tpr
eval/plots/sklearn/roc/test.json: tpr
- Confusion-Matrix:
template: confusion
x: actual
y:
eval/plots/sklearn/cm/train.json: predicted
eval/plots/sklearn/cm/test.json: predicted
- Precision-Recall:
template: simple
x: recall
y:
eval/plots/sklearn/prc/train.json: precision
eval/plots/sklearn/prc/test.json: precision
- eval/plots/images/importance.png
```
<!-- prettier-ignore-end -->

This flexibility to define your own metrics and plots configuration means that
you can even [generate your own] metrics and plots data without using DVCLive!
Expand Down
Loading