Skip to main content

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.

MemberKindDescription
componentspropertyAccess the components (constraints, scalars, objectives) of this advanced output set.
diagnosticspropertyAll component diagnostics for the current scoring design head.
diagnostics_atmethodReturn diagnostics for a specific snapshot revision.
summarymethodReturn a high-level summary of this advanced output set's current snapshot.
tagsproperty
get_tagmethod
create_tagmethod
delete_tagmethod
show_objective_previewmethodDisplay an interactive preview for one objective component.
editmethodApply 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:

NameTypeDescriptionDefault
revisionintThe revision number to fetch diagnostics from.

Returns:

  • AdvancedOutputSetDiagnostics: class:AdvancedOutputSetDiagnostics view 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:

NameTypeDescriptionDefault
objective_idstrThe user-defined id of the objective component to preview (e.g. "obj_exposure").

Raises:

  • NotFoundError: If no objective with that id exists 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:

NameTypeDescriptionDefault
payloaddict[str, Any]A dict matching the scoring-design edit schema expected by the platform.
namestr | NoneOptional new name to assign to the resulting version.None
descriptionstr | NoneOptional new description for the resulting version.None
versionstr | dict | NoneOptional 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

MemberKindDescription
idproperty
immutable_idproperty
descriptionproperty
colorproperty
protectedproperty
urlproperty
refreshmethod
set_idmethod
set_descriptionmethod
set_colormethod
deletemethod

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