Skip to main content

Subsampling design

See also: Diagnostics, Items, Services.

SubsamplingDesign​

Returned by: JinkoClient.get_subsampling_design, JinkoClient.iter_subsampling_designs, JinkoClient.list_subsampling_designs, SubsamplingDesign.edit, SubsamplingDesign.set_trial, Trial.create_subsampling_design

Also has every member of ProjectItem.

MemberKindDescription
generated_vpopsattribute
numeric_filtersproperty
categorical_filtersproperty
marginalsproperty
categoricalsproperty
correlationsproperty
summary_statisticsproperty
survivalsproperty
observablesproperty
source_trialpropertyReturn the trial snapshot currently linked to this subsampling design.
diagnosticspropertyReturn sanity diagnostics for the current subsampling design snapshot.
diagnostics_atmethodReturn sanity diagnostics for a specific subsampling design revision.
estimate_distributionsmethodEstimate candidate target distributions for a source-Trial scalar.
generate_vpopmethodGenerate a Vpop from this subsampling design.
editmethodAdvanced partial update for this subsampling design.
set_trialmethodReplace the source trial for this subsampling design.

generated_vpops​

numeric_filters​

Type: NumericFiltersService

categorical_filters​

Type: CategoricalFiltersService

marginals​

Type: MarginalsService

categoricals​

Type: CategoricalsService

correlations​

Type: CorrelationsService

summary_statistics​

Type: SummaryStatisticsService

survivals​

Type: SurvivalsService

observables​

Type: ObservablesService

source_trial​

Type: Trial

Return the trial snapshot currently linked to this subsampling design.

diagnostics​

Type: SubsamplingDesignDiagnostics

Return sanity diagnostics for the current subsampling design snapshot.

Each access fetches a fresh, self-consistent snapshot: sanity messages plus the resolved trial descriptor context used by SubsamplingDesignDiagnostics.explain. Filtering the returned view (.errors(), .for_field(...), etc.) and calling .explain() do not make further requests - re-access this property for updated results.

diagnostics_at​

diagnostics_at(revision: int) -> SubsamplingDesignDiagnostics

Return sanity diagnostics for a specific subsampling design revision.

See diagnostics for the freshness contract of the returned view.

estimate_distributions​

estimate_distributions(
scalar_id: str, *, arm: str | None = None
) -> openapi_types.SubsamplingEstimateResponse

Estimate candidate target distributions for a source-Trial scalar.

Parameters:

NameTypeDescriptionDefault
scalar_idstrIdentifier of a scalar exposed by the source Trial.
armstr | NoneOptional source-Trial arm for arm-specific scalar outputs.None

Returns:

  • openapi_types.SubsamplingEstimateResponse: Candidate fitted laws and compatible subsampling target forms. The
  • openapi_types.SubsamplingEstimateResponse: result is informational; choose a target only after scientific
  • openapi_types.SubsamplingEstimateResponse: review.

generate_vpop​

generate_vpop(
*,
boltzmann_constant: float,
iters_fixed_temperature: int,
num_iterations: int,
num_samples: int,
replacement_rate: float,
seed: int,
folder: Folder | str | None | _UnsetType = _UNSET,
name: str | None = None,
description: str | None = None,
version: str | dict | None = None
) -> Vpop

Generate a Vpop from this subsampling design.

Parameters:

NameTypeDescriptionDefault
boltzmann_constantfloatControls acceptance probability for uphill moves in the simulated-annealing algorithm. The API default is 1e-3.
iters_fixed_temperatureintNumber of iterations at each temperature level.
num_iterationsintTotal number of simulated-annealing iterations. Must be >= iters_fixed_temperature.
num_samplesintNumber of patients to subsample from the source trial.
replacement_ratefloatProportion of samples swapped at each iteration (between 0 and 1).
seedintInteger seed for the random-number generator, ensuring reproducibility.
folderFolder | str | None | _UnsetTypeDestination folder for the generated Vpop. Defaults to the same folder as this subsampling design._UNSET
namestr | NoneOptional display name for the generated Vpop.None
descriptionstr | NoneOptional description.None
versionstr | dict | NoneOptional version label.None

edit​

edit(
*,
trial: Trial | _UnsetType = _UNSET,
numeric_filters: Sequence[dict[str, Any]] | _UnsetType = _UNSET,
categorical_filters: Sequence[dict[str, Any]] | _UnsetType = _UNSET,
target_marginals: Sequence[dict[str, Any]] | _UnsetType = _UNSET,
target_categoricals: Sequence[dict[str, Any]] | _UnsetType = _UNSET,
target_correlations: Sequence[dict[str, Any]] | _UnsetType = _UNSET,
target_survivals: Sequence[dict[str, Any]] | _UnsetType = _UNSET,
target_summary_statistics: Sequence[dict[str, Any]] | _UnsetType = _UNSET,
additional_scalars: Sequence[str | dict[str, Any]] | _UnsetType = _UNSET,
version: str | dict | None = None
) -> SubsamplingDesign

Advanced partial update for this subsampling design.

Omitted fields keep their current values. This method keeps the backend field names for compatibility with lower-level callers. For day-to-day editing, prefer the typed subservices such as design.marginals or convenience wrappers like set_trial(...).

Parameters:

NameTypeDescriptionDefault
trialTrial | _UnsetTypeReplacement source trial._UNSET
numeric_filtersSequence[dict[str, Any]] | _UnsetTypeFull replacement for numericFilters._UNSET
categorical_filtersSequence[dict[str, Any]] | _UnsetTypeFull replacement for categoricalFilters._UNSET
target_marginalsSequence[dict[str, Any]] | _UnsetTypeFull replacement for targetMarginals._UNSET
target_categoricalsSequence[dict[str, Any]] | _UnsetTypeFull replacement for targetCategoricals._UNSET
target_correlationsSequence[dict[str, Any]] | _UnsetTypeFull replacement for targetCorrelations._UNSET
target_survivalsSequence[dict[str, Any]] | _UnsetTypeFull replacement for targetSurvivals._UNSET
target_summary_statisticsSequence[dict[str, Any]] | _UnsetTypeFull replacement for targetSummaryStatistics._UNSET
additional_scalarsSequence[str | dict[str, Any]] | _UnsetTypeFull replacement for additionalScalars._UNSET
versionstr | dict | NoneOptional version label for the new snapshot.None

set_trial​

set_trial(
trial: Trial, *, version: str | dict | None = None
) -> SubsamplingDesign

Replace the source trial for this subsampling design.

All other fields keep their current values. See edit for the full parameter reference.