From bcbeb3ebed5f9f0e92f3edae5ed5efb5e009b58d Mon Sep 17 00:00:00 2001 From: Michel Breyer <10465414+mbreyer@users.noreply.github.com> Date: Fri, 26 Nov 2021 13:55:54 +0100 Subject: [PATCH] Update metrics --- scripts/print_stats.ipynb | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/scripts/print_stats.ipynb b/scripts/print_stats.ipynb index 94e9747..1645365 100644 --- a/scripts/print_stats.ipynb +++ b/scripts/print_stats.ipynb @@ -25,35 +25,23 @@ "logfile = \"\"\n", "\n", "df = pd.read_csv(logfile)\n", + "df = df[df.result != \"no_motion_plan_found\"]\n", "\n", "n_attempts = len(df.index)\n", "n_succeeded = (df.result == \"succeeded\").sum()\n", - "n_failed = ((df.result == \"failed\") | (df.result == \"no_motion_plan_found\")).sum()\n", + "n_failed = (df.result == \"failed\").sum()\n", "n_aborted = (df.result == \"aborted\").sum()\n", + "\n", "views_mean = df.view_count.mean()\n", "views_std = df.view_count.std()\n", + "\n", "search_time_mean = df.search_time.mean()\n", "search_time_std = df.search_time.std()\n", - "grasp_time_mean = df.grasp_time.mean()\n", - "grasp_time_std = df.grasp_time.std()\n", "\n", - "print(f\"${n_succeeded}$ & ${n_failed}$ & ${n_aborted}$ & ${views_mean:.1f} \\pm {views_std:.1f}$ & ${search_time_mean:.2f} \\pm {search_time_std:.2f}$ & ${grasp_time_mean:.2f} \\pm {grasp_time_std:.2f}$\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "How often does it fail because no motion plan was found?\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print((df.result == \"no_motion_plan_found\").sum())" + "total_time_mean = (df.search_time + df.grasp_time).mean()\n", + "total_time_std = (df.search_time + df.grasp_time).std()\n", + "\n", + "print(f\"${n_succeeded / n_attempts:.2f}$ & ${n_failed / n_attempts:.2f}$ & ${n_aborted / n_attempts:.2f}$ & ${views_mean:.0f} \\pm {views_std:.0f}$ & ${search_time_mean:.2f} \\pm {search_time_std:.2f}$ & ${total_time_mean:.2f} \\pm {total_time_std:.2f}$\")" ] }, {