Advanced output set
See also: Advanced output set component handles, Services.
AdvancedOutputSet
An advanced output set stored in your Jinkō project.
An advanced output set defines how a virtual population is scored against clinical trial data. It groups three kinds of components:
- Constraints — boolean expressions that a patient must satisfy to be
included (e.g.
"age > 18"). - Scalars — numeric formulas computed from the simulation output
(e.g.
"AUC_drug"). - Objectives — range-based scoring rules applied to a scalar, each weighted to contribute to an overall score.
Access components through the components property::
sd = client.advanced_output_sets.get("sd-abc123")
for c in sd.components.list():
print(c.id, type(c).__name__)
Rename or describe the design with the methods inherited from
ProjectItem (rename(), set_description(), etc.).
Returned by: JinkoClient.create_advanced_output_set, JinkoClient.create_advanced_output_set_from_json, JinkoClient.get_advanced_output_set, JinkoClient.iter_advanced_output_sets, JinkoClient.list_advanced_output_sets, Trial.advanced_output_set
Also has every member of ProjectItem.
| Member | Kind | Description |
|---|---|---|
components | property | Access the components (constraints, scalars, objectives) of this advanced output set. |
diagnostics | property | All component diagnostics for the current scoring design head. |
diagnostics_at | method | Return diagnostics for a specific snapshot revision. |
summary | method | Return a high-level summary of this advanced output set's current snapshot. |
tags | property | |
get_tag | method | |
create_tag | method | |
delete_tag | method | |
show_objective_preview | method | Display an interactive preview for one objective component. |
edit | method | Apply a low-level edit to this advanced output set using a raw payload dict. |
components
Type: AdvancedOutputSetComponentsService
Access the components (constraints, scalars, objectives) of this advanced output set.
Returns a service object that lets you list, retrieve, add, and modify the individual components. Example::
sd.components.list() # all components
sd.components.list_constraints() # constraints only
sd.components.add_scalar("auc", formula="AUC_drug", unit="mg/L*h")
diagnostics
Type: AdvancedOutputSetDiagnostics
All component diagnostics for the current scoring design head.
Each access fetches a fresh, self-consistent view: diagnostic
messages and their components come from the same fetch, so
.explain() (which shows each component's expression/formula) also
reflects that same fetch. Filters can be chained without any further
request::
sd.diagnostics.errors()
sd.diagnostics.for_kind("Objective").warnings()
sd.diagnostics.errors().explain()
Re-access this property for updated results. For a historical
revision use diagnostics_at.
diagnostics_at
diagnostics_at(revision: int) -> AdvancedOutputSetDiagnostics
Return diagnostics for a specific snapshot revision.
See diagnostics for the freshness contract of the returned view.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
revision | int | The revision number to fetch diagnostics from. |
Returns:
AdvancedOutputSetDiagnostics: class:AdvancedOutputSetDiagnosticsview for that snapshot.
summary
summary() -> Any
Return a high-level summary of this advanced output set's current snapshot.
tags
Type: list['AdvancedOutputSetTag']
get_tag
get_tag(tag_id: str) -> AdvancedOutputSetTag
create_tag
create_tag(
tag_id: str,
*,
description: str | None = None,
color: str = "#232349",
version: str | dict | None = None
) -> AdvancedOutputSetTag
delete_tag
delete_tag(tag: str | 'AdvancedOutputSetTag, force: bool = False) -> None
show_objective_preview
show_objective_preview(objective_id: str) -> None
Display an interactive preview for one objective component.
Renders the objective's scoring formula and its score-vs-value curve
inline in a Jupyter notebook (requires IPython and matplotlib).
Falls back to plain-text output in non-notebook environments.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
objective_id | str | The user-defined id of the objective component to preview (e.g. "obj_exposure"). |
Raises:
NotFoundError: If no objective with thatidexists in this advanced output set.
edit
edit(
payload: dict[str, Any],
*,
name: str | None = None,
description: str | None = None,
version: str | dict | None = None
) -> Any
Apply a low-level edit to this advanced output set using a raw payload dict.
This is an advanced escape hatch for edits that are not yet covered by
the higher-level component helpers (components.add_constraint(),
components.add_scalar(), etc.). The payload is sent directly
to the Jinkō platform without additional validation.
Prefer the typed components methods whenever possible.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
payload | dict[str, Any] | A dict matching the scoring-design edit schema expected by the platform. | |
name | str | None | Optional new name to assign to the resulting version. | None |
description | str | None | Optional new description for the resulting version. | None |
version | str | dict | None | Optional label for the new snapshot created by this edit (e.g. "add auc objective"). Can also be a dict with the keys name and description to set a version description. | None |
AdvancedOutputSetTag
Returned by: AdvancedOutputSet.create_tag, AdvancedOutputSet.get_tag, AdvancedOutputSet.tags, AdvancedOutputSetComponentHandle.tags, AdvancedOutputSetTag.refresh, AdvancedOutputSetTag.set_color, AdvancedOutputSetTag.set_description, AdvancedOutputSetTag.set_id
| Member | Kind | Description |
|---|---|---|
id | property | |
immutable_id | property | |
description | property | |
color | property | |
protected | property | |
url | property | |
refresh | method | |
set_id | method | |
set_description | method | |
set_color | method | |
delete | method |
id
Type: str
immutable_id
Type: str | None
description
Type: str | None
color
Type: str | None
protected
Type: bool | None
url
Type: str
refresh
refresh() -> AdvancedOutputSetTag
set_id
set_id(
tag_id: str, *, version: str | dict | None = None
) -> AdvancedOutputSetTag
set_description
set_description(
description: str | None, *, version: str | dict | None = None
) -> AdvancedOutputSetTag
set_color
set_color(
color: str | None, *, version: str | dict | None = None
) -> AdvancedOutputSetTag
delete
delete(force: bool = False) -> None