revanalyzer.vectorizers.simple_binning_vectorizer.SimpleBinningVectorizer

class revanalyzer.vectorizers.simple_binning_vectorizer.SimpleBinningVectorizer(bins, skip_zeros=True, norm=2)

Bases: BasicVectorizer

Class describing simple binning vectorizer.

Input:

bins (int): number of bins at each axe in XY plane;

skip_zeros (bool): If True, bins of 2D histogram empty for both compared PDs are not included into the final vectors, default: True;

norm (int): Norm of vectors used in REV analysis. The same, as parameter ‘ord’ in numpy.linalg.norm function, default: 2.

Methods

vectorize

Vectorize the vector metric values for a given pair of subsamples.

vectorize(v1, v2)

Vectorize the vector metric values for a given pair of subsamples.

Input:

v1 (list(dtype = float)): data for the first subsample;

v2 (list(dtype = float)): data for the second subsample.

Output:

(list(dtype = float), list(dtype = float), float): a tuple, in which the first two elements are vectorized metric values for a given pair of subsamples, and the last one is the normalized distance between these vectors.