pe.callback.tabular.classifier module

class pe.callback.tabular.classifier.TabClassifier(test_data, model_name='xgboost', filter_criterion=None)[source]

Bases: Callback

Evaluate tabular classification accuracy using a tabular classifier.

__call__(syn_data)[source]

Evaluate the tabular classifier on the test set.

Parameters:

syn_data (pe.data.Data) – The synthetic training data

Returns:

Classification accuracy metrics

Return type:

list[pe.metric_item.FloatListMetricItem]

__init__(test_data, model_name='xgboost', filter_criterion=None)[source]

Constructor.

Parameters:
  • test_data (pe.data.Data) – The test data

  • model_name (str, optional) – The classifier model to use, defaults to “xgboost”

  • filter_criterion (dict, optional) – Only computes the metric based on samples satisfying the criterion. None means no filtering. Defaults to None

_encoding(syn_data)[source]

Encoding categorical and numerical columns.

Parameters:

syn_data (pe.data.Data) – The synthetic training data

Returns:

The encoded synthetic training and test data

Return type:

tuple[pe.data.Data, pe.data.Data]

_get_model()[source]

Getting the classifier model.