def generate_plots(model, partition):
r"""Generate plots while running the pipeline.
Parameters
----------
model : alphapy.Model
The model object with plotting specifications.
partition : alphapy.Partition
Reference to the dataset.
Returns
-------
None : None
"""
logger.info('='*80)
logger.info("Generating Plots for partition: %s", datasets[partition])
# Extract model parameters
calibration_plot = model.specs['calibration_plot']
confusion_matrix = model.specs['confusion_matrix']
importances = model.specs['importances']
learning_curve = model.specs['learning_curve']
roc_curve = model.specs['roc_curve']
# Generate plots
if calibration_plot:
plot_calibration(model, partition)
if confusion_matrix:
plot_confusion_matrix(model, partition)
if roc_curve:
plot_roc_curve(model, partition)
if partition == Partition.train:
if learning_curve:
plot_learning_curve(model, partition)
if importances:
plot_importance(model, partition)
#
# Function get_plot_directory
#
评论列表
文章目录