langtest.transform.representation.BaseRepresentation#

class BaseRepresentation#

Bases: ABC

Abstract base class for implementing representation measures.

alias_name#

A name or list of names that identify the representation measure.

Type:

str

transform(data

List[Sample]) -> Any: Transforms the input data into an output

based on the implemented representation measure.
__init__()#

Methods

__init__()

async_run(sample_list, model, **kwargs)

Creates a task for the run method.

run(sample_list, model, **kwargs)

transform(self)

Abstract method that implements the representation measure.

Attributes

alias_name

async classmethod async_run(sample_list: List[Sample], model: ModelFactory, **kwargs)#

Creates a task for the run method.

Parameters:
  • sample_list (List[Sample]) – The input data to be evaluated for representation test.

  • model (ModelFactory) – The model to be used for the computation.

Returns:

The task for the run method.

Return type:

asyncio.Task

abstract static transform(self)#

Abstract method that implements the representation measure.

Parameters:

data (List[Sample]) – The input data to be evaluated for representation test.

Returns:

The transformed data based on the implemented representation measure.

Return type:

Any