autointent.modules.abc.DecisionModule#

class autointent.modules.abc.DecisionModule#

Bases: autointent.modules.abc.Module, abc.ABC

Base class for decision modules.

abstract fit(scores, labels, tags=None)#

Fit the model.

Parameters:
  • scores (numpy.typing.NDArray[Any]) – Scores to fit

  • labels (list[autointent.custom_types.LabelType]) – Labels to fit

  • tags (list[autointent.schemas.Tag] | None) – Tags to fit

Return type:

None

abstract predict(scores)#

Predict the best score.

Parameters:

scores (numpy.typing.NDArray[Any]) – Scores to predict

Return type:

numpy.typing.NDArray[Any]

score(context, split, metric_fn)#

Calculate metric on test set and return metric value.

Parameters:
Returns:

Score

Return type:

float

get_assets()#

Return useful assets that represent intermediate data into context.

Return type:

autointent.context.optimization_info.DecisionArtifact

clear_cache()#

Clear cache.

Return type:

None