cdist_soft_dtw and cdist_soft_dtw_normalized return unsquared DTW for gamma=0

Aperta
#855 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python

Direzione di ricerca

Read the gamma-zero shortcut in _cdist_soft_dtw, where the issue says _cdist_dtw(...) is returned without squaring. Check the tests for cdist_soft_dtw and cdist_soft_dtw_normalized and run the relevant metric tests. Done means both functions return the expected squared DTW values for gamma=0; the issue points to proposed work in #851, so check its status before starting.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

With gamma=0, cdist_soft_dtw and cdist_soft_dtw_normalized are documented to return squared DTW, as soft_dtw does, but they return plain DTW distances:

from tslearn.metrics import cdist_soft_dtw, cdist_soft_dtw_normalized

for metric in (cdist_soft_dtw, cdist_soft_dtw_normalized):
    print(metric([[0.], [2.]], gamma=0).tolist())
# [[0.0, 2.0], [2.0, 0.0]] for both; expected [[0.0, 4.0], [4.0, 0.0]]

The gamma-zero shortcut in _cdist_soft_dtw returns _cdist_dtw(...) without squaring it. A fix is proposed in #851.

Nathan, ChipLab

Lingua principale
Python
Stelle
3.2k
Fork
418
Merge medio
2g 14h
PR unite (30g)
24

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di tslearn-team/tslearn

Tutte le issue di tslearn-team/tslearn

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.