Skip to content

[MRG] Document KShape normalization requirement - #710

Open
kiwoongyoon wants to merge 1 commit into
tslearn-team:mainfrom
kiwoongyoon:gitcontribute/20260821-151357-569152-tslearn-team-tslearn-issue-439
Open

[MRG] Document KShape normalization requirement#710
kiwoongyoon wants to merge 1 commit into
tslearn-team:mainfrom
kiwoongyoon:gitcontribute/20260821-151357-569152-tslearn-team-tslearn-issue-439

Conversation

@kiwoongyoon

Copy link
Copy Markdown

Title: [MRG] Document KShape normalization requirement

Summary

  • Document that KShape expects z-normalized time series.
  • Point users to the existing TimeSeriesScalerMeanVariance preprocessing utility already used in the example.
  • Keep this as a non-closing clarification because the issue does not include the dataset needed to verify the reported empty-cluster behavior, and related initialization and multivariate fixes are already present in the base.

Test evidence

  • python3 -c "import ast, pathlib; doc=ast.get_docstring(next(n for n in ast.parse(pathlib.Path('tslearn/clustering/kshape.py').read_text()).body if isinstance(n, ast.ClassDef) and n.name == 'KShape')); assert 'must be z-normalized' in doc and 'TimeSeriesScalerMeanVariance' in doc"
  • git diff --check

Both commands pass.

Risks or notes for maintainers

This documents required preprocessing but does not claim to solve every source of empty clusters, including duplicate or indistinguishable series. No runtime behavior changes.

Refs #439

@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.15%. Comparing base (4658696) to head (6a67ca5).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #710   +/-   ##
=======================================
  Coverage   95.15%   95.15%           
=======================================
  Files          83       83           
  Lines        7822     7822           
=======================================
  Hits         7443     7443           
  Misses        379      379           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kiwoongyoon
kiwoongyoon marked this pull request as ready for review August 21, 2026 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant