Notice
Recent Posts
Recent Comments
Link
«   2024/07   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
Archives
Today
Total
관리 메뉴

Passion, Grace & Fire.

pyplot : scatter 본문

pyplot

pyplot : scatter

vincenthanna 2020. 8. 21. 10:32

데이터의 분포를 표현할 때 사용할 수 있다.

 

values = [0.01686434542269142, 0.011053805247045436, 0.036219170535060755, 0.019470566624956092, 0.07861381065229754, 0.019871398042689628, 0.02209323746126317, 0.004198705181889577, 0.003607748989459628, 0.0003743181308508165, 0.000658587568488969, 0.0013468714834950239, 0.0006631273358967262, 0.002396248137555366, 0.02559893166563769, 0.013920353817181067, 0.056972129046208644, 0.002157913151265299, 0.016475991648979886, 0.038131333126062074, 0.07169756523163816, 0.025542700975322873, 0.009404375939580238, 0.02143813341563879, 0.028014375170701815, 0.006161484578645829, 0.013635548698960633, 0.031616018789628386, 0.0033942424985942323, 0.00931835490969756, 0.001989572452739753, 0.0169000533930654, 0.006131305051533334, 0.026575212817247448, 0.12972589668605977, 0.027730687462900114, 0.018552997743760267, 0.012009756930235212, 0.012160372455969666, 0.011576231652990453, 0.008128745850432492, 0.010594230122584794, 0.00859806923363534, 0.011555325103106582, 0.01014094472565096, 0.00976021723144253, 0.019068010059436213, 0.015948843121933284, 0.010077793671110571, 0.011709915331607012, 0.01718398425858274, 0.001870133874931154, 0.002257450267841548, 0.002469687345810993, 0.0024558305914006385, 0.0026302488825493274, 0.0012870902040590282]
features = ['ps_ind_01', 'ps_ind_02_cat', 'ps_ind_03', 'ps_ind_04_cat', 'ps_ind_05_cat', 'ps_ind_06_bin', 'ps_ind_07_bin', 'ps_ind_08_bin', 'ps_ind_09_bin', 'ps_ind_10_bin', 'ps_ind_11_bin', 'ps_ind_12_bin', 'ps_ind_13_bin', 'ps_ind_14', 'ps_ind_15', 'ps_ind_16_bin', 'ps_ind_17_bin', 'ps_ind_18_bin', 'ps_reg_01', 'ps_reg_02', 'ps_reg_03', 'ps_car_01_cat', 'ps_car_02_cat', 'ps_car_03_cat', 'ps_car_04_cat', 'ps_car_05_cat', 'ps_car_06_cat', 'ps_car_07_cat', 'ps_car_08_cat', 'ps_car_09_cat', 'ps_car_10_cat', 'ps_car_11_cat', 'ps_car_11', 'ps_car_12', 'ps_car_13', 'ps_car_14', 'ps_car_15', 'ps_calc_01', 'ps_calc_02', 'ps_calc_03', 'ps_calc_04', 'ps_calc_05', 'ps_calc_06', 'ps_calc_07', 'ps_calc_08', 'ps_calc_09', 'ps_calc_10', 'ps_calc_11', 'ps_calc_12', 'ps_calc_13', 'ps_calc_14', 'ps_calc_15_bin', 'ps_calc_16_bin', 'ps_calc_17_bin', 'ps_calc_18_bin', 'ps_calc_19_bin', 'ps_calc_20_bin']

plt.figure(figsize=(16, 10))
plt.scatter(features, values, s=100, c=values)
plt.xticks(rotation=90)
plt.colorbar()
plt.title("Random Forest Feature Importance", fontsize=24)

plt.show()

Comments