marcotcr / lime

Lime: Explaining the predictions of any machine learning classifier
BSD 2-Clause "Simplified" License
11.4k stars 1.79k forks source link

Update explanation.py to add dpi feature (Explaination.as_pyplot_figure) #732

Open apoplexi24 opened 8 months ago

apoplexi24 commented 8 months ago

Had difficulty in viewing the X and Y axis data labels of pyplot when there were 100+ features, especially in small figsize such as the default (10,10). Increasing the figsize with the same dpi causes loss in quality of the image, hence an option to increase dpi is surely helpful in certain situations (i.e. when the user has a lot of features).

pyplot.figure() has a parameter called dpi used to control the resolution of the figure, hence access to the 'dpi' parameter would be beneficial for the developers.