Commit 2f965c7a authored by Ryan Randles Jones's avatar Ryan Randles Jones
Browse files

organized for better readbaility

parent 7114747d
......@@ -361,31 +361,6 @@
"print(kmeans_elapsed_reqmem.cluster_centers_)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"figure = plt.figure(figsize=(14, 8))\n",
"figure.suptitle('Runtime per Requested gigs of RAM %i gigs or less'%UpperlimitGB)\n",
"\n",
"elapsed_rqmem_clustergraph = figure.add_subplot(121)\n",
"elapsed_rqmem_clustergraph.scatter(df_runtime_cluster['ReqMemCPU'],df_runtime_cluster['Elapsed'], c=kmeans_elapsed_reqmem.labels_, cmap='rainbow')\n",
"elapsed_rqmem_clustergraph.scatter(kmeans_elapsed_reqmem.cluster_centers_[:,0] ,kmeans_elapsed_reqmem.cluster_centers_[:,1], color='black')\n",
"plt.xlabel('ReqMemCPU(gigs)')\n",
"plt.ylabel('Elapsed(hours)')\n",
"\n",
"elapsed_rqmem_clustergraph_3d = figure.add_subplot(122, projection='3d')\n",
"elapsed_rqmem_clustergraph_3d.scatter(df_runtime_cluster['ReqMemCPU'], df_runtime_cluster['Elapsed'], df_runtime_cluster['AllocCPUS'], c=kmeans_elapsed_reqmem.labels_ ,cmap='rainbow')\n",
"elapsed_rqmem_clustergraph_3d.scatter(kmeans_elapsed_reqmem.cluster_centers_[:,0] ,kmeans_elapsed_reqmem.cluster_centers_[:,1], color='black')\n",
"elapsed_rqmem_clustergraph_3d.set_xlabel('ReqMemCPU(gigs)')\n",
"elapsed_rqmem_clustergraph_3d.set_ylabel('Elapsed(hours)')\n",
"elapsed_rqmem_clustergraph_3d.set_zlabel('AllocCPUS')\n",
"\n",
"plt.show()\n"
]
},
{
"cell_type": "code",
"execution_count": null,
......@@ -459,18 +434,41 @@
"metadata": {},
"outputs": [],
"source": [
"figure = plt.figure(figsize=(14, 12))\n",
"figure.suptitle('Clusters')\n",
"figure = plt.figure(figsize=(14, 8))\n",
"figure.suptitle('Runtime per Requested gigs of RAM %i gigs or less'%UpperlimitGB)\n",
"\n",
"elapsed_rqmem_clustergraph = figure.add_subplot(121)\n",
"elapsed_rqmem_clustergraph.scatter(df_runtime_cluster['ReqMemCPU'],df_runtime_cluster['Elapsed'], c=kmeans_elapsed_reqmem.labels_, cmap='rainbow')\n",
"elapsed_rqmem_clustergraph.scatter(kmeans_elapsed_reqmem.cluster_centers_[:,0] ,kmeans_elapsed_reqmem.cluster_centers_[:,1], color='black')\n",
"plt.xlabel('ReqMemCPU(gigs)')\n",
"plt.ylabel('Elapsed(hours)')\n",
"\n",
"elapsed_rqmem_clustergraph_3d = figure.add_subplot(122, projection='3d')\n",
"elapsed_rqmem_clustergraph_3d.scatter(df_runtime_cluster['ReqMemCPU'], df_runtime_cluster['Elapsed'], df_runtime_cluster['AllocCPUS'], c=kmeans_elapsed_reqmem.labels_ ,cmap='rainbow')\n",
"elapsed_rqmem_clustergraph_3d.scatter(kmeans_elapsed_reqmem.cluster_centers_[:,0] ,kmeans_elapsed_reqmem.cluster_centers_[:,1], color='black')\n",
"elapsed_rqmem_clustergraph_3d.set_xlabel('ReqMemCPU(gigs)')\n",
"elapsed_rqmem_clustergraph_3d.set_ylabel('Elapsed(hours)')\n",
"elapsed_rqmem_clustergraph_3d.set_zlabel('AllocCPUS')\n",
"\n",
"plt.show()\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"figure = plt.figure( figsize=(16, 16))\n",
"\n",
"#purple cluster and swarmplot\n",
"elapsed_reqmem_clustergraph_0 = figure.add_subplot(321)\n",
"elapsed_reqmem_clustergraph_0.scatter(df_elapsed_reqmem_0['ReqMemCPU'],df_elapsed_reqmem_0['Elapsed'], color = \"purple\")\n",
"elapsed_reqmem_clustergraph_0 = figure.add_subplot(423)\n",
"elapsed_reqmem_clustergraph_0.scatter(df_elapsed_reqmem_0['ReqMemCPU'],df_elapsed_reqmem_0['Elapsed'], color = \"blueviolet\")\n",
"plt.xlabel('ReqMemCPU(gigs)')\n",
"plt.ylabel('Elapsed(hours)')\n",
"\n",
"figure.add_subplot(322)\n",
"figure.add_subplot(424)\n",
"elapsed_reqmem_swarmgraph_0 = sns.swarmplot(data=df_elapsed_reqmem_swarmplot0, x='ReqMemCPU', y='Elapsed')\n",
"\n",
"plt.yticks(np.arange(df_elapsed_reqmem_0.Elapsed.min(), df_elapsed_reqmem_0.Elapsed.max(), 5))\n",
"plt.margins(0.02)\n",
"plt.xlabel('ReqMemCPU(gigs)')\n",
......@@ -478,14 +476,13 @@
"\n",
"\n",
"#green cluster and swarmplot\n",
"elapsed_reqmem_clustergraph_1 = figure.add_subplot(323)\n",
"elapsed_reqmem_clustergraph_1.scatter(df_elapsed_reqmem_1['ReqMemCPU'],df_elapsed_reqmem_1['Elapsed'], color = \"green\")\n",
"elapsed_reqmem_clustergraph_1 = figure.add_subplot(425)\n",
"elapsed_reqmem_clustergraph_1.scatter(df_elapsed_reqmem_1['ReqMemCPU'],df_elapsed_reqmem_1['Elapsed'], color = \"aquamarine\")\n",
"plt.xlabel('ReqMemCPU(gigs)')\n",
"plt.ylabel('Elapsed(hours)')\n",
"\n",
"figure.add_subplot(324)\n",
"figure.add_subplot(426)\n",
"elapsed_reqmem_swarmgraph_1 = sns.swarmplot(data=df_elapsed_reqmem_swarmplot1, x='ReqMemCPU', y='Elapsed')\n",
"\n",
"plt.yticks(np.arange(df_elapsed_reqmem_1.Elapsed.min(), df_elapsed_reqmem_1.Elapsed.max(), 5))\n",
"plt.margins(0.02)\n",
"plt.xlabel('ReqMemCPU(gigs)')\n",
......@@ -493,19 +490,21 @@
"\n",
"\n",
"#red cluster and swarmplot\n",
"elapsed_reqmem_clustergraph_2 = figure.add_subplot(325)\n",
"elapsed_reqmem_clustergraph_2 = figure.add_subplot(427)\n",
"elapsed_reqmem_clustergraph_2.scatter(df_elapsed_reqmem_2['ReqMemCPU'],df_elapsed_reqmem_2['Elapsed'], color = \"red\")\n",
"plt.xlabel('ReqMemCPU(gigs)')\n",
"plt.ylabel('Elapsed(hours)')\n",
"\n",
"figure.add_subplot(326)\n",
"figure.add_subplot(428)\n",
"elapsed_reqmem_swarmgraph_2 = sns.swarmplot(data=df_elapsed_reqmem_swarmplot2, x='ReqMemCPU', y='Elapsed')\n",
"\n",
"plt.yticks(np.arange(df_elapsed_reqmem_2.Elapsed.min(), df_elapsed_reqmem_2.Elapsed.max(), 10))\n",
"plt.margins(0.02)\n",
"plt.xlabel('ReqMemCPU(gigs)')\n",
"plt.ylabel('Elapsed(hours)')\n",
"\n",
"figure.subplots_adjust(left=0.2, wspace=0.2, top=1.2, hspace=0.3)\n",
"\n",
"figure.suptitle('This is a somewhat long figure title', fontsize=20)\n",
"\n",
"plt.show()\n"
]
......@@ -531,31 +530,6 @@
"print(kmeans_elapsed_alloc.cluster_centers_)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"figure = plt.figure(figsize=(14, 8))\n",
"figure.suptitle('Runtime per Requested gigs of RAM %i gigs or less'%UpperlimitGB)\n",
"\n",
"elapsed_alloc_clustergraph = figure.add_subplot(121)\n",
"elapsed_alloc_clustergraph.scatter(df_runtime_cluster['AllocCPUS'],df_runtime_cluster['Elapsed'], c=kmeans_elapsed_alloc.labels_, cmap='rainbow')\n",
"elapsed_alloc_clustergraph.scatter(kmeans_elapsed_alloc.cluster_centers_[:,0] ,kmeans_elapsed_alloc.cluster_centers_[:,1], color='black')\n",
"plt.xlabel('AllocCPUS')\n",
"plt.ylabel('Elapsed(hours)')\n",
"\n",
"elapsed_alloc_clustergraph_3d = figure.add_subplot(122, projection='3d')\n",
"elapsed_alloc_clustergraph_3d.scatter(df_runtime_cluster['AllocCPUS'], df_runtime_cluster['Elapsed'], df_runtime_cluster['ReqMemCPU'], c=kmeans_elapsed_alloc.labels_ ,cmap='rainbow')\n",
"elapsed_alloc_clustergraph_3d.scatter(kmeans_elapsed_alloc.cluster_centers_[:,0] ,kmeans_elapsed_alloc.cluster_centers_[:,1], color='black')\n",
"elapsed_alloc_clustergraph_3d.set_xlabel('AllocCPUS')\n",
"elapsed_alloc_clustergraph_3d.set_ylabel('Elapsed(hours)')\n",
"elapsed_alloc_clustergraph_3d.set_zlabel('ReqMemCPU(gigs)')\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
......@@ -610,6 +584,31 @@
"print(\"AllocCPUS:\", \"min =\",df_elapsed_alloc_2.AllocCPUS.min(),\" \",\"max =\",df_elapsed_alloc_2.AllocCPUS.max())"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"figure = plt.figure(figsize=(14, 8))\n",
"figure.suptitle('Runtime per Requested gigs of RAM %i gigs or less'%UpperlimitGB)\n",
"\n",
"elapsed_alloc_clustergraph = figure.add_subplot(121)\n",
"elapsed_alloc_clustergraph.scatter(df_runtime_cluster['AllocCPUS'],df_runtime_cluster['Elapsed'], c=kmeans_elapsed_alloc.labels_, cmap='rainbow')\n",
"elapsed_alloc_clustergraph.scatter(kmeans_elapsed_alloc.cluster_centers_[:,0] ,kmeans_elapsed_alloc.cluster_centers_[:,1], color='black')\n",
"plt.xlabel('AllocCPUS')\n",
"plt.ylabel('Elapsed(hours)')\n",
"\n",
"elapsed_alloc_clustergraph_3d = figure.add_subplot(122, projection='3d')\n",
"elapsed_alloc_clustergraph_3d.scatter(df_runtime_cluster['AllocCPUS'], df_runtime_cluster['Elapsed'], df_runtime_cluster['ReqMemCPU'], c=kmeans_elapsed_alloc.labels_ ,cmap='rainbow')\n",
"elapsed_alloc_clustergraph_3d.scatter(kmeans_elapsed_alloc.cluster_centers_[:,0] ,kmeans_elapsed_alloc.cluster_centers_[:,1], color='black')\n",
"elapsed_alloc_clustergraph_3d.set_xlabel('AllocCPUS')\n",
"elapsed_alloc_clustergraph_3d.set_ylabel('Elapsed(hours)')\n",
"elapsed_alloc_clustergraph_3d.set_zlabel('ReqMemCPU(gigs)')\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
......@@ -627,18 +626,16 @@
"metadata": {},
"outputs": [],
"source": [
"figure = plt.figure(figsize=(14, 12))\n",
"figure.suptitle('Clusters')\n",
"figure = plt.figure( figsize=(21, 16))\n",
"\n",
"#purple cluster and swarmplot\n",
"elapsed_alloc_clustergraph_0 = figure.add_subplot(321)\n",
"elapsed_alloc_clustergraph_0.scatter(df_elapsed_alloc_0['AllocCPUS'],df_elapsed_alloc_0['Elapsed'], color = \"purple\")\n",
"elapsed_alloc_clustergraph_0.scatter(df_elapsed_alloc_0['AllocCPUS'],df_elapsed_alloc_0['Elapsed'], color = \"blueviolet\")\n",
"plt.xlabel('AllocCPUS')\n",
"plt.ylabel('Elapsed(hours)')\n",
"\n",
"figure.add_subplot(322)\n",
"elapsed_alloc_swarmgraph_0 = sns.swarmplot(data=df_elapsed_alloc_swarmplot0, x='AllocCPUS', y='Elapsed')\n",
"\n",
"plt.yticks(np.arange(df_elapsed_alloc_0.Elapsed.min(), df_elapsed_alloc_0.Elapsed.max(), 5))\n",
"plt.margins(0.02)\n",
"plt.xlabel('AllocCPUS')\n",
......@@ -647,15 +644,13 @@
"\n",
"#green cluster and swarmplot\n",
"elapsed_alloc_clustergraph_1 = figure.add_subplot(323)\n",
"elapsed_alloc_clustergraph_1.scatter(df_elapsed_alloc_1['AllocCPUS'],df_elapsed_alloc_1['Elapsed'], color = \"green\")\n",
"elapsed_alloc_clustergraph_1.scatter(df_elapsed_alloc_1['AllocCPUS'],df_elapsed_alloc_1['Elapsed'], color = \"aquamarine\")\n",
"plt.xlabel('AllocCPUS')\n",
"plt.ylabel('Elapsed(hours)')\n",
"\n",
"figure.add_subplot(324)\n",
"elapsed_alloc_swarmgraph_1 = sns.swarmplot(data=df_elapsed_alloc_swarmplot1, x='AllocCPUS', y='Elapsed')\n",
"\n",
"plt.yticks(np.arange(df_elapsed_alloc_1.Elapsed.min(), df_elapsed_alloc_1.Elapsed.max(), 5))\n",
"\n",
"plt.margins(0.02)\n",
"plt.xlabel('AllocCPUS')\n",
"plt.ylabel('Elapsed(hours)')\n",
......@@ -669,13 +664,14 @@
"\n",
"figure.add_subplot(326)\n",
"elapsed_alloc_swarmgraph_2 = sns.swarmplot(data=df_elapsed_alloc_swarmplot2, x='AllocCPUS', y='Elapsed')\n",
"\n",
"plt.yticks(np.arange(df_elapsed_alloc_2.Elapsed.min(), df_elapsed_alloc_2.Elapsed.max(), 10))\n",
"\n",
"plt.margins(0.02)\n",
"plt.xlabel('AllocCPUS')\n",
"plt.ylabel('Elapsed(hours)')\n",
"\n",
"figure.subplots_adjust(left=0.2, wspace=0.2, top=.94, hspace=0.3)\n",
"figure.suptitle('This is a somewhat long figure title', fontsize=20)\n",
"\n",
"\n",
"plt.show()"
]
......@@ -769,32 +765,6 @@
"print(kmeans_alloc_reqmem.cluster_centers_)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"figure = plt.figure(figsize=(14, 8))\n",
"figure.suptitle('Runtime per Requested gigs of RAM %i gigs or less'%UpperlimitGB)\n",
"\n",
"alloc_reqmem_cluster_graph = figure.add_subplot(121)\n",
"alloc_reqmem_cluster_graph.scatter(df_alloc_cluster['ReqMemCPU'],df_alloc_cluster['AllocCPUS'], c=kmeans_alloc_reqmem.labels_, cmap='rainbow')\n",
"alloc_reqmem_cluster_graph.scatter(kmeans_alloc_reqmem.cluster_centers_[:,0] ,kmeans_alloc_reqmem.cluster_centers_[:,1], color='black')\n",
"plt.xlabel('ReqMemCPU(gigs)')\n",
"plt.ylabel('AllocCPUS')\n",
"\n",
"\n",
"alloc_reqmem_clustergraph_3d = figure.add_subplot(122, projection='3d')\n",
"alloc_reqmem_clustergraph_3d.scatter(df_alloc_cluster['ReqMemCPU'], df_alloc_cluster['AllocCPUS'], df_alloc_cluster['Elapsed'], c=kmeans_alloc_reqmem.labels_ ,cmap='rainbow')\n",
"alloc_reqmem_clustergraph_3d.scatter(kmeans_alloc_reqmem.cluster_centers_[:,0] ,kmeans_alloc_reqmem.cluster_centers_[:,1], color='black')\n",
"alloc_reqmem_clustergraph_3d.set_xlabel('ReqMemCPU(gigs')\n",
"alloc_reqmem_clustergraph_3d.set_ylabel('AllocCPUS')\n",
"alloc_reqmem_clustergraph_3d.set_zlabel('Elapsed(hours)')\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
......@@ -866,20 +836,44 @@
"metadata": {},
"outputs": [],
"source": [
"figure = plt.figure(figsize=(14, 12))\n",
"figure.suptitle('Clusters')\n",
"figure = plt.figure(figsize=(14, 8))\n",
"figure.suptitle('Runtime per Requested gigs of RAM %i gigs or less'%UpperlimitGB)\n",
"\n",
"alloc_reqmem_cluster_graph = figure.add_subplot(121)\n",
"alloc_reqmem_cluster_graph.scatter(df_alloc_cluster['ReqMemCPU'],df_alloc_cluster['AllocCPUS'], c=kmeans_alloc_reqmem.labels_, cmap='rainbow')\n",
"alloc_reqmem_cluster_graph.scatter(kmeans_alloc_reqmem.cluster_centers_[:,0] ,kmeans_alloc_reqmem.cluster_centers_[:,1], color='black')\n",
"plt.xlabel('ReqMemCPU(gigs)')\n",
"plt.ylabel('AllocCPUS')\n",
"\n",
"\n",
"alloc_reqmem_clustergraph_3d = figure.add_subplot(122, projection='3d')\n",
"alloc_reqmem_clustergraph_3d.scatter(df_alloc_cluster['ReqMemCPU'], df_alloc_cluster['AllocCPUS'], df_alloc_cluster['Elapsed'], c=kmeans_alloc_reqmem.labels_ ,cmap='rainbow')\n",
"alloc_reqmem_clustergraph_3d.scatter(kmeans_alloc_reqmem.cluster_centers_[:,0] ,kmeans_alloc_reqmem.cluster_centers_[:,1], color='black')\n",
"alloc_reqmem_clustergraph_3d.set_xlabel('ReqMemCPU(gigs')\n",
"alloc_reqmem_clustergraph_3d.set_ylabel('AllocCPUS')\n",
"alloc_reqmem_clustergraph_3d.set_zlabel('Elapsed(hours)')\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"figure = plt.figure( figsize=(21, 16))\n",
"\n",
"\n",
"#purple cluster and swarmplot\n",
"alloc_reqmem_clustergraph_0 = figure.add_subplot(321)\n",
"alloc_reqmem_clustergraph_0.scatter(df_alloc_reqmem_0['ReqMemCPU'],df_alloc_reqmem_0['AllocCPUS'], color = \"purple\")\n",
"alloc_reqmem_clustergraph_0.scatter(df_alloc_reqmem_0['ReqMemCPU'],df_alloc_reqmem_0['AllocCPUS'], color = \"blueviolet\")\n",
"plt.xlabel('ReqMemCPU(gigs)')\n",
"plt.ylabel('AllocCPUS')\n",
"\n",
"figure.add_subplot(322)\n",
"alloc_reqmem_swarmgraph_0 = sns.swarmplot(data=df_alloc_reqmem_swarmplot0, x='ReqMemCPU', y='AllocCPUS')\n",
"\n",
"plt.yticks(np.arange(0, df_alloc_reqmem_0.AllocCPUS.max(), 3))\n",
"\n",
"plt.margins(0.02)\n",
"plt.xlabel('ReqMemCPU(gigs)')\n",
"plt.ylabel('AllocCPUS')\n",
......@@ -887,15 +881,13 @@
"\n",
"#green cluster and swarmplot\n",
"alloc_reqmem_clustergraph_1 = figure.add_subplot(323)\n",
"alloc_reqmem_clustergraph_1.scatter(df_alloc_reqmem_1['ReqMemCPU'],df_alloc_reqmem_1['AllocCPUS'], color = \"green\")\n",
"alloc_reqmem_clustergraph_1.scatter(df_alloc_reqmem_1['ReqMemCPU'],df_alloc_reqmem_1['AllocCPUS'], color = \"aquamarine\")\n",
"plt.xlabel('ReqMemCPU(gigs)')\n",
"plt.ylabel('AllocCPUS')\n",
"\n",
"figure.add_subplot(324)\n",
"alloc_reqmem_swarmgraph_1 = sns.swarmplot(data=df_alloc_reqmem_swarmplot1, x='ReqMemCPU', y='AllocCPUS')\n",
"\n",
"plt.yticks(np.arange(df_alloc_reqmem_1.AllocCPUS.min(), df_alloc_reqmem_1.AllocCPUS.max(), 5))\n",
"\n",
"plt.margins(0.02)\n",
"plt.xlabel('ReqMemCPU(gigs)')\n",
"plt.ylabel('AllocCPUS')\n",
......@@ -909,13 +901,15 @@
"\n",
"figure.add_subplot(326)\n",
"alloc_reqmem_swarmgraph_2 = sns.swarmplot(data=df_alloc_reqmem_swarmplot2, x='ReqMemCPU', y='AllocCPUS')\n",
"\n",
"plt.yticks(np.arange(df_alloc_reqmem_2.AllocCPUS.min(), df_alloc_reqmem_2.AllocCPUS.max(), 5))\n",
"\n",
"plt.margins(0.02)\n",
"plt.xlabel('ReqMemCPU(gigs)')\n",
"plt.ylabel('AllocCPUS')\n",
"\n",
"figure.subplots_adjust(left=0.2, wspace=0.2, top=.94, hspace=0.3)\n",
"figure.suptitle('This is a somewhat long figure title', fontsize=20)\n",
"\n",
"\n",
"\n",
"plt.show()"
]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment