culebra.solution.feature_selection.Metrics class

class Metrics

Provide some metrics about the selected features finally obtained.

Evaluate the set of solutions found by a Trainer and calculate some metrics about the frequency of each selected feature. More information about such metrics can be found in [Gonzalez2019].

Static methods

static Metrics.relevance(solutions: Sequence[Solution]) Series

Return the relevance of the features finally selected.

The relevance is calculated according to the method proposed in [Gonzalez2019]

Parameters:

solutions (Sequence) – Best solutions returned by the Trainer.

Returns:

The relevance of each feature appearing in the solutions.

Return type:

Series

static Metrics.rank(solutions: Sequence[Solution]) Series

Return the rank of the features finally selected.

The rank is calculated according to the method proposed in [Gonzalez2019]

Parameters:

solutions (Sequence) – Best solutions returned by the Trainer.

Returns:

The relevance of each feature appearing in the solutions.

Return type:

Series