Reproducing results from literature

There is a decent amount of pruning methods available in literature which mostly differs by the scoring functions used to score the performance of sub-ensembles. All pruning methods accept different forms of metrics and/or algorithm to determine the specific behavior. Please have a look at the specific class files to see which metrics are already implemented. If you cannot find you metric of choice feel free to implement it. Currently supported are

For convenience you can access these pruning methods via the create_pruner function:

from PyPruning.Papers import create_pruner
md_pruner = create_pruner("margin_distance", n_estimators=10)
PyPruning.Papers.create_pruner(method='reduced_error', **kwargs)

This helper function creates a pruner with the given name.

Parameters
  • method (string, default is "reduced_error") – The name of the method for which a pruner should be created. Currently supported are: {"individual_margin_diversity", "individual_contribution", "individual_error", "individual_kappa_statistic", "reduced_error", "complementariness", "drep", "margin_distance", "combined", "reference_vector", "combined_error", "error_ambiguity", "largest_mean_distance", "cluster_accuracy", "cluster_centroids"}

  • kwargs – All additional kwargs parameters are directly passed to the creating method. Use this to e.g. set n_estimators etc.