revanalyzer.vectorizers.cf_vectorizer.CFVectorizer
- class revanalyzer.vectorizers.cf_vectorizer.CFVectorizer(norm=2, mode='max')
Bases:
BasicVectorizer
Class describing CF vectorizer.
Input:
mode (str): can be ‘all’ or ‘max’. If mode = ‘all’, CF calculated for ‘x’, ‘y’ and ‘z’ directions are concatenated into one vector during vectorization. If mode = ‘max’, CF calculared for different directions are vectorizes independently. Then at the analisys step, maximal differences and deviations over 3 directions are taking for REV sizes calculation. Default: ‘max’;
norm (int): Norm of vectors used in REV analysis. The same, as parameter ‘ord’ in numpy.linalg.norm function, default: 2.
Methods
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:
Depends on the chosen mode.
If mode = ‘all’:
(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.
If mode = ‘max:
(list(list(dtype = float)), list(list(dtype = float)), list(float)) - a tuple, in which the first two elements are vectorized metric values in ‘x’, ‘y’ and ‘z’ directions for a given pair of subsamples, and the last one is a list of normalized distances between these vectors.