Skip to content

feature_importances_ of BaseGradientBoostedSetTree (gbest) errors #1

@liorshafir

Description

@liorshafir

Hi,

When trying to get the feature importances of a trained gbest, the following errors occur:

  1. line 622 in gbest.py: 'SetSplitNode' object has no attribute 'node_count'
    I tried to fix it by replace the 'node_count' with 'tree.n_nodes'
    but even then, another error appears:

  2. When trying to execute:
    relevant_trees[0].tree_.compute_feature_importances(normalize=False)
    we get
    AttributeError: 'SetSplitNode' object has no attribute 'compute_feature_importances'

It looks like SetSplitNode (or rather settree.set_tree.SetTree) does not implement compute_feature_importances method.

Can you suggest any alternative to calculate the feature importances?

Thanks in advance

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