<commit_before>import numpy as np
import matplotlib.pyplot as plt


def learning_curve(train_scores, test_scores, train_sizes, ax=None):
    """Plot learning curve

    Plot a metric vs number of examples for the training and test set

    Parameters
    ----------
    train_scores : array-like
        Scores for the training set
    test_scores : array-like
        Scores for the test set
    train_sizes : array-like
        Relative or absolute numbers of training examples used to generate
        the learning curve
    ax : matplotlib Axes
        Axes object to draw the plot onto, otherwise uses current Axes

    Returns
    -------
    ax: matplotlib Axes
        Axes containing the plot
<commit_msg>updates docstring<commit_after>import numpy as np
import matplotlib.pyplot as plt


def learning_curve(train_scores, test_scores, train_sizes, ax=None):
    """Plot a learning curve

    Plot a metric vs number of examples for the training and test set

    Parameters
    ----------
    train_scores : array-like
        Scores for the training set
    test_scores : array-like
        Scores for the test set
    train_sizes : array-like
        Relative or absolute numbers of training examples used to generate
        the learning curve
    ax : matplotlib Axes
        Axes object to draw the plot onto, otherwise uses current Axes

    Returns
    -------
    ax: matplotlib Axes
        Axes containing the plot

{'fraction_non_alphanumeric': 0.05578800557880056, 'fraction_numerical': 0.0, 'mean_word_length': 2.4745762711864407, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7474983', 'n_tokens_mistral': 395, 'n_tokens_neox': 370, 'n_words': 164}