Skip to content

Instantly share code, notes, and snippets.

@messiest
Last active December 20, 2017 22:36
Show Gist options
  • Save messiest/3f5ae4f0e7f457bae0f0f0b43e62f14c to your computer and use it in GitHub Desktop.
Save messiest/3f5ae4f0e7f457bae0f0f0b43e62f14c to your computer and use it in GitHub Desktop.
visualize multicore
def visualize(data, save=False):
"""
plot the results
"""
y = data.copy() # get y-values
x = y.pop('N') # get x-values
plt.plot(x, y)
plt.title("Average Model Training Time")
plt.xlabel('Sample Size ($n$)')
plt.ylabel('Time (ms)')
plt.legend([f'n_jobs={n}' for n in range(1, len(data.columns))])
if save: plt.savefig('spread_the_love_new.png', dpi=250)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment