get_feature_importance function

Internal function for calculating feature importance