Skip to content

Feature importances in TabularNLPAutoML #129

@fingoldo

Description

@fingoldo

Hi, is it possible to get feature importances in TabularNLPAutoML for regular features (not textual), same as in TabularAutoML?
Currently automl.get_feature_scores("fast") is throwing an error


AttributeError                            Traceback (most recent call last)
<ipython-input-182-f726a358fe6b> in <module>
      1 # Fast feature importances calculation
----> 2 fast_fi = pipe.base_estimator.get_feature_scores("fast")
      3 fast_fi.set_index("Feature")["Importance"].plot.bar(figsize=(30, 10), grid=True)

C:\ProgramData\Anaconda3\lib\site-packages\lightautoml\automl\presets\tabular_presets.py in get_feature_scores(self, calc_method, data, features_names, silent)
    577     ):
    578         if calc_method == "fast":
--> 579             for level in self.levels:
    580                 for pipe in level:
    581                     fi = pipe.pre_selection.get_features_score()

AttributeError: 'TabularNLPAutoML' object has no attribute 'levels'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions