Instantly share code, notes, and snippets.

@Damian89 /artikel.py Secret
Created Oct 25, 2017

Embed
What would you like to do?
#!/usr/bin/env python
# coding: utf8
import matplotlib.pyplot as plt
import pandas
import seaborn
seaborn.set()
data = [2.56549554e-02, 3.38720543e-04, 2.95302177e-02, 7.46299488e-02,
3.81285453e-02, 5.78283580e-05, 1.56259473e-03, 1.19001145e-02,
1.30647462e-02, 6.72349484e-03, 3.44087894e-02, 1.09712892e-01,
2.83999583e-03, 4.23223878e-03, 8.79418127e-04, 1.41646517e-03,
3.25432801e-04, 5.29453461e-03, 5.71958375e-02, 1.21031122e-03,
1.48891050e-02, 1.97462484e-03, 4.09820424e-02, 3.65735018e-02,
3.12149311e-03, 3.09147616e-03, 4.04991472e-03, 3.44421423e-03,
1.00113848e-02, 1.32461276e-02, 2.31782142e-02, 3.55888832e-02,
4.70340669e-02, 1.28564896e-02, 2.47330887e-02, 7.65534949e-04,
3.48969419e-02, 8.95877339e-03, 5.53942866e-03, 7.33380272e-03,
3.57520891e-04, 4.99723512e-03, 1.32142531e-02, 5.39496886e-04,
8.31166099e-04, 1.30340902e-02, 2.92595644e-02, 1.75575539e-03,
7.74414742e-02, 1.07193252e-01]
names = ["f{}".format(i + 1) for (i, v) in enumerate(data)]
frame = pandas.DataFrame(data={"feature": names, "importance": data})
ax = seaborn.barplot(x="feature", y="importance", data=frame)
ax.set(xlabel='Features', ylabel='Importance - ETC(n_estimators=75, max_depth=3)')
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment