# How does random forest calculates the importance of the features?

Trying to understand completely how does random forest work and playing with it a bit, I came across the importance() function here on sklearn. This function has made random forests now as one of my go-to models. But I can't really understand how does the function implement and calculate this beautiful utility.

Any explanation would be golden!