def _plot_TrainVal_values(xvalues, train_val_scores, plot_train, xlabel, title, figsize=(6, 6), bar=False):
    "\n    Plot the given list of training-validation scores.\n\n    This function is an auxiliary function for the model selection functions. It's meant to be private in the\n    module.\n\n    Parameters\n    ----------\n    xvalues: list (in general iterable)\n        Values to put in the x axis of the plot.\n    train_val_scores: np.array\n        Two dimensional np.array, containing two columns: the first contains the trainining scores, the second the validation\n        scores.\n        Basically, it is a list of training-validation scores.\n    plot_train: bool\n        Indicates whether to plot also the training scores or to plot only the validation ones.\n    xlabel: str\n        Label of the x axis.\n    title: str\n        Title of the plot.\n    figsize: tuple\n        Two dimensions of the plot.\n    bar: bool\n        Indicates whether to plot the scores using bars or using points.\n        If `bar` it's True, `xvalues` must contain string (i.e. labels).\n    Returns\n    ----------\n    matplotlib.axes.Axes\n        The matplotlib Axes where the plot has been made.\n    "
    (fig, ax) = plt.subplots(figsize=figsize)
    if (not bar):
        if plot_train:
            ax.plot(xvalues, train_val_scores[:, 0], 'o:', label='Train')
        ax.plot(xvalues, train_val_scores[:, 1], 'o:', label='Validation')
    elif plot_train:
        x = np.arange(len(xvalues))
        width = 0.35
        ax.bar((x - (width / 2)), train_val_scores[:, 0], width=width, label='Train')
        ax.bar((x + (width / 2)), train_val_scores[:, 1], width=width, label='Validation')
        ax.set_xticks(x)
        ax.set_xticklabels(xvalues)
    else:
        ax.bar(xvalues, train_val_scores[:, 1], label='Validation')
    ax.set_xlabel(xlabel)
    ax.set_title(title)
    ax.grid()
    ax.legend()
    return ax
Plot the given list of training-validation scores.

This function is an auxiliary function for the model selection functions. It's meant to be private in the
module.

Parameters
----------
xvalues: list (in general iterable)
    Values to put in the x axis of the plot.
train_val_scores: np.array
    Two dimensional np.array, containing two columns: the first contains the trainining scores, the second the validation
    scores.
    Basically, it is a list of training-validation scores.
plot_train: bool
    Indicates whether to plot also the training scores or to plot only the validation ones.
xlabel: str
    Label of the x axis.
title: str
    Title of the plot.
figsize: tuple
    Two dimensions of the plot.
bar: bool
    Indicates whether to plot the scores using bars or using points.
    If `bar` it's True, `xvalues` must contain string (i.e. labels).
Returns
----------
matplotlib.axes.Axes
    The matplotlib Axes where the plot has been made.
def _plot_TrainVal_values(xvalues, train_val_scores, plot_train, xlabel, title, figsize=(6, 6), bar=False):
    "\n    Plot the given list of training-validation scores.\n\n    This function is an auxiliary function for the model selection functions. It's meant to be private in the\n    module.\n\n    Parameters\n    ----------\n    xvalues: list (in general iterable)\n        Values to put in the x axis of the plot.\n    train_val_scores: np.array\n        Two dimensional np.array, containing two columns: the first contains the trainining scores, the second the validation\n        scores.\n        Basically, it is a list of training-validation scores.\n    plot_train: bool\n        Indicates whether to plot also the training scores or to plot only the validation ones.\n    xlabel: str\n        Label of the x axis.\n    title: str\n        Title of the plot.\n    figsize: tuple\n        Two dimensions of the plot.\n    bar: bool\n        Indicates whether to plot the scores using bars or using points.\n        If `bar` it's True, `xvalues` must contain string (i.e. labels).\n    Returns\n    ----------\n    matplotlib.axes.Axes\n        The matplotlib Axes where the plot has been made.\n    "
    (fig, ax) = plt.subplots(figsize=figsize)
    if (not bar):
        if plot_train:
            ax.plot(xvalues, train_val_scores[:, 0], 'o:', label='Train')
        ax.plot(xvalues, train_val_scores[:, 1], 'o:', label='Validation')
    elif plot_train:
        x = np.arange(len(xvalues))
        width = 0.35
        ax.bar((x - (width / 2)), train_val_scores[:, 0], width=width, label='Train')
        ax.bar((x + (width / 2)), train_val_scores[:, 1], width=width, label='Validation')
        ax.set_xticks(x)
        ax.set_xticklabels(xvalues)
    else:
        ax.bar(xvalues, train_val_scores[:, 1], label='Validation')
    ax.set_xlabel(xlabel)
    ax.set_title(title)
    ax.grid()
    ax.legend()
    return ax