feature selection

adversarial validation

class autox.autox_competition.feature_selection.adversarial_validation.AdversarialValidation[source]

Bases: object

Remove features with inconsistent distribution between train and test.

Example::

elo_AdversarialValidation_AutoX

fit(train, test, id_, target, categorical_features=[], p=0.6)[source]
Parameters
  • train – dataframe, the training input samples.

  • test – dataframe, the testing input samples.

  • id – list, columns as id.

  • target – str, target column.

  • categorical_features – list, columns with categorical type.

  • p – float, threshold. If the auc is greater than this threshold, the algorithm will continuously remove the most important feature.

transform(df)[source]
Parameters

df – dataframe, dataframe needs to be transformed.

Returns

dataframe, transformed dataframe.

GRN feature selection

Each feature weight is output according to the feature column definition.

Example::

GRN_FeatureSelection_AutoX