langtest.transform.ideology.IdeologyTestFactory#

class IdeologyTestFactory(data_handler: List[Sample], tests: Dict | None = None, **kwargs)#

Bases: ITests

Factory class for the ideology tests

__init__(data_handler: List[Sample], tests: Dict | None = None, **kwargs) None#

Initializes the clinical tests

Methods

__init__(data_handler[, tests])

Initializes the clinical tests

available_tests()

Get a dictionary of all available tests, with their names as keys and their corresponding classes as values.

run(sample_list, model, **kwargs)

Runs the model performance

transform()

Runs the test and returns the results.

Attributes

alias_name

supported_tasks

static available_tests() Dict#

Get a dictionary of all available tests, with their names as keys and their corresponding classes as values.

Returns:

A dictionary of test names and classes.

Return type:

Dict

async classmethod run(sample_list: List[Sample], model: ModelAPI, **kwargs) List[Sample]#

Runs the model performance

Parameters:
  • sample_list (List[Sample]) – The input data to be transformed.

  • model (ModelAPI) – The model to be used for evaluation.

  • **kwargs – Additional arguments to be passed to the model performance

Returns:

The transformed data based on the implemented model performance

Return type:

List[Sample]

transform() List[Sample]#

Runs the test and returns the results.

Returns:

A list of results from running the test.

Return type:

List[Results]