Module pairwise (1.11.1)

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.