plot_curve[source]
plot_curve(x:list,y:Tensor,label:str=None,x_label:str=None,y_label:str=None,axis:matplotlib.axes.AxesSubplot=None,logplot:bool=False,y_std:Tensor=None,std_alpha:float=0.2,show_all_xticks:bool=True, **kwargs)
A method to plot a simple one dimensional curve using matplotlib.
| Type | Default | Details | |
|---|---|---|---|
x |
list |
The x coordinates of the data. | |
y |
Tensor |
The y coordinates of the data. | |
label |
str |
None |
The label of the curve. |
x_label |
str |
None |
The label of the x axis. |
y_label |
str |
None |
The label of the y axis. |
axis |
matplotlib.axes.AxesSubplot |
None |
An axes object, if already known. Otherwise a new axis is created. |
logplot |
bool |
False |
Whether to plot the x axis logarithmically. |
y_std |
Tensor |
None |
The standard deviation of the y values, if known. |
std_alpha |
float |
0.2 |
The alpha value for y_std. Only has an effect if y_std is not None. |
show_all_xticks |
bool |
True |
Whether to display all ticks of the data along the x axis. |
kwargs |
No Content |
plot_logs[source]
plot_logs(x:list,logs:defaultdict,criterion_names:list,file_path:str=None,label:str=None,x_label:str=None,share_x_axis:bool=True,show_legend:bool=True,fig_and_axes:tuple=None,logplot:bool=False,plot_with_std:bool=False,std_alpha:float=0.2,y_ticks:list=None, **kwargs)
A method to plot criterion evaluation curves stored in a logs file.
| Type | Default | Details | |
|---|---|---|---|
x |
list |
The x coordinates of the data., | |
logs |
defaultdict |
A dictionary that contains a list of values for each key. The keys are the same strings stored in criterion_names, optionally along with tiehr standard deviations. |
|
criterion_names |
list |
The criterion names deterime which keys are accesssed in the logs file for the plot. | |
file_path |
str |
None |
The path where the plot should be saved as a png file. |
label |
str |
None |
The label of the plot. |
x_label |
str |
None |
The x label of the plot. |
share_x_axis |
bool |
True |
Whether all plots should share the same x axis or should be plotted in individual plots below one another. |
show_legend |
bool |
True |
Whether to show a legend for the plot. |
fig_and_axes |
tuple |
None |
A tuple containing a figure and an axes object, if already built. |
logplot |
bool |
False |
Whether to plot the x axis logarithmically. |
plot_with_std |
bool |
False |
Whether to also plot the standard deviations of the data. Requires keys {criterion_name}_std in logs. |
std_alpha |
float |
0.2 |
The alpha value for y_std. Only has an effect if y_std is not None. |
y_ticks |
list |
None |
The y ticks for the plots. |
kwargs |
No Content |