Gini importance ranks features in a Random Forest by their weighted contribution to impurity reduction across decision-tree nodes. Each node is weighted by its original training-sample count, and the resulting importances are normalized to sum to 1. section 5.3.2
For CYP3A4 inhibition classification, the measure identifies influential Morgan fingerprint bits, helping connect a trained molecular model to potentially relevant substructures. section 5.3.2
Listing 5.6 Random Forest Gini Importance
bit_indices = np.argsort(rf_clf.feature_importances_)[::-1]
for i in range(10):
print(f"{i + 1}. Fingerprint Bit {bit_indices[i]} : {rf_clf.feature_importances_[bit_indices[i]]:.5f}")
# Output -> 1. Fingerprint Bit 1750 : 0.01401
# 2. Fingerprint Bit 1088 : 0.00986
# 3. Fingerprint Bit 1603 : 0.00905
# 4. Fingerprint Bit 1536 : 0.00899
# 5. Fingerprint Bit 875 : 0.00876
# 6. Fingerprint Bit 841 : 0.00729
# 7. Fingerprint Bit 1152 : 0.00718
# 8. Fingerprint Bit 802 : 0.00667
# 9. Fingerprint Bit 781 : 0.00630
# 10. Fingerprint Bit 1873 : 0.00623Inspect the ten highest-ranked fingerprint bits and their normalized importance values. section 5.3.2
