alteryx / alteryx/evalml

Allow **kwargs parameter to be passed in plotting utils

オープン
#2,074 コメント 1 件 リアクション 0 件 担当者 1 名 @asniyaz が担当を希望しています GitHub で見る
enhancement
主要言語
Python
スター
850
フォーク
96
PR マージ指標
30日以内にマージされた PR はありません

説明

Hi,

At the moment plotting utils do not accept **kwargs param for plotly charting functionality. As such, there is no ability for end-users to control the theme and other aspects of the chart.

**Example:**
```
class RFBinaryClassificationPipeline(evalml.pipelines.BinaryClassificationPipeline):
component_graph = ['Simple Imputer', 'Random Forest Classifier']

pipeline = RFBinaryClassificationPipeline({})
pipeline.fit(X, y)
pipeline.graph_feature_importance(template = 'plotly_dark')
```
The last line here because of the `template` param will return an error. Without the `template` param, it will generate the plot:

![image](https://user-images.githubusercontent.com/54699234/113341967-e0bf1d80-92fb-11eb-8cdf-fb69e58ced40.png)

However, it will be a great idea to give the ability to users to control the esthetics as it helps them to better integrate charting functionality within their workflows (Think about somebody building a front-end streamlit or Flask app and want's to use charting functionality of EvalML, without the flexibility they won't be able to control theme).

I have reproduced a similar graph using plotly with the dark theme just to show an example:

```
f = pipeline.feature_importance
import plotly.express as px
fig = px.bar(f, x='feature', y='importance', template = 'plotly_dark')
fig.show()
```
![image](https://user-images.githubusercontent.com/54699234/113342849-000a7a80-92fd-11eb-9e4e-2889cd49ef9d.png)

Sorry, the sort order is off here, it should actually be reverse (highest features appearing on top).

You can either pick few params from plotly and include them in your plotting utils such as `template`, `fact`, `color`, `range`, etc., or even better is to allow users to pass any plotly parameter as **kwargs.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。