Created
          March 2, 2021 16:23 
        
      - 
      
- 
        Save PranjalDureja0002/4c8e1dd0883966b3de4c5aa483663593 to your computer and use it in GitHub Desktop. 
    model
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | s1 = data['score'] | |
| s_s1 = sum(s1.tolist()) | |
| s_s1 | |
| plt.style.use('fivethirtyeight') | |
| ax=data.head(20).plot(kind = 'barh' , color = 'red') | |
| for p in ax.patches: | |
| percentage = '{:.1f}%'.format(100 * p.get_width()/s_s1) | |
| x = p.get_x() + p.get_width() - 0.5 | |
| y = p.get_y() + p.get_height() | |
| ax.annotate(percentage, (x, y)) | |
| plt.xlabel ('Score') | |
| plt.ylabel ('Features') | |
| plt.title('Feature_Importance_Plot',fontsize=20) | |
| plt.show() | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment