2016-10-17 4 views
3

xgboost의 플롯 중요도 함수의 그림 크기를 어떻게 변경할 수 있습니까?xgboost 플롯 중요도 그림 크기

unknowns 속성을 제외하고 figsize = (10,20)를 전달하려고하면 실패합니다.

+0

my_plot_importance()를 사용 : 예를 들어,이 래퍼를 사용 /chris/01_Analysis.ipynb –

답변

8

축은 plot_importance()에 전달할 수 있습니다.

def my_plot_importance(booster, figsize, **kwargs): 
    from matplotlib import pyplot as plt 
    from xgboost import plot_importance 
    fig, ax = plt.subplots(1,1,figsize=figsize) 
    return plot_importance(booster=booster, ax=ax, **kwargs) 

그럼 대신 내가 https://github.com/ViennaKaggle/allstate-claims-severity/blob/master에 따라 내 자신의 압연 결국 plot_importance()