Skip to content

Commit f20d0b8

Browse files
author
[zebinyang]
committed
add feature importance for each SIM; get_projection_equation; add get_feature_importance; add get_projection_index; update visualize_one_leaf; add update version 0.1.5
1 parent 1ba510c commit f20d0b8

File tree

2 files changed

+15
-42
lines changed

2 files changed

+15
-42
lines changed

examples/demo.ipynb

Lines changed: 14 additions & 42 deletions
Large diffs are not rendered by default.

simtree/simtree.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ def get_projection_equation(self, node_id, precision=3):
123123
equation = ""
124124
importance = self.get_feature_importance(node_id)
125125
sortind = np.argsort(importance)[::-1]
126+
est = self.leaf_estimators_[node_id].
126127
for i in range(est.beta_.shape[0]):
127128
if i == 0:
128129
equation += str(round(np.abs(est.beta_[sortind[i], 0]), 3)) + clf.feature_names[sortind[i]]

0 commit comments

Comments
 (0)