Scatter¶
-
class
mastml.plots.
Scatter
[source]¶ Bases:
object
Class to generate scatter plots, such as parity plots showing true vs. predicted data values
- Args:
- None
Methods:
- plot_predicted_vs_true: method to plot a parity plot
- Args:
y_true: (pd.Series), series of true y data
y_pred: (pd.Series), series of predicted y data
savepath: (str), string denoting the save path for the figure image
data_type: (str), string denoting the data type (e.g. train, test, leaveout)
x_label: (str), string denoting the true and predicted property name
metrics_list: (list), list of strings of metric names to evaluate and include on the figure
show_figure: (bool), whether or not to show the figure output (e.g. when using Jupyter notebook)
- Returns:
- None
- plot_best_worst_split: method to find the best and worst split in an evaluation set and plot them together
- Args:
savepath: (str), string denoting the save path for the figure image
data_type: (str), string denoting the data type (e.g. train, test, leaveout)
x_label: (str), string denoting the true and predicted property name
metrics_list: (list), list of strings of metric names to evaluate and include on the figure
show_figure: (bool), whether or not to show the figure output (e.g. when using Jupyter notebook)
- Returns:
- None
- plot_best_worst_per_point: method to find all of the best and worst data points from an evaluation set and plot them together
- Args:
savepath: (str), string denoting the save path for the figure image
data_type: (str), string denoting the data type (e.g. train, test, leaveout)
x_label: (str), string denoting the true and predicted property name
metrics_list: (list), list of strings of metric names to evaluate and include on the figure
show_figure: (bool), whether or not to show the figure output (e.g. when using Jupyter notebook)
- Returns:
- None
- plot_predicted_vs_true_bars: method to plot the average predicted value of each data point from an evaluation set with error bars denoting the standard deviation in predicted values
- Args:
savepath: (str), string denoting the save path for the figure image
data_type: (str), string denoting the data type (e.g. train, test, leaveout)
x_label: (str), string denoting the true and predicted property name
metrics_list: (list), list of strings of metric names to evaluate and include on the figure
show_figure: (bool), whether or not to show the figure output (e.g. when using Jupyter notebook)
- Returns:
- None
- plot_metric_vs_group: method to plot the metric value for each group during e.g. a LeaveOneGroupOut data split
- Args:
savepath: (str), string denoting the save path for the figure image
data_type: (str), string denoting the data type (e.g. train, test, leaveout)
show_figure: (bool), whether or not to show the figure output (e.g. when using Jupyter notebook)
- Returns:
- None
Methods Summary
plot_best_worst_per_point
(savepath, …[, …])plot_best_worst_split
(savepath, data_type, …)plot_metric_vs_group
(savepath, data_type, …)plot_predicted_vs_true
(y_true, y_pred, …)plot_predicted_vs_true_bars
(savepath, …[, …])Methods Documentation
-
classmethod
plot_best_worst_per_point
(savepath, data_type, x_label, metrics_list, show_figure=False)[source]¶
-
classmethod
plot_best_worst_split
(savepath, data_type, x_label, metrics_list, show_figure=False)[source]¶