{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "4cd1da0e", "metadata": {}, "outputs": [ { "ename": "ImportError", "evalue": "cannot import name 'load_results' from 'synthetic_task.plot_results' (/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py)", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mImportError\u001b[0m Traceback (most recent call last)", "Cell \u001b[0;32mIn[1], line 7\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;21;01mseaborn\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mas\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;21;01msns\u001b[39;00m\n\u001b[1;32m 6\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;21;01mmatplotlib\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mpyplot\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mas\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;21;01mplt\u001b[39;00m\n\u001b[0;32m----> 7\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;21;01msynthetic_task\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mplot_results\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m load_results, plot_total_loss_vs_method_by_ydim, plot_total_time_vs_method_by_ydim\n", "\u001b[0;31mImportError\u001b[0m: cannot import name 'load_results' from 'synthetic_task.plot_results' (/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py)" ] } ], "source": [ "%load_ext autoreload\n", "%autoreload 2\n", "import pandas as pd\n", "import numpy as np\n", "import seaborn as sns\n", "import matplotlib.pyplot as plt\n", "from synthetic_task.plot_results import load_results, plot_total_loss_vs_method_by_ydim, plot_total_time_vs_method_by_ydim" ] }, { "cell_type": "code", "execution_count": 2, "id": "6f2b2dea", "metadata": {}, "outputs": [], "source": [ "sns.set_theme(style=\"whitegrid\", context=\"talk\")\n", "palette = sns.color_palette()" ] }, { "cell_type": "code", "execution_count": 3, "id": "f46b1dc6", "metadata": {}, "outputs": [], "source": [ "# PLOT GENERAL TASK -- SOC\n", "\n", "batch_size = 8\n", "SOC_DIR = f\"../synthetic_results_general_{batch_size}\"\n", "METHODS = [\n", " \"cvxpylayer\",\n", " \"lpgd\",\n", " \"bpqp\",\n", " \"ffocp_eq\",\n", "]\n", "METHODS_LEGEND = {\n", " \"cvxpylayer\": \"CvxpyLayer\",\n", " \"lpgd\": \"LPGD\",\n", " \"bpqp\": \"BPQP\",\n", " \"ffocp_eq\": \"FFOCP\",\n", "}\n", "\n", "METHODS_STEPS = [method+\"_steps\" for method in METHODS]\n", "\n", "method_order = [METHODS_LEGEND[m] for m in METHODS]\n", "\n", "markers = [\"o\", \"s\", \"D\", \"^\", \"v\", \"x\"]\n", "markers_dict = {method: markers[i] for i, method in enumerate(method_order)}\n", "\n", "LINEWIDTH = 1.5" ] }, { "cell_type": "code", "execution_count": 4, "id": "4570a792", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "method: cvxpylayer\n", "method: qpth\n", "method: lpgd\n", "method: bpqp\n", "method: dqp\n", "method: altdiff\n", "method: ffoqp_eq_schur\n", "method: ffocp_eq\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:72: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation.\n", " return pd.concat(dfs, ignore_index=True, sort=False)\n" ] } ], "source": [ "df = load_results(base_dir=SOC_DIR)\n", "df = df.rename(columns=lambda c: c.strip() if isinstance(c, str) else c)\n", "df[\"method\"] = pd.Categorical(df[\"method\"], categories=method_order, ordered=True)" ] }, { "cell_type": "code", "execution_count": 5, "id": "ddf3423e", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:113: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n", " df_avg_method = df.groupby('method')[time_names].mean().reset_index()\n", "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:113: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n", " df_avg_method = df.groupby('method')[time_names].mean().reset_index()\n", "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:113: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n", " df_avg_method = df.groupby('method')[time_names].mean().reset_index()\n", "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:113: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n", " df_avg_method = df.groupby('method')[time_names].mean().reset_index()\n", "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:113: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n", " df_avg_method = df.groupby('method')[time_names].mean().reset_index()\n", "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:113: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n", " df_avg_method = df.groupby('method')[time_names].mean().reset_index()\n", "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:113: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n", " df_avg_method = df.groupby('method')[time_names].mean().reset_index()\n", "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:113: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n", " df_avg_method = df.groupby('method')[time_names].mean().reset_index()\n", "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:113: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n", " df_avg_method = df.groupby('method')[time_names].mean().reset_index()\n" ] } ], "source": [ "plot_total_time_vs_method_by_ydim(df, SOC_DIR, ('forward_time','backward_time'), tag=\"syn\")" ] }, { "cell_type": "code", "execution_count": 6, "id": "2bec5350", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "method: cvxpylayer\n", "method: lpgd\n", "method: bpqp\n", "method: ffocp_eq\n" ] } ], "source": [ "df = load_results(base_dir=SOC_DIR, methods=METHODS_STEPS)\n", "df = df.rename(columns=lambda c: c.strip() if isinstance(c, str) else c)\n", "df[\"method\"] = pd.Categorical(df[\"method\"], categories=method_order, ordered=True)" ] }, { "cell_type": "code", "execution_count": 7, "id": "d6d6b860", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "array([1000, 200, 300, 400, 500, 600, 700, 800, 900])" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df[df[\"method\"] == \"FFOCP\"].ydim.unique()" ] }, { "cell_type": "code", "execution_count": 8, "id": "759d526c", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:131: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n", " df_avg_epoch = df.groupby(['method', iteration_name])[[loss_metric_name]].mean().reset_index()\n", "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:131: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n", " df_avg_epoch = df.groupby(['method', iteration_name])[[loss_metric_name]].mean().reset_index()\n", "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:131: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n", " df_avg_epoch = df.groupby(['method', iteration_name])[[loss_metric_name]].mean().reset_index()\n", "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:131: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n", " df_avg_epoch = df.groupby(['method', iteration_name])[[loss_metric_name]].mean().reset_index()\n", "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:131: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n", " df_avg_epoch = df.groupby(['method', iteration_name])[[loss_metric_name]].mean().reset_index()\n", "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:131: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n", " df_avg_epoch = df.groupby(['method', iteration_name])[[loss_metric_name]].mean().reset_index()\n", "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:131: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n", " df_avg_epoch = df.groupby(['method', iteration_name])[[loss_metric_name]].mean().reset_index()\n", "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:131: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n", " df_avg_epoch = df.groupby(['method', iteration_name])[[loss_metric_name]].mean().reset_index()\n", "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:131: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n", " df_avg_epoch = df.groupby(['method', iteration_name])[[loss_metric_name]].mean().reset_index()\n" ] } ], "source": [ "plot_total_loss_vs_method_by_ydim(df, SOC_DIR)" ] }, { "cell_type": "code", "execution_count": 9, "id": "6b090796", "metadata": {}, "outputs": [], "source": [ "# PLOT SYNTHETIC TASK -- QP\n", "\n", "batch_size = 8\n", "QP_DIR = f\"../synthetic_results_{batch_size}\"\n", "METHODS = [\n", " \"cvxpylayer\",\n", " \"qpth\",\n", " \"lpgd\",\n", " \"bpqp\",\n", " \"ffoqp_eq_schur\",\n", " \"ffocp_eq\",\n", "]\n", "METHODS_LEGEND = {\n", " \"cvxpylayer\": \"CvxpyLayer\",\n", " \"qpth\": \"qpth\",\n", " \"lpgd\": \"LPGD\",\n", " \"bpqp\": \"BPQP\",\n", " \"ffoqp_eq_schur\": \"FFOQP\",\n", " \"ffocp_eq\": \"FFOCP\",\n", "}\n", "\n", "METHODS_STEPS = [method+\"_steps\" for method in METHODS]\n", "\n", "method_order = [METHODS_LEGEND[m] for m in METHODS]\n", "\n", "markers = [\"o\", \"s\", \"D\", \"^\", \"v\", \"x\"]\n", "markers_dict = {method: markers[i] for i, method in enumerate(method_order)}\n", "\n", "LINEWIDTH = 1.5" ] }, { "cell_type": "code", "execution_count": 10, "id": "c814b993", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "method: cvxpylayer\n", "method: qpth\n", "method: lpgd\n", "method: bpqp\n", "method: dqp\n", "method: altdiff\n", "method: ffoqp_eq_schur\n", "method: ffocp_eq\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:72: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation.\n", " return pd.concat(dfs, ignore_index=True, sort=False)\n" ] } ], "source": [ "df = load_results(base_dir=QP_DIR)\n", "df = df.rename(columns=lambda c: c.strip() if isinstance(c, str) else c)\n", "df[\"method\"] = pd.Categorical(df[\"method\"], categories=method_order, ordered=True)" ] }, { "cell_type": "code", "execution_count": 11, "id": "0a794b66", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
epochtrain_ts_losstest_ts_losstrain_df_losstest_df_lossforward_timebackward_timemethodseednlrydim
21802.0222510.0-0.4704830.0160.42665747.148969FFOQP1NaN0.0011000
21902.0191250.0-0.4706480.0161.27341149.882841FFOQP2NaN0.0011000
22002.0184260.0-0.4703260.0151.30103346.942996FFOQP3NaN0.0011000
22102.0248470.0-0.4704890.0150.69219745.952870FFOQP4NaN0.0011000
22202.0117520.0-0.4708540.0163.83794350.228734FFOQP5NaN0.0011000
223018.0860560.0-0.4709480.09.5619018.319102FFOQP1NaN0.001200
224017.4921340.0-0.4660090.08.9945867.294591FFOQP2NaN0.001200
225017.0629760.0-0.4655570.08.7939567.021729FFOQP3NaN0.001200
226018.3557090.0-0.4689760.08.8116767.122147FFOQP4NaN0.001200
227016.9607070.0-0.4666200.08.7652077.910513FFOQP5NaN0.001200
22807.9106390.0-0.4639710.015.4732154.343293FFOQP1NaN0.001300
22907.7206320.0-0.4625180.016.5918395.063000FFOQP2NaN0.001300
23008.3730110.0-0.4612730.015.6274114.612822FFOQP3NaN0.001300
23108.7568890.0-0.4621160.015.3091094.847127FFOQP4NaN0.001300
23209.2621130.0-0.4602960.015.5638554.895429FFOQP5NaN0.001300
23301.9764730.0-0.4706500.028.34485113.864420FFOQP1NaN0.001400
23401.9716830.0-0.4692270.030.47088816.627100FFOQP2NaN0.001400
23501.9879890.0-0.4704470.028.64165012.223557FFOQP3NaN0.001400
23601.9931130.0-0.4711740.028.08073713.041409FFOQP4NaN0.001400
23701.9886670.0-0.4701900.030.14917513.199767FFOQP5NaN0.001400
23801.9702010.0-0.4712960.044.83048319.222894FFOQP1NaN0.001500
23901.9577390.0-0.4700620.048.19184120.310199FFOQP2NaN0.001500
24001.9607870.0-0.4709920.044.68788020.360677FFOQP3NaN0.001500
24101.9763690.0-0.4713220.046.69874321.821569FFOQP4NaN0.001500
24201.9579620.0-0.4707860.044.61261520.620520FFOQP5NaN0.001500
24301.9474460.0-0.4706260.067.97169824.638906FFOQP1NaN0.001600
24401.9607180.0-0.4695740.067.80660823.998150FFOQP2NaN0.001600
24501.9359370.0-0.4701840.063.13315121.821224FFOQP3NaN0.001600
24601.9867300.0-0.4707210.063.23582221.500700FFOQP4NaN0.001600
24701.9732130.0-0.4708330.062.84241121.902497FFOQP5NaN0.001600
24801.9501820.0-0.4701080.089.66769128.040715FFOQP1NaN0.001700
24901.9622210.0-0.4706790.089.29183228.281360FFOQP2NaN0.001700
25001.9863530.0-0.4704120.083.46402525.982363FFOQP3NaN0.001700
25101.9427560.0-0.4713990.083.40334225.534204FFOQP4NaN0.001700
25201.9655010.0-0.4707320.090.88216828.472410FFOQP5NaN0.001700
25301.9916790.0-0.4706430.0112.12539832.842195FFOQP1NaN0.001800
25401.9925350.0-0.4704510.0111.93306330.916547FFOQP2NaN0.001800
25501.9955890.0-0.4711530.0104.51026029.248914FFOQP3NaN0.001800
25601.9732280.0-0.4710120.0113.23481833.905232FFOQP4NaN0.001800
25701.9714480.0-0.4704990.0104.13509029.432138FFOQP5NaN0.001800
25802.0084920.0-0.4706590.0135.49369239.999884FFOQP1NaN0.001900
25902.0000700.0-0.4708680.0135.58415040.511247FFOQP2NaN0.001900
26001.9985340.0-0.4707150.0128.41175639.518944FFOQP3NaN0.001900
26102.0058390.0-0.4709600.0138.16150043.510129FFOQP4NaN0.001900
26202.0071230.0-0.4711610.0126.56130136.456376FFOQP5NaN0.001900
\n", "
" ], "text/plain": [ " epoch train_ts_loss test_ts_loss train_df_loss test_df_loss \\\n", "218 0 2.022251 0.0 -0.470483 0.0 \n", "219 0 2.019125 0.0 -0.470648 0.0 \n", "220 0 2.018426 0.0 -0.470326 0.0 \n", "221 0 2.024847 0.0 -0.470489 0.0 \n", "222 0 2.011752 0.0 -0.470854 0.0 \n", "223 0 18.086056 0.0 -0.470948 0.0 \n", "224 0 17.492134 0.0 -0.466009 0.0 \n", "225 0 17.062976 0.0 -0.465557 0.0 \n", "226 0 18.355709 0.0 -0.468976 0.0 \n", "227 0 16.960707 0.0 -0.466620 0.0 \n", "228 0 7.910639 0.0 -0.463971 0.0 \n", "229 0 7.720632 0.0 -0.462518 0.0 \n", "230 0 8.373011 0.0 -0.461273 0.0 \n", "231 0 8.756889 0.0 -0.462116 0.0 \n", "232 0 9.262113 0.0 -0.460296 0.0 \n", "233 0 1.976473 0.0 -0.470650 0.0 \n", "234 0 1.971683 0.0 -0.469227 0.0 \n", "235 0 1.987989 0.0 -0.470447 0.0 \n", "236 0 1.993113 0.0 -0.471174 0.0 \n", "237 0 1.988667 0.0 -0.470190 0.0 \n", "238 0 1.970201 0.0 -0.471296 0.0 \n", "239 0 1.957739 0.0 -0.470062 0.0 \n", "240 0 1.960787 0.0 -0.470992 0.0 \n", "241 0 1.976369 0.0 -0.471322 0.0 \n", "242 0 1.957962 0.0 -0.470786 0.0 \n", "243 0 1.947446 0.0 -0.470626 0.0 \n", "244 0 1.960718 0.0 -0.469574 0.0 \n", "245 0 1.935937 0.0 -0.470184 0.0 \n", "246 0 1.986730 0.0 -0.470721 0.0 \n", "247 0 1.973213 0.0 -0.470833 0.0 \n", "248 0 1.950182 0.0 -0.470108 0.0 \n", "249 0 1.962221 0.0 -0.470679 0.0 \n", "250 0 1.986353 0.0 -0.470412 0.0 \n", "251 0 1.942756 0.0 -0.471399 0.0 \n", "252 0 1.965501 0.0 -0.470732 0.0 \n", "253 0 1.991679 0.0 -0.470643 0.0 \n", "254 0 1.992535 0.0 -0.470451 0.0 \n", "255 0 1.995589 0.0 -0.471153 0.0 \n", "256 0 1.973228 0.0 -0.471012 0.0 \n", "257 0 1.971448 0.0 -0.470499 0.0 \n", "258 0 2.008492 0.0 -0.470659 0.0 \n", "259 0 2.000070 0.0 -0.470868 0.0 \n", "260 0 1.998534 0.0 -0.470715 0.0 \n", "261 0 2.005839 0.0 -0.470960 0.0 \n", "262 0 2.007123 0.0 -0.471161 0.0 \n", "\n", " forward_time backward_time method seed n lr ydim \n", "218 160.426657 47.148969 FFOQP 1 NaN 0.001 1000 \n", "219 161.273411 49.882841 FFOQP 2 NaN 0.001 1000 \n", "220 151.301033 46.942996 FFOQP 3 NaN 0.001 1000 \n", "221 150.692197 45.952870 FFOQP 4 NaN 0.001 1000 \n", "222 163.837943 50.228734 FFOQP 5 NaN 0.001 1000 \n", "223 9.561901 8.319102 FFOQP 1 NaN 0.001 200 \n", "224 8.994586 7.294591 FFOQP 2 NaN 0.001 200 \n", "225 8.793956 7.021729 FFOQP 3 NaN 0.001 200 \n", "226 8.811676 7.122147 FFOQP 4 NaN 0.001 200 \n", "227 8.765207 7.910513 FFOQP 5 NaN 0.001 200 \n", "228 15.473215 4.343293 FFOQP 1 NaN 0.001 300 \n", "229 16.591839 5.063000 FFOQP 2 NaN 0.001 300 \n", "230 15.627411 4.612822 FFOQP 3 NaN 0.001 300 \n", "231 15.309109 4.847127 FFOQP 4 NaN 0.001 300 \n", "232 15.563855 4.895429 FFOQP 5 NaN 0.001 300 \n", "233 28.344851 13.864420 FFOQP 1 NaN 0.001 400 \n", "234 30.470888 16.627100 FFOQP 2 NaN 0.001 400 \n", "235 28.641650 12.223557 FFOQP 3 NaN 0.001 400 \n", "236 28.080737 13.041409 FFOQP 4 NaN 0.001 400 \n", "237 30.149175 13.199767 FFOQP 5 NaN 0.001 400 \n", "238 44.830483 19.222894 FFOQP 1 NaN 0.001 500 \n", "239 48.191841 20.310199 FFOQP 2 NaN 0.001 500 \n", "240 44.687880 20.360677 FFOQP 3 NaN 0.001 500 \n", "241 46.698743 21.821569 FFOQP 4 NaN 0.001 500 \n", "242 44.612615 20.620520 FFOQP 5 NaN 0.001 500 \n", "243 67.971698 24.638906 FFOQP 1 NaN 0.001 600 \n", "244 67.806608 23.998150 FFOQP 2 NaN 0.001 600 \n", "245 63.133151 21.821224 FFOQP 3 NaN 0.001 600 \n", "246 63.235822 21.500700 FFOQP 4 NaN 0.001 600 \n", "247 62.842411 21.902497 FFOQP 5 NaN 0.001 600 \n", "248 89.667691 28.040715 FFOQP 1 NaN 0.001 700 \n", "249 89.291832 28.281360 FFOQP 2 NaN 0.001 700 \n", "250 83.464025 25.982363 FFOQP 3 NaN 0.001 700 \n", "251 83.403342 25.534204 FFOQP 4 NaN 0.001 700 \n", "252 90.882168 28.472410 FFOQP 5 NaN 0.001 700 \n", "253 112.125398 32.842195 FFOQP 1 NaN 0.001 800 \n", "254 111.933063 30.916547 FFOQP 2 NaN 0.001 800 \n", "255 104.510260 29.248914 FFOQP 3 NaN 0.001 800 \n", "256 113.234818 33.905232 FFOQP 4 NaN 0.001 800 \n", "257 104.135090 29.432138 FFOQP 5 NaN 0.001 800 \n", "258 135.493692 39.999884 FFOQP 1 NaN 0.001 900 \n", "259 135.584150 40.511247 FFOQP 2 NaN 0.001 900 \n", "260 128.411756 39.518944 FFOQP 3 NaN 0.001 900 \n", "261 138.161500 43.510129 FFOQP 4 NaN 0.001 900 \n", "262 126.561301 36.456376 FFOQP 5 NaN 0.001 900 " ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df[df[\"method\"] == \"FFOQP\"]" ] }, { "cell_type": "code", "execution_count": 12, "id": "9a46b4f7", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:113: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n", " df_avg_method = df.groupby('method')[time_names].mean().reset_index()\n", "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:113: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n", " df_avg_method = df.groupby('method')[time_names].mean().reset_index()\n", "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:113: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n", " df_avg_method = df.groupby('method')[time_names].mean().reset_index()\n", "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:113: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n", " df_avg_method = df.groupby('method')[time_names].mean().reset_index()\n", "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:113: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n", " df_avg_method = df.groupby('method')[time_names].mean().reset_index()\n", "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:113: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n", " df_avg_method = df.groupby('method')[time_names].mean().reset_index()\n", "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:113: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n", " df_avg_method = df.groupby('method')[time_names].mean().reset_index()\n", "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:113: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n", " df_avg_method = df.groupby('method')[time_names].mean().reset_index()\n", "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:113: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n", " df_avg_method = df.groupby('method')[time_names].mean().reset_index()\n" ] } ], "source": [ "plot_total_time_vs_method_by_ydim(df, QP_DIR, ('forward_time','backward_time'), tag=\"syn\")" ] }, { "cell_type": "code", "execution_count": 13, "id": "8707e692", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "method: cvxpylayer\n", "method: qpth\n", "method: lpgd\n", "method: bpqp\n", "method: ffoqp_eq_schur\n", "method: ffocp_eq\n" ] } ], "source": [ "df = load_results(base_dir=QP_DIR, methods=METHODS_STEPS)\n", "df = df.rename(columns=lambda c: c.strip() if isinstance(c, str) else c)\n", "df[\"method\"] = pd.Categorical(df[\"method\"], categories=method_order, ordered=True)" ] }, { "cell_type": "code", "execution_count": 14, "id": "97c4aeb0", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:131: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n", " df_avg_epoch = df.groupby(['method', iteration_name])[[loss_metric_name]].mean().reset_index()\n", "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:131: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n", " df_avg_epoch = df.groupby(['method', iteration_name])[[loss_metric_name]].mean().reset_index()\n", "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:131: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n", " df_avg_epoch = df.groupby(['method', iteration_name])[[loss_metric_name]].mean().reset_index()\n", "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:131: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n", " df_avg_epoch = df.groupby(['method', iteration_name])[[loss_metric_name]].mean().reset_index()\n", "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:131: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n", " df_avg_epoch = df.groupby(['method', iteration_name])[[loss_metric_name]].mean().reset_index()\n", "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:131: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n", " df_avg_epoch = df.groupby(['method', iteration_name])[[loss_metric_name]].mean().reset_index()\n", "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:131: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n", " df_avg_epoch = df.groupby(['method', iteration_name])[[loss_metric_name]].mean().reset_index()\n", "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:131: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n", " df_avg_epoch = df.groupby(['method', iteration_name])[[loss_metric_name]].mean().reset_index()\n", "/storage/scratch1/9/zzhao628/FFOLayer/synthetic_task/plot_results.py:131: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.\n", " df_avg_epoch = df.groupby(['method', iteration_name])[[loss_metric_name]].mean().reset_index()\n" ] } ], "source": [ "plot_total_loss_vs_method_by_ydim(df, QP_DIR)" ] }, { "cell_type": "code", "execution_count": 15, "id": "905fbfa9", "metadata": {}, "outputs": [], "source": [ "# PLOT SYNTHETIC TASK -- sudoku\n", "\n", "batch_size = 8\n", "SUDOKU_DIR = f\"../sudoku_results_{batch_size}\"\n", "METHODS = [\n", " \"cvxpylayer\",\n", " \"qpth\",\n", " \"lpgd\",\n", " \"bpqp\",\n", " \"ffoqp_eq_schur\",\n", " \"ffocp_eq\",\n", "]\n", "METHODS_LEGEND = {\n", " \"cvxpylayer\": \"CvxpyLayer\",\n", " \"qpth\": \"qpth\",\n", " \"lpgd\": \"LPGD\",\n", " \"bpqp\": \"BPQP\",\n", " \"ffoqp_eq_schur\": \"FFOQP\",\n", " \"ffocp_eq\": \"FFOCP\",\n", "}\n", "\n", "METHODS_STEPS = [method+\"_steps\" for method in METHODS]\n", "\n", "method_order = [METHODS_LEGEND[m] for m in METHODS]\n", "\n", "markers = [\"o\", \"s\", \"D\", \"^\", \"v\", \"x\"]\n", "markers_dict = {method: markers[i] for i, method in enumerate(method_order)}\n", "\n", "LINEWIDTH = 1.5" ] }, { "cell_type": "code", "execution_count": 16, "id": "c4592dcc", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "method: cvxpylayer\n", "method: qpth\n", "method: lpgd\n", "method: bpqp\n", "method: ffoqp_eq_schur\n", "method: ffocp_eq\n" ] } ], "source": [ "df = load_results(base_dir=SUDOKU_DIR, methods=METHODS)\n", "df = df.rename(columns=lambda c: c.strip() if isinstance(c, str) else c)\n", "df[\"method\"] = pd.Categorical(df[\"method\"], categories=method_order, ordered=True)" ] }, { "cell_type": "code", "execution_count": 17, "id": "f9218456", "metadata": {}, "outputs": [], "source": [ "plot_total_time_vs_method_by_ydim(df, SUDOKU_DIR, ('forward_time','backward_time'), tag=\"syn\")" ] }, { "cell_type": "code", "execution_count": 18, "id": "fdc67984", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "method: cvxpylayer\n", "method: qpth\n", "method: lpgd\n", "method: bpqp\n", "method: ffoqp_eq_schur_steps\n", "method: ffocp_eq\n" ] } ], "source": [ "df = load_results(base_dir=SUDOKU_DIR, methods=METHODS_STEPS)\n", "df = df.rename(columns=lambda c: c.strip() if isinstance(c, str) else c)\n", "df[\"method\"] = pd.Categorical(df[\"method\"], categories=method_order, ordered=True)" ] }, { "cell_type": "code", "execution_count": 19, "id": "fabe7e90", "metadata": {}, "outputs": [], "source": [ "plot_total_loss_vs_method_by_ydim(df, SUDOKU_DIR)" ] }, { "cell_type": "code", "execution_count": 20, "id": "a6d9e7b9", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
itertrain_lossiter_forward_timeiter_backward_timetrain_erroraccum_forward_timeaccum_backward_timemethodseednlrydim
002.6059544.7089852.28970684.7089842.289705CvxpyLayer130.1NaN
112.2013734.3858782.476911169.0948624.766614CvxpyLayer130.1NaN
221.8019574.3723412.9481502413.4672027.714763CvxpyLayer130.1NaN
331.5138164.4125913.4622163217.87979211.176978CvxpyLayer130.1NaN
441.2658604.4846863.7257544022.36447714.902731CvxpyLayer130.1NaN
.......................................
1687011200.0741102.4392880.98480389683027.4756201157.433677FFOCP330.1NaN
1687111210.0697062.2491101.02993289763029.7247291158.463607FFOCP330.1NaN
1687211220.0712562.2329971.03425489843031.9577251159.497859FFOCP330.1NaN
1687311230.0708652.4326751.01376589923034.3903991160.511622FFOCP330.1NaN
1687411240.0693412.9383020.99208290003037.3287001161.503702FFOCP330.1NaN
\n", "

16875 rows × 12 columns

\n", "
" ], "text/plain": [ " iter train_loss iter_forward_time iter_backward_time train_error \\\n", "0 0 2.605954 4.708985 2.289706 8 \n", "1 1 2.201373 4.385878 2.476911 16 \n", "2 2 1.801957 4.372341 2.948150 24 \n", "3 3 1.513816 4.412591 3.462216 32 \n", "4 4 1.265860 4.484686 3.725754 40 \n", "... ... ... ... ... ... \n", "16870 1120 0.074110 2.439288 0.984803 8968 \n", "16871 1121 0.069706 2.249110 1.029932 8976 \n", "16872 1122 0.071256 2.232997 1.034254 8984 \n", "16873 1123 0.070865 2.432675 1.013765 8992 \n", "16874 1124 0.069341 2.938302 0.992082 9000 \n", "\n", " accum_forward_time accum_backward_time method seed n lr ydim \n", "0 4.708984 2.289705 CvxpyLayer 1 3 0.1 NaN \n", "1 9.094862 4.766614 CvxpyLayer 1 3 0.1 NaN \n", "2 13.467202 7.714763 CvxpyLayer 1 3 0.1 NaN \n", "3 17.879792 11.176978 CvxpyLayer 1 3 0.1 NaN \n", "4 22.364477 14.902731 CvxpyLayer 1 3 0.1 NaN \n", "... ... ... ... ... .. ... ... \n", "16870 3027.475620 1157.433677 FFOCP 3 3 0.1 NaN \n", "16871 3029.724729 1158.463607 FFOCP 3 3 0.1 NaN \n", "16872 3031.957725 1159.497859 FFOCP 3 3 0.1 NaN \n", "16873 3034.390399 1160.511622 FFOCP 3 3 0.1 NaN \n", "16874 3037.328700 1161.503702 FFOCP 3 3 0.1 NaN \n", "\n", "[16875 rows x 12 columns]" ] }, "execution_count": 20, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df" ] }, { "cell_type": "code", "execution_count": null, "id": "913d7f91", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "id": "291c05f3", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "rl", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.14" } }, "nbformat": 4, "nbformat_minor": 5 }