paddlenlp/metrics/glue.py
def accumulate(self):
        """
        Calculates and returns the accumulated metric.

        Returns:
            tuple: Returns the accumulated metric, a tuple of (pearson, spearman,
            the_average_of_pearson_and_spearman).

            With the fields:

            - `pearson` (numpy.float64):
                The accumulated pearson.

            - `spearman` (numpy.float64):
                The accumulated spearman.

            - `the_average_of_pearson_and_spearman` (numpy.float64):
                The average of accumulated pearson and spearman correlation
                coefficient.

        """
        preds = [item for sublist in self.preds for item in sublist]
        labels = [item for sublist in self.labels for item in sublist]
        pearson = self.pearson(preds, labels)
        spearman = self.spearman(preds, labels)
        return (
            pearson,
            spearman,
            (pearson + spearman) / 2, )

        Calculates and returns the accumulated metric.

        Returns:
            tuple: Returns the accumulated metric, a tuple of (pearson, spearman,
            the_average_of_pearson_and_spearman).

            With the fields:

            - `pearson` (numpy.float64):
                The accumulated pearson.

            - `spearman` (numpy.float64):
                The accumulated spearman.

            - `the_average_of_pearson_and_spearman` (numpy.float64):
                The average of accumulated pearson and spearman correlation
                coefficient.

        
Calculates and returns the accumulated metric.
Calculates and returns the accumulated metric .
def accumulate(self):
        preds = [item for sublist in self.preds for item in sublist]
        labels = [item for sublist in self.labels for item in sublist]
        pearson = self.pearson(preds, labels)
        spearman = self.spearman(preds, labels)
        return (
            pearson,
            spearman,
            (pearson + spearman) / 2, )
def accumulate ( self ) : preds = [ item for sublist in self . preds for item in sublist ] labels = [ item for sublist in self . labels for item in sublist ] pearson = self . pearson ( preds , labels ) spearman = self . spearman ( preds , labels ) return ( pearson , spearman , ( pearson + spearman ) / 2 , )
Calculates and returns the accumulated metric.
Calculates and returns the accumulated metric .
"""
        Calculates and returns the accumulated metric.

        Returns:
            tuple: Returns the accumulated metric, a tuple of (pearson, spearman,
            the_average_of_pearson_and_spearman).

            With the fields:

            - `pearson` (numpy.float64):
                The accumulated pearson.

            - `spearman` (numpy.float64):
                The accumulated spearman.

            - `the_average_of_pearson_and_spearman` (numpy.float64):
                The average of accumulated pearson and spearman correlation
                coefficient.

        """
Returns the accumulated metric, a tuple of (pearson, spearman,
the_average_of_pearson_and_spearman).

With the fields.

`pearson` (numpy.float64):
The accumulated pearson.

`spearman` (numpy.float64):
The accumulated spearman.

`the_average_of_pearson_and_spearman` (numpy.float64):
The average of accumulated pearson and spearman correlation
coefficient.
Returns the accumulated metric a tuple of ( pearson spearman the_average_of_pearson_and_spearman ) . With the fields . ` pearson ` ( numpy . float64 ) : The accumulated pearson . ` spearman ` ( numpy . float64 ) : The accumulated spearman . ` the_average_of_pearson_and_spearman ` ( numpy . float64 ) : The average of accumulated pearson and spearman correlation coefficient .
tuple
self