diff --git a/eurybia/core/smartdrift.py b/eurybia/core/smartdrift.py index b6d85dc..e0db28a 100644 --- a/eurybia/core/smartdrift.py +++ b/eurybia/core/smartdrift.py @@ -273,6 +273,7 @@ def compile( dtypes = df_concat[varz].dtypes.map(str) cat_features = list(dtypes[dtypes.isin(["object"])].index) df_concat[cat_features] = df_concat[cat_features].fillna("NA") + df_concat = df_concat.fillna(0) self._df_concat = df_concat train, test = train_test_split(df_concat[varz + [self._datadrift_target]], test_size=0.25, random_state=42) diff --git a/eurybia/style/colors.json b/eurybia/style/colors.json index dce39cf..58f0c02 100644 --- a/eurybia/style/colors.json +++ b/eurybia/style/colors.json @@ -27,6 +27,7 @@ "rgb(0, 98, 128)", "rgb(0, 70, 92)" ], + "contrib_distribution": "rgb(211, 211, 211)", "datadrift_historical": "rgba(0,154,203,255)", "featimportance_colorscale": [ [ @@ -62,14 +63,25 @@ "rgb(0, 154, 203)" ] ], + "feature_contributions_cumulative": [ + "rgb(255, 55, 55)", + "rgb(255, 166, 0)", + "rgb(255, 200, 100)", + "rgb(55, 190, 255)", + "rgb(0, 0, 255)", + "rgb(0, 0, 0)" + ], "featureimp_bar": { - "1": "rgba(0,154,203,255)", - "2": "rgba(223, 103, 0, 0.8)" + "1": "rgba(0, 154, 203, 1)", + "2": "rgba(223, 103, 0, 0.8)", + "3": "rgba(240, 195, 162, 0.8)", + "4": "rgba(245, 122, 0, 0.8)" }, "featureimp_groups": { "0": "rgb(10, 204, 143)", "1": "rgb(176, 140, 104)" }, + "featureimp_line": "rgba(52, 55, 54, 0.8)", "interaction_discrete": [ "rgb(95, 70, 144)", "rgb(29, 105, 150)", @@ -100,6 +112,21 @@ "0": "rgba(52, 55, 54, 0.8)", "1": "rgba(52, 55, 54, 0.8)" }, + "prediction_plot": { + "0": "rgba(0, 70, 92, 0.9)", + "1": "rgba(168, 84, 0, 0.9)" + }, + "report_confusion_matrix": [ + "rgb(255, 255, 255)", + "rgb(244, 192, 0)", + "rgb(255, 166, 17)" + ], + "report_feature_distribution": { + "pred": "rgba(230, 111, 0, 0.9)", + "test": "rgba(230, 111, 0, 0.9)", + "train": "rgba(0, 154, 203, 0.9)", + "true": "rgba(0, 154, 203, 0.9)" + }, "scatter_line": { "horizontal": "rgba(17, 136, 240, 0.8)", "vertical": "rgba(240, 82, 65, 0.8)"