czbenchmarks.tasks.sequential

Attributes

logger

Classes

SequentialOrganizationTaskInput

Pydantic model for Sequential Organization inputs.

SequentialOrganizationOutput

Output for sequential organization task.

SequentialOrganizationTask

Task for evaluating sequential consistency in embeddings.

Module Contents

czbenchmarks.tasks.sequential.logger
class czbenchmarks.tasks.sequential.SequentialOrganizationTaskInput(/, **data: Any)[source]

Bases: czbenchmarks.tasks.task.TaskInput

Pydantic model for Sequential Organization inputs.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

obs: Annotated[pandas.DataFrame, Field(description='Cell metadata DataFrame (e.g. the `obs` from an AnnData object).')]
input_labels: Annotated[czbenchmarks.types.ListLike, Field(description='Ground truth labels for metric calculation (e.g. `obs.cell_type` from an AnnData object).')]
k: Annotated[int, Field(description='Number of nearest neighbors for k-NN based metrics.')] = 15
normalize: Annotated[bool, Field(description='Whether to normalize the embedding for k-NN based metrics.')] = True
adaptive_k: Annotated[bool, Field(description='Whether to use an adaptive number of nearest neighbors for k-NN based metrics.')] = False
class czbenchmarks.tasks.sequential.SequentialOrganizationOutput(/, **data: Any)[source]

Bases: czbenchmarks.tasks.task.TaskOutput

Output for sequential organization task.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

embedding: czbenchmarks.tasks.types.CellRepresentation
class czbenchmarks.tasks.sequential.SequentialOrganizationTask(*, random_seed: int = RANDOM_SEED)[source]

Bases: czbenchmarks.tasks.task.Task

Task for evaluating sequential consistency in embeddings.

This task computes sequential quality metrics for embeddings using time point labels. Evaluates how well embeddings preserve sequential organization between cells.

display_name = 'Sequential Organization'
description = 'Evaluate sequential consistency in embeddings using time point labels and k-NN based metrics.'
input_model
baseline_model