credibility.report¶
The outputs of a credibility assessment: the record, the tables and the report.
write_outputs writes an assessment into a directory of its own:
credibility.json: the assessment, seeCredibilityAssessment.to_json.contexts.tsv: one row per context of use with its level, influence, consequence, risk, verdict, the decisive and the evaluable points, the minimum of evaluable points, the uncovered quantities, whether it is verified and per acceptance rule, of the context and of the evidence extensions, its value (<name>) and limit (<name>_limit).evidence.tsv: one row per context of use and evidence and per limitation (the limitations of the model with the context""): the role, the points (n), mappings and studies, GMFE, AFE and the criteria.domain.tsv: one row per context of use, field and value of the domain: whether it is claimed, its coverage and its points (n).quantities.tsv: one row per context of use and quantity of interest: its description, whether it is a ratio, its coverage and its points.verification.tsv: one row per context of use and check of the verification, empty if the assessment was not verified: the factor, the compared points (n), the largest relative difference and its point, whether the acceptance changed, whether the check passed and its problems; the checks of the battery are rows of every context of use.uncertainty.tsv: one row per context of use and acceptance rule over the parameter draws of the adopted fits, empty without the propagation: the probability that the rule is met with its anytime-valid sequence, the decision of the statement at the threshold, the draws and the failed and needed draws.uncertainty_quantities.tsv: one row per context of use and quantity of interest which is no ratio: the points, the median fold width of the prediction bands and their coverage of the observations.uncertainty_sensitivity.tsv: one row per context of use, target (a quantity or a rule) and fitted parameter: the first-order index of the target over the parameter draws.variability.tsv: one row per context of use with the predictive check of its decisive points with the declared variability of the subjects, empty without: the subjects, the parameter vectors, the points and the means of groups, the coverage with its Wilson interval, the expected coverage and the agreement.variability_quantities.tsv: one row per context of use and quantity of interest which is no ratio: the points with a band and their coverage.vpc.tsv: one row per data point of the adopted fits with the band of its predictive check, empty without: the subjects of the observation, the statistic, the typical prediction, the quantiles and whether it is inside.cross_validation.tsv: one row per cross-validated adopted fit and held-out study: its points, the GMFE and the share within 2-fold of the held-out and of the fitted predictions, the cost of the refit.battery.tsv: one row per check of the battery of the variants, empty if it did not run: the factor, the status, the cases, the largest deviation and where, the statement and the problems.- the tables of the evidence extensions (
EvidenceExtension.report_tables) and of the battery hook (BatteryHook.report_tables),<name>.tsv. index.html: the report (render_html), which extendsreport_base.htmlofsbmlsim.report.templatesand loads nothing from the network.
print_summary prints the table of the contexts of use, their verdicts, the
role of the evidence which decides them and the evaluable points with their
minimum, and how many of them are verified.
contexts_table
¶
Get one row per context of use with the values and limits of its rules.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
assessment
|
CredibilityAssessment
|
the assessment. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
The columns |
DataFrame
|
|
DataFrame
|
|
DataFrame
|
|
DataFrame
|
acceptance rule, the rules of the extensions included, |
DataFrame
|
|
evidence_table
¶
Get one row per evidence of a context of use and per limitation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
assessment
|
CredibilityAssessment
|
the assessment. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
The columns |
DataFrame
|
|
DataFrame
|
|
DataFrame
|
the criteria and the values of the acceptance rules of the context, |
DataFrame
|
empty if not evaluable. |
domain_table
¶
Get one row per context of use, field and value of its domain.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
assessment
|
CredibilityAssessment
|
the assessment. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
The columns |
DataFrame
|
for a value outside the claim) and |
DataFrame
|
|
quantities_table
¶
Get one row per context of use and quantity of interest.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
assessment
|
CredibilityAssessment
|
the assessment. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
The columns |
DataFrame
|
(empty for a ratio without a pairing) and |
DataFrame
|
|
verification_table
¶
Get one row per context of use and check of the verification.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
assessment
|
CredibilityAssessment
|
the assessment. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
The columns of |
DataFrame
|
joined by |
uncertainty_table
¶
Get one row per context of use and rule over the parameter draws.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
assessment
|
CredibilityAssessment
|
the assessment. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
The columns of |
DataFrame
|
without the propagation. |
uncertainty_quantities_table
¶
Get one row per context of use and quantity with its prediction band.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
assessment
|
CredibilityAssessment
|
the assessment. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
The columns of |
DataFrame
|
rows without the propagation. |
sensitivity_table
¶
Get one row per context of use, target and parameter of the draws.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
assessment
|
CredibilityAssessment
|
the assessment. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
The columns of |
DataFrame
|
without the propagation. |
variability_table
¶
Get one row per context of use with its predictive check.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
assessment
|
CredibilityAssessment
|
the assessment. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
The columns of |
DataFrame
|
targets of the subjects and between the studies as `target |
DataFrame
|
distribution |
variability_quantities_table
¶
Get one row per context of use and quantity of its predictive check.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
assessment
|
CredibilityAssessment
|
the assessment. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
The columns |
DataFrame
|
without the predictive check. |
vpc_table
¶
Get one row per data point of the adopted fits with its band.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
assessment
|
CredibilityAssessment
|
the assessment. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
The columns of |
DataFrame
|
predictive check. |
cross_validation_table
¶
Get one row per cross-validated fit and held-out study.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
assessment
|
CredibilityAssessment
|
the assessment. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
The columns |
DataFrame
|
without a cross-validation. |
battery_table
¶
Get one row per check of the battery of the variants of the model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
assessment
|
CredibilityAssessment
|
the assessment. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
The columns of |
DataFrame
|
joined by |
render_html
¶
Render the report of an assessment.
The template credibility.html of sbmlsim extends report_base.html. The
sections: the overview (the contexts of use and the limitations of the
model), one card per context of use, the limitations, the unclaimed
validation data, the verification, the cross-validation, the sections of
the extensions and the provenance. The blocks of an extension in the card
of a context follow the block of the core they name
(EvidenceExtension.context_report_blocks); without extensions the report
shows the core alone.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
assessment
|
CredibilityAssessment
|
the assessment. |
required |
extensions
|
Sequence[EvidenceExtension]
|
the evidence extensions of the project, in their order. |
()
|
hook
|
BatteryHook | None
|
the battery hook of the project, whose HTML follows the table of the battery. |
None
|
Returns:
| Type | Description |
|---|---|
str
|
The HTML of the report. |
write_outputs
¶
Write the record, the tables and the report of an assessment.
A directory of the outputs is replaced as a whole, so no file of an earlier
assessment is left; a directory is one when it holds credibility.json.
The outputs are rendered before anything is removed. The entries of the
directory are removed and the directory itself is kept: windows refuses
to remove or rename a directory which a process has open, e.g. as its
working directory or in an explorer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
assessment
|
CredibilityAssessment
|
the assessment. |
required |
output_dir
|
Path
|
the directory, created if missing. |
required |
extensions
|
Sequence[EvidenceExtension]
|
the evidence extensions of the project, whose tables and blocks the outputs have. |
()
|
hook
|
BatteryHook | None
|
the battery hook of the project. |
None
|
Returns:
| Type | Description |
|---|---|
Path
|
The directory. |
Raises:
| Type | Description |
|---|---|
FileExistsError
|
if |
ValueError
|
if a table of an extension takes the name of another output. |
print_summary
¶
Print the contexts of use and their verdicts on the console of sbmlsim.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
assessment
|
CredibilityAssessment
|
the assessment. |
required |