From 0b5feba0f77216a74d4e35fa8ded641a0883b22e Mon Sep 17 00:00:00 2001 From: Narendra Singh dangi <82656649+narendrasinghdangi@users.noreply.github.com> Date: Mon, 14 Aug 2023 17:02:13 +0530 Subject: [PATCH 1/3] Update plot_prediction_latency.py Documents fixed to increase speed of plot remove for loop --- examples/applications/plot_prediction_latency.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/applications/plot_prediction_latency.py b/examples/applications/plot_prediction_latency.py index 8fce81fb9fb4e..2329809dddaf3 100644 --- a/examples/applications/plot_prediction_latency.py +++ b/examples/applications/plot_prediction_latency.py @@ -232,7 +232,7 @@ def plot_n_features_influence(percentiles, percentile): fig, ax1 = plt.subplots(figsize=(10, 6)) colors = ["r", "g", "b"] for i, cls_name in enumerate(percentiles.keys()): - x = np.array(sorted([n for n in percentiles[cls_name].keys()])) + x = np.array(sorted(list(percentiles[cls_name].keys()]))) y = np.array([percentiles[cls_name][n] for n in x]) plt.plot( x, From f3237d08b9d4d2d41eb74db5a21585ad1c5465ce Mon Sep 17 00:00:00 2001 From: Narendra Singh dangi <82656649+narendrasinghdangi@users.noreply.github.com> Date: Mon, 14 Aug 2023 17:08:02 +0530 Subject: [PATCH 2/3] Update plot_prediction_latency.py remove for loop --- examples/applications/plot_prediction_latency.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/applications/plot_prediction_latency.py b/examples/applications/plot_prediction_latency.py index 2329809dddaf3..872c3198af7fc 100644 --- a/examples/applications/plot_prediction_latency.py +++ b/examples/applications/plot_prediction_latency.py @@ -232,7 +232,7 @@ def plot_n_features_influence(percentiles, percentile): fig, ax1 = plt.subplots(figsize=(10, 6)) colors = ["r", "g", "b"] for i, cls_name in enumerate(percentiles.keys()): - x = np.array(sorted(list(percentiles[cls_name].keys()]))) + x = np.array(sorted(list(percentiles[cls_name].keys()))) y = np.array([percentiles[cls_name][n] for n in x]) plt.plot( x, From 3e3cd1de32cf661fbe0f0b0bd70b57ec255177fc Mon Sep 17 00:00:00 2001 From: Narendra Singh dangi <82656649+narendrasinghdangi@users.noreply.github.com> Date: Tue, 15 Aug 2023 03:50:01 +0530 Subject: [PATCH 3/3] Update plot_prediction_latency.py ok --- examples/applications/plot_prediction_latency.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/applications/plot_prediction_latency.py b/examples/applications/plot_prediction_latency.py index 872c3198af7fc..0c966b3b1e28e 100644 --- a/examples/applications/plot_prediction_latency.py +++ b/examples/applications/plot_prediction_latency.py @@ -232,7 +232,7 @@ def plot_n_features_influence(percentiles, percentile): fig, ax1 = plt.subplots(figsize=(10, 6)) colors = ["r", "g", "b"] for i, cls_name in enumerate(percentiles.keys()): - x = np.array(sorted(list(percentiles[cls_name].keys()))) + x = np.array(sorted(percentiles[cls_name].keys())) y = np.array([percentiles[cls_name][n] for n in x]) plt.plot( x,