Skip to content

Commit

Permalink
API: rename LearnerInspector.features to .features_ (#243)
Browse files Browse the repository at this point in the history
  • Loading branch information
j-ittner authored Feb 15, 2021
1 parent 7c78e1c commit 4c8fa16
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/facet/inspection/_inspection.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def output_names_(self) -> List[str]:
return self._shap_calculator.output_names_

@property
def features(self) -> List[str]:
def features_(self) -> List[str]:
"""
The names of the features used to fit the learner pipeline explained by this
inspector.
Expand Down Expand Up @@ -713,7 +713,7 @@ def feature_interaction_matrix(self) -> Union[pd.DataFrame, List[pd.DataFrame]]:
(n_features, n_outputs * n_features)
"""

n_features = len(self.features)
n_features = len(self.features_)
n_outputs = len(self.output_names_)

# get a feature interaction array with shape
Expand Down
2 changes: 1 addition & 1 deletion test/test/facet/test_shap_decomposition.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def _calculate_relative_syn_and_red(

# check basic matrix properties

n_features = len(regressor_inspector.features)
n_features = len(regressor_inspector.features_)

for matrix in (syn_matrix, syn_matrix_asym, red_matrix, red_matrix_asym):
# matrix shape is n_features x n_features
Expand Down

0 comments on commit 4c8fa16

Please sign in to comment.