Back to models
Transformer (Pairwise)

ScipyDist

Interface to scipy distances.

Quickstart

python
from sktime.dists_kernels.scipy_dist import ScipyDist

estimator = ScipyDist(metric='euclidean', p=2, colalign='intersect', var_weights=None, metric_kwargs=None)

Parameters(5)

metricstring or function, as in cdist; default = euclidean
if string, one of: braycurtis, canberra, chebyshev, cityblock,

correlation, cosine, dice, euclidean, hamming, jaccard, jensenshannon, kulsinski (< scipy 1.11) or kulczynski1 (scipy >=1.11, <1.17), mahalanobis, matching, minkowski, rogerstanimoto, russellrao, seuclidean, sokalmichener, sokalsneath, sqeuclidean, yule

p: if metric=``minkowski``, the ``p`` in ``p-norm``, otherwise irrelevant
colalignstring, one of intersect (default), force-align, none

controls column alignment if X, X2 passed in fit are pd.DataFrame columns between X and X2 are aligned via column names.

if intersect, distance is computed on columns occurring both in X and X2,

other columns are discarded; column ordering in X2 is copied from X

var_weights1D np.array of float or None, default=None
weight/scaling vector applied to variables in X/X2 before being passed to cdist, i-th col of X/X2 is multiplied by var_weights[i] if None, equivalent to all-ones vector
metric_kwargsdict, optional, default=None

any kwargs passed to the metric in addition, i.e., to the function cdist common kwargs: w: array-like, same length as X.columns, weights for metric refer to scipy.spatial.distance.dist for a documentation of other extra kwargs