Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 annot_min(x,y, ax=None): | |
xmax = x[np.argmin(y)] | |
ymax = np.array(y).min() | |
text= "x={:.3f}, y={:.3f}".format(xmax, ymax) | |
if not ax: | |
ax=plt.gca() | |
bbox_props = dict(boxstyle="square,pad=0.3", fc="w", ec="k", lw=0.72) | |
arrowprops=dict(arrowstyle="->",connectionstyle="angle,angleA=0,angleB=60", color='red') | |
kw = dict(xycoords='data',textcoords="axes fraction", | |
arrowprops=arrowprops, bbox=bbox_props, ha="right", va="top") |
This file contains hidden or 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 plot_learning_curve(log_df, | |
metric_name='loss', | |
rolling=False, | |
window_size=5, | |
ylim=(None, None), **kwargs): | |
''' | |
A simple function for plotting a learning curve of the model | |
Args: | |
log_df: input pandas Dataframe |