lkauto.explicit package

Submodules

lkauto.explicit.explicit_evaler module

class lkauto.explicit.explicit_evaler.ExplicitEvaler(train: pandas.core.frame.DataFrame, optimization_metric, filer: lkauto.utils.filer.Filer, validation=None, random_state=42, split_folds: int = 1, split_strategie: str = 'user_based', split_frac: float = 0.25, ensemble_size: int = 50, minimize_error_metric_val: bool = True)

Bases: object

the ExplicitEvaler class handles the evaluation of rating prediction models. An Evaluation run consists of training a model and to predict and evaluate the performance on a validation split.

train

pandas dataset containing the train split.

Type

pd.DataFrame

optimization_metric

LensKit prediction accuracy metric used to evaluate the model (either rmse or mae)

Type

function

filer

filer to organize the output.

Type

Filer

validation

pandas dataset containing the validation split.

Type

pd.DataFrame

random_state

The random number generator or seed (see lenskit.util.rng()).

split_folds

The number of folds of the validation split

split_strategie

The strategie used to split the data. Possible values are ‘user_based’ and ‘row_based’

split_frac

The fraction of the data used for the validation split. If the split_folds value is greater than 1, this value is ignored.

ensemble_size

The number of models used to build the final ensemble predictor.

minimize_error_metric_val

If True, the error metric is minimized. If False, the error metric is maximized. This parameter needs to be set in corelation with the optimization metric.

evaluate_explicit(config_space: ConfigurationSpace) → float
evaluate(config_space: ConfigSpace.configuration_space.ConfigurationSpace) → float

evaluates model defined in config_space

The config_space parameter defines a model. This model is build, trained and evaluated with the validation split.

Parameters

config_space (ConfigurationSpace) – configuration space containing information to build a model

Returns

validation_error – the error of the considered model

Return type

float

Module contents