Skip to content

Commit

Permalink
Correction using n_interpolation_size instead of _n_features_in_tree
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlesCousyn committed Jan 31, 2025
1 parent e8c961d commit 99d943d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shapiq/explainer/tree/treeshapiq.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ def _init_summary_polynomials(self):
self.subset_ancestors_store[order] = subset_ancestors

# If the tree has only one feature, we assign a default value of 0
if self._n_features_in_tree == 1:
if self.n_interpolation_size == 1:
self.D_store[order] = np.array([0])
else:
self.D_store[order] = np.polynomial.chebyshev.chebpts2(self.n_interpolation_size)
Expand Down

0 comments on commit 99d943d

Please sign in to comment.