Last active
December 20, 2017 22:36
-
-
Save messiest/3f5ae4f0e7f457bae0f0f0b43e62f14c to your computer and use it in GitHub Desktop.
visualize multicore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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