Module pairwise (2.21.0)

API documentation for pairwise module.

Modules Functions

paired_cosine_distances

paired_cosine_distances(
 X: typing.Union[bigframes.dataframe.DataFrame, bigframes.series.Series],
 Y: typing.Union[bigframes.dataframe.DataFrame, bigframes.series.Series],
) -> bigframes.dataframe.DataFrame

Compute the paired cosine distances between X and Y.

Parameters
Name Description
X Series or single column DataFrame of array of numeric type

Input data.

Y Series or single column DataFrame of array of numeric type

Input data. X and Y are mapped by indexes, must have the same index.

Returns
Type Description
bigframes.dataframe.DataFrame DataFrame with columns of X, Y and cosine_distance.

paired_euclidean_distances

paired_euclidean_distances(
 X: typing.Union[bigframes.dataframe.DataFrame, bigframes.series.Series],
 Y: typing.Union[bigframes.dataframe.DataFrame, bigframes.series.Series],
) -> bigframes.dataframe.DataFrame

Compute the paired euclidean distances between X and Y.

Parameters
Name Description
X Series or single column DataFrame of array of numeric type

Input data.

Y Series or single column DataFrame of array of numeric type

Input data. X and Y are mapped by indexes, must have the same index.

Returns
Type Description
bigframes.dataframe.DataFrame DataFrame with columns of X, Y and euclidean_distance.

paired_manhattan_distance

paired_manhattan_distance(
 X: typing.Union[bigframes.dataframe.DataFrame, bigframes.series.Series],
 Y: typing.Union[bigframes.dataframe.DataFrame, bigframes.series.Series],
) -> bigframes.dataframe.DataFrame

Compute the L1 distances between the vectors in X and Y.

Parameters
Name Description
X Series or single column DataFrame of array of numeric type

Input data.

Y Series or single column DataFrame of array of numeric type

Input data. X and Y are mapped by indexes, must have the same index.

Returns
Type Description
bigframes.dataframe.DataFrame DataFrame with columns of X, Y and manhattan_distance.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月14日 UTC.