MODULE REFERENCE

cost_matrix

anomx.data.processing.dtw.cost_matrix

DTW Cost Matrix

CostMatrix

CostMatrix

Bases: ABC

(n+1) x (m+1) Matrix Cell (i,j) corresponds to minimum total cost/distance of matching elements (i-1, j-1) in series1 and series2.

Row 0 and column 0, are typically set to infinity, to prevent matching before the first element

Members

nattribute
mattribute
fillmethod
fill(value: float)
Signature parameters
ParameterTypeDefault
valuefloatrequired
to_densemethod
to_dense() -> np.ndarray

Returns

Dense n x m numpy array, where empty cells are set to np.inf

Returns np.ndarray

DenseCostMatrix

DenseCostMatrix

Bases: np.ndarray, CostMatrix

Members

to_densemethod
to_dense() -> np.ndarray

Returns np.ndarray

Inherited members

SparseCostMatrix

SparseCostMatrix(window: CRWindow)

Bases: CostMatrix

Signature parameters
ParameterTypeDefault
windowCRWindowrequired

Members

fillmethod
fill(value)
Signature parameters
ParameterTypeDefault
value—required
to_densemethod
to_dense() -> np.ndarray

Returns np.ndarray