Replies: 1 comment
-
Hi @nbjdttn, Interesting question. I think you could do that like this: # Create array to store whether feature was used:
was_feature_used = zeros(Bool, dataset.nfeatures)
# Loop through nodes in tree:
foreach(tree) do node
if node.degree == 0 && !(node.constant)
was_feature_used[node.feature] = true
end
end
number_features_used = sum(was_feature_used) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
Thank you for developing this library! I am wondering if there is a way to check how many features have been used in the current tree (except all the constants) when customising the loos functions?
Thanks again!
Beta Was this translation helpful? Give feedback.
All reactions