Skip to content

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[Unreleased]

[0.14.0] — 2026-06-07

Added

  • パフォーマンスベンチマーク基盤 (Phase 1) を追加 (#29, H-0021)。benchmarks/pytest-benchmark ベースの計測スイートを置き、make bench で実行する。catdap1 / catdap2 / optimal_binning / discover_error_slices の hot path を固定 seed の合成 データでスケーリング計測し、ベースラインを docs/performance.md に記録。
  • pytest-benchmark は dev 専用の bench dependency-group (利用者向け extra でも dev でもない)。py-cpuinfo のみに依存し numpy/pandas の version cap を持たないため uv の universal lock を汚染しない。wheel/sdist には含まれない。
  • benchmarks/testpaths 外のため make ci / make test では収集・実行されない。
  • discover_error_slices ベンチは OOM 回避のため強くバウンド (max_vars=2max_candidates 上限、5k 行 subsample、slow マーク)。Adult Income は実 fetch せず 形状を模倣した合成データを使用 (network 計測ノイズ回避)。
  • nightly 非ブロッキング ベンチマーク CI (Phase 2) を追加 (#161, H-0022)。 .github/workflows/benchmarks.yml が schedule (03:00 UTC) / workflow_dispatchmake bench を実行し、github-action-benchmark で履歴を gh-pages ブランチ (dev/bench/) に蓄積。回帰時 (≥1.5×) はコミットコメントで警告するのみで PR/コミットを ブロックしない (fail-on-alert: false)。output.json は artifact 保存。make ci の 挙動・時間は不変。
  • Pages は docs サイト (Actions デプロイ) が使用中のため、チャートは gh-pages ブランチ 保存のみで公開 URL には載せない (docs サイトと非競合)。
  • scheduled workflow は default branch (main) 定義で発火するため、nightly 自動実行は 本ワークフローが main に乗る次回リリース以降に有効化。それまでは workflow_dispatch で検証。
  • ベンチマーク PR-delta コメント (Phase 3) を追加 (#161, H-0023)。src/pycatdap/** を変更する PR で非 slow subset を実行し、gh-pages の baseline と比較した delta を PR コメント (レビューコメント) として投稿 (comment-alwayspull-requests: write 必須)。履歴は書き換えず (auto-push / save-data-file: false)、PR をブロックしない (fail-on-alert: false)。same-repo PR 限定 (fork PR は read-only token のため検証のみ)。これで #161 (Phase 2+3) 完了。

Changed

  • optimal_binning の auto-accuracy (accuracy=None) が初期ビン数を上限化 (#164, H-0024)。 最小ギャップが範囲に対し _MAX_AUTO_BINS=256 を超える初期ビンを生む高カーディナリティ連続 データでは accuracy を range/256 に広げ UserWarning を出す。これにより従来ハング/OOM して いた全ユニーク連続 float (例: 10万行 >200s 未完了) が短時間で完了 (実測 0.245s)。 明示 accuracy は従来通り verbatim (R 厳密照合・既存挙動に影響なし)。細かい制御は 明示 accuracy= を渡す。catdap2 / target_pair の auto パスも同経路で恩恵。

Removed

  • BREAKING: pycatdap.datasets.load_hello_goodbye と同梱データ hello_goodbye.csv.gz を削除 (#156, H-0025)。HelloGoodbye は R catdap 由来で GPL (>=2)・Copyright ISM のため、MIT 配布物 (wheel) に同梱すると下流 (LizyStudio 等 permissive) へ GPL が伝播する。再構成不可 (13954×56 匿名) なため除去。tutorial 04 は 同形状の合成データに書き換え。GPL 化は下流非互換、ISM 許諾は取得不可のため同梱解除を選択。
  • BREAKING: pycatdap.datasets.load_health_data と同梱データ health_data.csv を 配布物から除去 (#156, H-0025)。HealthData も catdap 由来 (GPL/ISM)。R bit-exact 照合の 土台のため、非配布の test fixture (tests/fixtures/health_data.csv、wheel/sdist 除外、 NOTICE で帰属明記) として保持し検証は CI で継続。tutorial 01 / quickstart / README の デモは permissive な load_heart_disease (UCI) に差替。wheel・sdist に catdap GPL データは 含まれない (uv build で確認)。

[0.13.0] — 2026-06-07

Added

  • D5 データセット fetcher を追加 (#25, H-0017)。スライス発見・全カテゴリカル CATDAP のデモ/検証用 UCI 3 データセットを download-on-demand で取得する。既存 D4 fetcher と 同じ sklearn.datasets.fetch_openml ラッパ流儀で、新規依存なし (既存 [data] extra)。
  • pycatdap.datasets.fetch_wine_quality() — UCI Wine Quality (red+white 結合、 6,497 行)。color ∈ {red, white} 列を付与、target は quality
  • pycatdap.datasets.fetch_bank_marketing() — UCI Bank Marketing (45,211 行)。 OpenML の generic 列 V1..V16 を UCI 公式名 (age, job, ...) に rename、 target は y
  • pycatdap.datasets.fetch_mushroom() — UCI Mushroom (8,124 行、全列カテゴリカル)。 target は class
  • pysubgroup interop measure pycatdap.measures.AICMeasure を追加 (#31, H-0018)。 ΔAIC を pysubgroup の binary-target quality function として公開し、 pysubgroup.BeamSearch / SimpleDFS で AIC をスコアに subgroup discovery を実行できる。 pysubgroup は optional 依存で、pycatdap の extra には含めず明示インストール (pip install pysubgroup) する (pysubgroup が numpy<2.0.0 を pin しており、extra 化 すると uv の universal lock がその制約を全 install に伝播させ numpy 2.x を壊すため)。 pycatdap.measures の import は pysubgroup を必須としない (lazy export)。ΔAIC に健全な 上界がないため optimistic_estimate は提供せず、Apriori / DFS は対象外 (BeamSearch / SimpleDFS 専用)。ガイド: docs/interop/pysubgroup.md
  • to_divexplorer_format()schema="divexplorer" を追加 (#32, H-0019)。 ErrorAnalysisResult / SliceDiscoveryResult の両方で、DivExplorer 0.2.x の実カラム support / itemset / error / error_div / error_t / length / support_count を直接出力できる。 既定 schema="native" は従来出力のまま不変 (後方互換)。support / error_div 算出のため SliceDiscoveryResult に additive フィールド n_total / base_error_rate を追加 (引数 n_total= / overall_error_rate= で上書き可)。error_t は pycatdap 独自統計 (measure_value / pearson_residual) で DivExplorer の t 値とは異なる旨を docs に明記。 divexplorer は heavyweight (sklearn 等を pull) なため pyproject に含めず、cross-test は 明示 pip install divexplorer でローカル検証。ガイド: docs/interop/divexplorer.md

[0.12.3] — 2026-06-05

Changed

  • R catdap 1.3.5 との strict 数値照合を実稼働化 (#10, #30)。generate_reference.R が catdap 1.3.5 の実 API と不整合で実行できなかった問題を修正し、参照 CSV を 生成・コミット。照合は AIC エンジンの厳密一致を検証する: (1) catdap1 のカテゴリ 列、(2) catdap2 のカテゴリ (pool=2) 単変数、(3) 連続変数を R の選んだカット点で ビン化した場合の AIC 等価。連続変数の binning 選択は pycatdap が AIC 貪欲マージ (より AIC 最適) を採用しており R の粗い split とは設計が異なるため、選択そのものは 照合対象外とする (CONTRIBUTING の「R版との照合」参照)。

[0.12.2] — 2026-06-03

Changed

  • 開発品質ゲートを整備 (#34)。ユーザー向け API への影響はなし。
  • mypy --strictIPython.*follow_imports = "skip" 化により、IPython のインストール有無にかかわらず同一結果 (0 エラー) に統一。
  • ruff に pydocstyle (D, numpy convention) を追加し、public モジュールの docstring 規約を強制。既存の docstring 違反 17 件を修正。
  • pre-commit に mypy --strict のローカルフックを追加。
  • make test / make ci を develop CI と同じく slow テスト除外に変更し、 ローカルでネットワーク依存の D4 fetcher がハングする問題を解消。フル実行は make test-all に分離。

Documentation

  • DivExplorer 相互運用ガイド docs/interop/divexplorer.md を追加 (#32)。pycatdap の to_divexplorer_format() 出力と DivExplorer の実スキーマ (0.1.x / 0.2.x 両世代を ソース照合) の対応表、AIC↔divergence のセマンティクス対応、DivExplorer 0.2.x 形式 へ整形する adapter レシピを記載。実スキーマ完全互換 (データ契約変更) は v0.13.0 (#32) で対応予定。
  • 公開 Roadmap ページ docs/project/roadmap.md を実態へ更新。v0.3.0〜v0.12.0 を 依然「planned」と誤記していたのを released に修正し、v0.12.2 housekeeping / v0.13.0 / v0.14.0 / v1.0.0 の計画を反映 (PLAN.md と整合)。
  • チュートリアル名から内部フェーズ呼称を除去し公開名に統一 (#144)。PLAN.md を v0.12.1 出荷実態へ整合 (#143)。

[0.12.1] — 2026-05-30

Added

  • pycatdap.error.discover_error_slicesmax_candidates パラメータ (デフォルト 200,000) と SliceDiscoveryResult.truncated フィールドを追加。 support 枝刈りはセルのサイズを制限するが個数は制限しないため、大規模・ 高カーディナリティデータで候補が組合せ爆発しメモリ/時間を使い尽くす恐れがあった (2026-05-30 の OOM インシデント)。上限到達時は探索を打ち切り truncated=True を 立てて警告する (サイレント打ち切りなし)。閾値未満では結果は従来と完全一致 (HISTORY H-0016)。

Fixed

  • discover_error_slices: category dtype で渡された数値列(例 read_csv(dtype="category"))が連続値として AIC binning されず、生の 高カーディナリティカテゴリ扱いになって候補が組合せ爆発する不具合を修正 (H-0016 follow-up、2026-05-30 OOM の根本トリガー)。_is_continuous が 数値カテゴリの category dtype を連続値として検出するようになった。文字列 カテゴリは従来どおりカテゴリ変数のまま。

CI

  • actions/upload-pages-artifact を v3→v5、actions/deploy-pages を v4→v5 に 更新 (Dependabot #136 / #137 を develop へ統合)。

[0.12.0] — 2026-05-30

このリリースは H-0015 Phase M に対応し、v0.12.0 の LizyStudio 統合 イネーブルメントと、誤差分析 arc の積み残しを解消する。BLUEPRINT.md §5.7 / §5.8、 HISTORY.md H-0015、Issue #21 を参照。

Added

  • 回帰スライス探索: pycatdap.error.discover_error_slices が回帰タスクに対応 (設計 D1)。|y_true - y_pred|abs_residual_pool で AIC binning し、 最大平均 |residual| のビンを binary high_residual 誤差カテゴリとして 既存の 2 カテゴリ機構(support 枝刈り・measures・ΔAIC scoring)を共有再利用する。 新パラメータ n_bins(回帰のみ)。従来の NotImplementedError を解消。
  • 回帰 / 多クラス calibration reliability plot: pycatdap.error.regression_calibration_curve(pred_mean × actual_mean、 軸は [0,1] 非クランプ)/ pycatdap.error.multiclass_calibration_curve (one-vs-rest をクラスごとに [0,1] 正方形へオーバーレイ)。matplotlib / plotly 両 backend。既存の二値 calibration_curve は無変更。
  • 多クラス confusion ラベル: pycatdap.error.multiclass_confusion_label — クラスごとの one-vs-rest TP/FP/FN/TN を Mapping[class, pd.Series] で返す (二値 confusion_label コアを再利用、二値 API は無変更)。
  • .to_plotly_json() 契約テスト: 全結果型の FLAT / SECTIONED 形状・安定キー・ JSON 安全性(allow_nan=False)・plotly.graph_objects.Figure(spec) 互換を 検証する契約スイート(tests/contract/)。契約は BLUEPRINT §5.7.1 に明文化。

Fixed

  • DescribeResult.to_plotly_json() が NaN セル(カテゴリ列の mean/std)を含み json.dumps(allow_nan=False) を壊していたのを修正。非有限値を None に置換する 共有ヘルパ pycatdap._jsonsafe.scalar_to_json を抽出(profile.py も再利用)。

[0.11.0] — 2026-05-29

このリリースは H-0014 Phase L に対応し、ML 誤差分析 arc を完成させる。 多変数サブグループの自動発見(discover_error_slices)・コホート比較 (compare_cohorts)・ドリフト検出(detect_drift)を追加し、さらに Phase K で先送りした 回帰 / multi-class calibration を同梱する。 BLUEPRINT.md §5.8 / Issue #20 を参照。

主要な追加: - pycatdap.error.discover_error_slices — 予測誤差が集中する多変数コホートを AIC で自動発見。support(Apriori, anti-monotone)ベースの健全な枝刈り (ΔAIC は健全な上界を持たないため不採用 — HISTORY H-0014 §C)。pluggable measure("aic"/"cramers_v"/"mutual_info"/callable, FR-9)。 - pycatdap.error.compare_cohorts / detect_drift — コホート間の分布差・関係性 シフトを ΔAIC で定量化。Sweetviz 風 to_html レポート。 - pycatdap.error.regression_calibration_table / regression_calibration_error — 回帰の predicted-vs-actual 分位 calibration。 - pycatdap.error.multiclass_calibration_table / multiclass_expected_calibration_error — one-vs-rest の多クラス calibration。

Added — Phase L slice discovery & drift (pycatdap.error)

  • discover_error_slices(df, y_true, y_pred, *, max_vars=3, measure="aic", top_k=10, min_support=30, columns=None) -> SliceDiscoveryResult — 多変数サブグループ発見(分類のみ)。連続列は誤差ラベルに対して AIC binning。 SliceDiscoveryResultto_divexplorer_format() / to_dict() を提供。
  • ErrorSlice / SliceDiscoveryResult — 多変数スライスの不変コンテナ (単変数 Slice とは別型、後方互換)。
  • compare_cohorts(df_a, df_b, *, response=None) -> CohortComparisonsummary(特徴別 ΔAIC + 最大分布差)・distributions・任意の response_deltato_html(path=) / to_dict()
  • detect_drift(df_train, df_prod, *, y_true=None, y_pred=None) -> DriftReport — 特徴を |ΔAIC| 降順でランク。y_true/y_pred 指定時は prod 誤差率を併記。

Added — calibration follow-up (pycatdap.error)

  • regression_calibration_table(y_true, y_pred, *, n_quantiles=10) / regression_calibration_error(...) — 回帰 calibration(純 numpy)。
  • multiclass_calibration_table(y_true, y_proba, *, classes=None, strategy="aic", n_bins=10) / multiclass_expected_calibration_error(...) — one-vs-rest。既存の二値 calibration コアを再利用(二値パスは無変更)。

Changed

  • error/_backend.py を新設し、confusion.py / residual.py / calibration.py に重複していた plot backend dispatch を集約(挙動不変)。

Docs

  • Notebook 14(Phase L)を追加し、mkdocs nav に登録。

[0.10.0] — 2026-05-29

このリリースは H-0013 Phase K に対応し、ML 誤差分析 arc に キャリブレーション診断(二値分類)を追加する。pycatdap 固有の AIC 最適 binning を確率軸に適用し、reliability diagram・Brier score・ECE/MCE を提供する。error_analysis()y_proba= を渡せば ErrorAnalysisResult.calibration_curve() で 1 メソッド可視化できる。 BLUEPRINT.md §5.8 / Issue #19 を参照。

主要な追加: - pycatdap.error.calibration_curve / calibration_table — reliability diagram(Wilson 95% CI)と背後の per-bin テーブル。 - pycatdap.error.brier_score / expected_calibration_error / maximum_calibration_error — スカラーメトリクス。 - ErrorAnalysisResult.y_proba フィールド + calibration_curve() delegation メソッド。error_analysis(..., y_proba=) で populate。

Added — Phase K calibration (pycatdap.error)

  • calibration_curve(y_true, y_proba, *, strategy="aic"|"equal_width"|"quantile", n_bins=10, backend="matplotlib"|"plotly", **kwargs) -> Axes | Figure — reliability diagram。y = x 完全校正線 + Wilson 95% 二項信頼区間。 matplotlib は ax= 受け入れ Axes、plotly は Figure を返す。 strategy="aic"(既定)は確率軸を _pooling.optimal_binning で AIC 最適 binning(初期グリッドは有界化、連続確率でもビン爆発しない)。
  • calibration_table(y_true, y_proba, *, strategy="aic", n_bins=10) -> pd.DataFramebin_low/bin_high/n/prob_pred/prob_true/ci_low/ci_high。占有ビンのみ。 メトリクスと diagram の single source of truth。
  • brier_score(y_true, y_proba) -> floatmean((y_proba - y_true)**2)。 sklearn brier_score_loss(二値)と一致。
  • expected_calibration_error(...) / maximum_calibration_error(...) -> float — ビン重み付き平均ギャップ / 最悪ビンギャップ。空ビンは除外。
  • ErrorAnalysisResult.y_proba(既定 None__post_init__ freeze)+ ErrorAnalysisResult.calibration_curve(*, strategy, n_bins, backend, **kwargs) delegation。error_analysis(..., y_proba=) で保持。

Notes

  • Wilson 信頼区間は pure-numpy(scipy 非依存)。
  • スコープは二値分類のみ。回帰 calibration(predicted-vs-actual quantiles)と multi-class(one-vs-rest)は v0.11.0 へ defer。
  • 破壊的変更なし。y_proba 追加は既存コンストラクタ・error_analysis() 呼び出しに 無影響(to_dict() / to_plotly_json() スキーマ不変)。

[0.9.0] — 2026-05-29

このリリースは H-0012 Phase I+J に対応し、ML 誤差分析 arc の 可視化レイヤー(classification confusion + regression residual) と、ErrorAnalysisResult への delegation メソッドを追加する。 v0.8.0 で出荷した error_analysis() の結果を、直接 1 メソッド呼び出し で可視化できるようになる。BLUEPRINT.md §5.8 / Issue #18 を参照。

主要な追加: - pycatdap.error.plot_confusion / plot_confusion_by_slice / confusion_aic — Phase I 分類エラー可視化 + ΔAIC スコア。 - pycatdap.error.residual_plot / residual_by_category / residual_pool_plot — Phase J 回帰残差可視化(scatter / box / AIC pooling histogram)。 - ErrorAnalysisResult.y_true / .y_pred — 生ラベルを result に保持 (H-0009 immutable pattern で __post_init__ 内 freeze)。 - ErrorAnalysisResult.plot_confusion() / .residual_plot() — 直接呼び delegation メソッド。binary + multi-class + regression dispatch。

Added — Phase I classification visualisation (pycatdap.error)

  • plot_confusion(y_true, y_pred, *, labels=None, normalize=None, backend="matplotlib"|"plotly", **kwargs) — N×N confusion matrix heatmap、多クラス対応、4 normalize モード("true"/"pred"/"all"/None) サポート。matplotlib backend は ax= 受け入れ、Axes を返す。plotly backend は Figure を返す。
  • plot_confusion_by_slice(df, y_true, y_pred, var, *, labels=None, n_cols=3, normalize="true", backend=..., **kwargs)var カテゴリ別 small-multiples confusion グリッド。matplotlib backend は Figure を 返す(H-0012 §F-bis 例外、multi-panel のため Axes 規約から逸脱)。
  • confusion_aic(y_true, y_pred) -> float — 予測の情報量を ΔAIC で 定量化。pycatdap._aic.compute_delta_aic の薄いラッパー。負ほど informative(target_analysis / catdap1 の既存規約に従う)。 Issue #18 本文は「positive when informative」だが、プロジェクト規約 優先のため反転(H-0012 §A5 で理由明記)。

Added — Phase J regression residual visualisation (pycatdap.error)

  • residual_plot(y_true, y_pred, *, kind="scatter_pred_resid"| "scatter_true_pred"|"histogram", color_by=None, backend=..., **kwargs) — 3 種類の診断プロット。color_by= で散布図に第 3 変数の色分け追加。
  • residual_by_category(df, y_true, y_pred, var, *, bins=None, backend=..., **kwargs)var 別の残差 box plot。連続 var は bins=None_pooling.optimal_binning(AIC ベース、残差符号を proxy response として使う)、bins=int で等幅 binning。Categorical dtype は declared order を honor。
  • residual_pool_plot(y_true, y_pred, *, n_bins=4, backend=..., **kwargs) — |residual| ヒストグラム + residual_label(method="aic_pool") 由来の 境界線オーバーレイ。AIC マージ後の bin 数は n_bins= より少ない場合あり。

Added — ErrorAnalysisResult delegation (pycatdap.error._result)

  • 新規フィールド y_true: NDArray | None = None / y_pred: NDArray | None = None — 生ラベルを result に保持。default None のため既存の直接構築は 影響なし(cross-check Claim 3 mitigation)。
  • __post_init__None ガード付きの numpy buffer freeze (writeable = False)。error_analysis() ラッパーは .copy() で defensive copy してから渡すため、呼び出し側元配列の freeze は防ぐ。
  • ErrorAnalysisResult.plot_confusion(*, backend="matplotlib"|"plotly", **kwargs) — 内部で pycatdap.error.plot_confusion(self.y_true, self.y_pred, **kwargs) を呼ぶ delegation。binary AND multi-class 両方で動作(H-0012 §F-ter — Phase H wrapper が multi-class で error_label に fallback しても、y_true/y_pred は保持されているので N×N ヒートマップは描画可能)。regression / 不在ラベルで ValueError
  • ErrorAnalysisResult.residual_plot(*, backend=..., **kwargs) — 同様の delegation、regression 専用、classification / 不在ラベルで ValueError

Changed

  • 既存 target_analysis / error_analysis / confusion_label 等の API には変更なし。Phase I+J は純粋な追加。

Fixed — Issues closed

  • Closes #18 (Phase I+J Classification & regression error visualization)

Breaking changes

  • なし。既存 v0.8.0 API は全て後方互換。ErrorAnalysisResult の コンストラクタ署名変更は default None フィールド追加のため非破壊。

[0.8.0] — 2026-05-29

このリリースは H-0011 Phase H に対応し、ML 誤差分析 arc の ワンコール入口となる error_analysis() と、Phase H デモ用に D4 fetch データセット(scikit-learn 経由)を同梱する。 BLUEPRINT.md §5.8 / Issue #17 / Issue #24 を参照。

主要な追加: - pycatdap.error_analysis(df, y_true, y_pred) — task auto-detect + Phase G ラベリング + target_analysis の合成によるワンコール ML 誤差分析。ErrorAnalysisResult を返す。 - pycatdap.ErrorAnalysisResult / pycatdap.Slice — v0.6.1 H-0009 immutable pattern(tuple / MappingProxyType / __post_init__ numpy freeze)を最初から適用した frozen dataclass。 - pycatdap.datasets.fetch_california_housing / fetch_adult_income / fetch_compas — D4 ベンチマークデータセット。新規 pycatdap[data] extras(scikit-learn>=1.3)。

Added — Phase H one-call wrapper (pycatdap.error_analysis)

  • error_analysis(df, y_true, y_pred, *, task="auto", top_k=5, positive=None, residual_method="aic_pool", n_bins=4, bins=None, criterion="bic") — Phase G の error_label / confusion_label / residual_labeltarget_analysis を合成し、feature_ranking
  • top_slices + (binary 時)confusion を 1 つの結果に bundle。
  • y_true / y_pred は列名(str)/pd.Series/np.ndarray の 3 形式を受け入れ。
  • Task dispatch: auto_detect_task 経由、classification + binary → confusion_label、classification + 3+ unique → error_label (multiclass guard、H-0010 §C の NotImplementedError を回避)、 regression → residual_label
  • Slice extraction: top_k 変数のみ走査、|pearson_residual| >= 2.0 のセルを Slice として surfacing、|residual| 降順で 3 * top_k までキャップ。多変数 subgroup discovery は Phase L(v0.11.0)で対応。
  • 実装 safeguards(cross-check 2026-05-28 で抽出):
  • F-1: __pycatdap_*_label__ 列が既存する場合に明示 ValueError
  • F-2: 完璧な分類器(pd.crosstab が FP/FN 行を drop する)で KeyError しないよう confusion を canonical TP/FP/FN/TN 順に reindex
  • F-3: equal_pooling boundaries が ascending sort であること を確認、residual-label slice 抽出で bin_0 = under、最大番号 bin = over の前提を保証

Added — ErrorAnalysisResult / Slice データクラス

  • ErrorAnalysisResult フィールド: task / label_kind / response_name / feature_ranking(numpy buffer frozen)/ top_summaries(MappingProxyType)/ top_slices (tuple[Slice, ...])/ confusion(pd.DataFrame | None、frozen) / residual_pooling(MappingProxyType | Nonedict 入力は __post_init__ で defensive copy)/ n_rows / n_correct / n_incorrect / mae / rmse
  • Slice フィールド: variable / category / error_category / n_in_slice / n_error_in_slice / error_rate / pearson_residual / delta_aic
  • 5-method serialisation contract:
  • show() — Jupyter / stdout 両対応サマリ
  • to_dict() — JSON-safe Python dict
  • to_html(path=None) — self-contained jinja2 + Plotly inline HTML(atomic write、pycatdap[plotly] 未導入時は明示 ImportError)
  • to_plotly_json()feature_ranking / confusion / 各 top_summaries を section dict として返す(DP-4、LizyStudio 直接消費可)
  • to_divexplorer_format() — DivExplorer subgroup API 互換 flat DataFrame(Phase L で完全統合、Phase H はフォーマット互換のみ)

Added — D4 fetch demo datasets (pycatdap.datasets)

  • fetch_california_housing() — sklearn 同梱の California Housing (20,640 × 9)。回帰タスク、MedHouseVal がターゲット。
  • fetch_adult_income() — OpenML id adult v2(~48,842 × 15)。 binary classification、class がターゲット(<=50K / >50K)。 Fairness 解析の文脈で広く利用。
  • fetch_compas() — OpenML id compas-two-years v4(~5,278 × 14)。 ProPublica COMPAS 二年再犯予測、fairness-critical な demo データ。 docstring に ProPublica 経由のバイアス出典 disclaimer 明記。
  • 共通: scikit-learn 未導入時は明示 ImportError(pycatdap[data] extras を案内)。HTTP/retry/checksum/cache は sklearn に委譲 (~/scikit_learn_data/SCIKIT_LEARN_DATA env で上書き可)。

Added — Dependencies / extras

  • 新規 pycatdap[data] extras: scikit-learn>=1.3
  • pycatdap[all] extras に scikit-learn>=1.3 を統合。
  • [tool.mypy.overrides]sklearn.* を追加(stubs 未提供)。

Added — Documentation

  • Tutorial Notebook 11 (docs/tutorials/11-phase-h-error-analysis.ipynb) — binary classification / multiclass / regression の 3 経路 + 5-method serialisation + F-1 / F-2 / F-3 safeguards デモ。
  • BLUEPRINT.md §5.8 を「Phase H 実装済 v0.8.0」に更新、データクラス 契約を実装と一致させる(immutable パターンを正式記載)。
  • README.md quickstart に error_analysis() セクション追加、Phase G セクションも v0.7.0 → v0.8.0 のブリッジ説明を加筆。

Fixed — Issues closed

  • Closes #17 (Phase H error_analysis() one-call wrapper)
  • Closes #24 (Data D4: Adult Income / COMPAS / California Housing)

Breaking changes

  • なし。既存 v0.7.0 API は全て後方互換。

[0.7.0] — 2026-05-28

このリリースは H-0010 Phase G に対応し、ML 誤差分析 arc の基盤となる 誤差ラベリングユーティリティ と、Phase G チュートリアル用に D3 demo データセット を同梱する。BLUEPRINT.md §3.1 / §5.8 を参照。

主要な追加: - pycatdap.error.error_label / confusion_label / residual_label / abs_residual_pool — 予測結果を categorical Series にラベル付け - pycatdap.error._detect_task — task auto-detection ヒューリスティック - pycatdap.datasets.load_german_credit / load_heart_disease / load_penguins — D3 demo データセット(UCI / Palmer Penguins)

Added — Phase G error labeling (pycatdap.error)

  • error_label(y_true, y_pred) — 任意 task で予測の正誤を pd.Series("correct" | "incorrect") で返す。
  • confusion_label(y_true, y_pred, *, positive=None) — 二値分類で TP/FP/FN/TN を pd.Series で返す。positive=None の時は 2 ユニーク値の 片方(大きい方)を自動選択。multiclass は NotImplementedError(H-0010 §C により one-vs-rest は v0.8.0+ 後続)。
  • residual_label(y_true, y_pred, *, method="aic_pool", n_bins=4) — 回帰残差を 3 つの method(aic_pool / quantile / equal_width)で ビン化。aic_poolpycatdap._pooling.equal_pooling を再利用。
  • abs_residual_pool(y_true, y_pred, *, n_bins=4)|y_true - y_pred| を AIC pooling で binned categorical に。
  • _detect_task(y_true, y_pred) — 文字列/object → classification、 両方 int で <= 20 ユニーク → classification、float in [0,1] vs binary y_true → classification、それ以外 → regression。

Phase G は 意図的に新規 dataclass を導入していない。H-0009 で対処した shallow-freeze pattern の再発を防ぐため、すべて pd.Series で返す。 ErrorAnalysisResult は Phase H(v0.8.0)で v0.6.1 immutable pattern を 最初から適用して導入する。

Added — D3 demo datasets (pycatdap.datasets)

  • load_german_credit() — UCI Statlog German Credit(1000 × 21)。 Binary classification benchmark。class ラベルは "good" / "bad"、 700/300 split。Public domain via OpenML id credit-g v1。
  • load_heart_disease() — UCI Cleveland Heart Disease processed subset(303 × 14)。Binary classification、target ラベルは 0/1。 全列 numeric。CC BY 4.0 via OpenML id heart-disease v1。
  • load_penguins() — Palmer Penguins(344 × 7)。3 クラス分類 species ∈ {Adelie, Chinstrap, Gentoo}。CC0 1.0 via OpenML id penguins v1。

データセット issue は 独立リリースとして扱わず、それを使う Phase に同梱 する方針(2026-05-28 architect レビュー、PLAN.md §3.3 で文書化)。D3 は v0.5.0 → v0.6.0 と 2 回スリップしたが、Phase G が demo データを必要とする ため自然な fold-in タイミングとして v0.7.0 にまとめた。

Added — Tutorial

  • docs/tutorials/10-phase-g-error-labeling.ipynb — German Credit と 合成回帰データで Phase G API を体系的にデモ。Phase H への接続を解説。

Changed

  • BLUEPRINT.md §3.1 の error/ ツリーを更新(_labels.py 実装済を反映)。
  • BLUEPRINT.md §5.8 の Phase G セクションを「v0.7.0 で実装済」に格上げ。

References

  • HISTORY.md H-0010 (Phase G + D3 dataset folding decision)
  • Issue #16 (Phase G)、Issue #23 (D3 datasets)

[0.6.1] — 2026-05-28

Changed — API hardening (breaking for callers that mutated result objects)

H-0009: 4 @dataclass(frozen=True) types shipped in v0.6.0 had mutable internal fields (list / dict / pd.DataFrame) despite frozen=True. This contradicted the "NEVER mutate" rule and allowed silent corruption of result objects. Fixed in v0.6.1 before Phase G (v0.7.0) inherits the same shallow-freeze pattern:

  • SuiteResult.checks is now tuple[CheckResult, ...] instead of list[CheckResult]. Call list(result.checks) to get a mutable copy.
  • CheckResult.affected_columns is now tuple[str, ...] instead of list[str]. Call list(...) to get a mutable copy.
  • TargetAnalysisResult.top_summaries is now a read-only Mapping[str, ...] (types.MappingProxyType). Reads, iteration, and .items() work as before; __setitem__ / __delitem__ raise TypeError. Call dict(...) to get a mutable copy.
  • TargetAnalysisResult.ranking is documented read-only and the underlying numpy buffer is frozen via __post_init__ setting .flags.writeable = False. Element assignment (df.values[i] = x) raises; DataFrame-level operations (drop, assign(inplace=False)) still allocate new buffers and remain available. Call .copy() before mutating in place.

Pre-v0.6.0 result objects with the same pattern (QualityReport.warnings, ProfileResult.variables, EDADescribe.summary, etc.) are deferred to a follow-up issue for staged migration before v1.0 — fixing them all together would inflate this patch beyond a focused release.

CI / Release infrastructure

  • auto-release.yml now dispatches release.yml automatically via workflow_dispatch after creating the tag and GitHub Release. Previously the default GITHUB_TOKEN-pushed tag did not fire release.yml's push: tags: [v*] trigger (recursive-trigger suppression), forcing a manual gh workflow run "Release to PyPI" step on every release from v0.3.0 through v0.6.0. The new step uses workflow_dispatch, which is exempt from the recursive-trigger restriction and works with GITHUB_TOKEN (no PAT required). Requires permissions: actions: write on auto-release.yml.

[0.6.0] — 2026-05-28

このリリースは H-0008 Phase D に対応し、target 駆動分析と CI 統合可能な 品質スイート を追加する。v0.5.0 の flagship profile() を補完する 4 つの 新規公開 API(quality_report / target_analysis / pycatdap.measures / pycatdap.suite)と、association_matrix(measure=...) の non-AIC 拡張を 含む。詳細は HISTORY.md H-0008 および以下の節を参照。

主要な追加: - pycatdap.quality_report(df).passed — CI gate 用の高速データ品質スキャン - pycatdap.target_analysis(df, response) — ΔAIC ランキング + 上位 K の TargetSummary - pycatdap.measures.{aic, cramers_v, mutual_info, register} — pluggable interestingness 指標 - pycatdap.association_matrix(df, measure="cramers_v") — 非 AIC 関連度行列 - pycatdap.suite.AICIndependenceSuite(df, response).run().passed — deepchecks 風 CI スイート

Added

  • Tutorial Notebook 09 — docs/tutorials/09-phase-d-target-analysis-and-suite.ipynb walks through every Phase D API on the Titanic dataset: quality_reporttarget_analysispycatdap.measures.*pycatdap.suite.AICIndependenceSuite with the assert suite_result.passed, suite_result.summary() CI idiom (H-0008 PR-D6).
  • pycatdap.suite subpackage — deepchecks-style CI-integrable suite per Issue #15 (H-0008 PR-D5). Public API:
  • pycatdap.suite.AICIndependenceSuite(df, response=...).run() -> SuiteResult — default bundle of the 4 standard checks
  • Individual checks: ConstantColumnCheck, HighCardinalityCheck, IndependenceCheck, PoolingSuggestionCheck (all @dataclass(frozen=True) so thresholds are immutable; no eval() / string DSL anywhere — safe on untrusted DataFrames)
  • SuiteResult with .passed boolean for assert suite_result.passed, .failures (all non-passing checks including "info"-severity), .summary(), .show(), .to_html(path), .to_dict(), .to_plotly_json()
  • association_matrix(df, measure=...) extension — dispatch on any registered :mod:pycatdap.measures measure. measure="aic" (default) keeps the existing :func:target_summary-based path; "cramers_v" / "mutual_info" / custom measures use a generic crosstab path with uniform pd.qcut binning of continuous columns (H-0008 PR-D5).
  • pycatdap.measures subpackage with a pluggable interestingness- measure registry (BLUEPRINT §5.11, H-0008 PR-D4). Each measure has the uniform signature Callable[[npt.NDArray[np.float64]], float]. Standard measures shipped:
  • pycatdap.measures.aic(cross_freq) — ΔAIC (negative = informative)
  • pycatdap.measures.cramers_v(cross_freq) — Cramér's V (0..1, pure-numpy, no scipy dependency)
  • pycatdap.measures.mutual_info(cross_freq) — mutual information in nats (pure-numpy)
  • pycatdap.measures.register(name, fn) / get(name) / list_measures() for custom measures (pysubgroup / DivExplorer interop, Issues #31 / #32)
  • pycatdap.target_analysis(df, response) — target-driven ΔAIC ranking of every non-response column. Keeps the full TargetSummary / RegressionTargetSummary for the top-K most informative columns (top_k=5 by default). Exposes .show(), .to_html(path), .to_dict(), and .to_plotly_json() matching the ProfileResult 4-method contract; HTML report embeds each top-K cross-tab inline via Plotly (H-0008 PR-D3).
  • pycatdap.TargetAnalysisResult re-export.
  • pycatdap.quality_report(df) — focused data-quality scan returning a QualityReport dataclass. Shares the warning logic of profile() via the new src/pycatdap/_quality.py helper but skips association_matrix / catdap2, so it stays fast on wide CI frames. Exposes .passed (boolean for assert qr.passed), .by_severity(), .by_kind(), .show(), .to_html(path), .to_dict(), and .to_plotly_json() (H-0008 PR-D2).
  • pycatdap.QualityReport re-export.

Changed

  • Internal refactor: _scan_quality lifted from pycatdap.profile into pycatdap._quality so quality_report / profile / pycatdap.suite share one helper. Public surface unchanged (H-0008 PR-D1).
  • BLUEPRINT.md §3.1 / §5.10 / §5.11 updated to reflect the shipped Phase D module structure and APIs (H-0008 PR-D6).
  • README.md Quickstart now shows the target-analysis / quality report / suite / measures workflow (H-0008 PR-D6).
  • SuiteResult.warningsSuiteResult.failures (rename, H-0008 PR-D6 quality pass). The previous name was misleading because the property returned ALL non-passing checks regardless of severity, including "info"-severity findings that do not flip .passed to False. The list semantics are unchanged. Pre-release rename; no users yet depend on .warnings since v0.6.0 is not yet published.

Fixed

  • quality_report(df) and profile(df) no longer raise ZeroDivisionError on a 0-row DataFrame — _scan_quality skips columns with n_obs == 0 and returns an empty warnings list (H-0008 PR-D6 quality pass; caught by python-reviewer).
  • pycatdap.measures.cramers_v no longer emits RuntimeWarning: invalid value encountered in divide on tables with an all-zero marginal row or column — switched to np.divide(..., where=...) for side-effect-free masked division. The returned numeric value is unchanged (H-0008 PR-D6 quality pass).

[0.5.0] — 2026-05-28

このリリースは EDA レイヤの フラッグシップ API pycatdap.profile() を導入: H-0007(Phase C)に対応し、describe + association_matrix + target_summary + catdap2 を 1 コールに統合、jinja2 + インライン Plotly による self-contained HTML レポートを生成する。ydata-profiling / skrub.TableReport の pycatdap 版に相当。詳細は HISTORY.md H-0007 および以下の節を参照。

Added

  • ワンコール EDA レポート API(H-0007 Phase C、Issue #14):
  • pycatdap.profile(df, *, response=None, bins=None, criterion="bic", top_k_subsets=5, quality_thresholds=None) -> ProfileResultdescribe + association_matrix + target_summary + catdap2 を 1 コールに統合
  • ProfileResult frozen dataclass — overview / variables / association / top_subsets / quality_warnings / response / n_rows / n_cols を保持。 .show / .to_dict / .to_plotly_json / .to_html を提供
  • VariableCard frozen dataclass — 列ごとの type / cardinality / missing / top / continuous 統計量 / ΔAIC vs response / AIC binning 境界
  • QualityWarning frozen dataclass — 4 種類の警告(high_cardinality / constant / id_candidate / high_missingquality_thresholds= で上書き可)
  • ProfileResult.to_html(path=None) — jinja2 テンプレート(src/pycatdap/templates/profile.html.j2) で単一の self-contained HTML を生成。Plotly figure は include_plotlyjs="inline" で同梱(オフライン閲覧可)。path 指定時は _io.atomic_write_text 経由で原子的書き込み。 jinja2 が無い場合は pycatdap[plotly] extras を促す ImportError
  • チュートリアル docs/tutorials/08-profile-titanic.ipynb — Titanic データセットで profile() の全機能(quality thresholds の上書き、 to_html / to_dict / to_plotly_json 各シリアライズ)をデモ
  • BLUEPRINT.md §3.1 / §5.9 — H-0007 で追加したモジュール(profile.py / templates/)と ProfileResult / VariableCard / QualityWarning の確定 API を反映
  • README.md Quickstart — v0.5+ One-call EDA report 節を pycatdap.profile() の 動く例に置き換え(v0.3+ プレースホルダから昇格)

Fixed

  • pycatdap.profile(df, quality_thresholds={}) が空 dict を None 同等に黙って 落としていた falsy trap を修正(PR #75)。空 dict は「上書き無し」として明示的に 扱う(is not None チェック、feedback_python_falsy_or_default_trap
  • ProfileResult.to_dict()+/-inf をそのまま emit していたため、json.dumps の strict モードや JavaScript の JSON.parse で reject される RFC 8259 違反だった。 _scalar_to_json ヘルパーで NaN と統一して None に変換(PR #75)

Changed

  • ProfileResult.show() の Jupyter 経路を IPython.display.HTML ラッパーを使わない 形に変更し、DescribeResult / TargetSummary の慣習と揃えた(local mypy noise が 5 errors → 3 errors に減少、機能変更なし、PR #75)
  • ProfileResult.to_html(path)_io.atomic_write_text(..., encoding="utf-8") を 明示指定(PR #75、コードベース既存 3 call site と整合)

[0.4.0] — 2026-05-27

このリリースは EDA レイヤを ペア・全列ペア まで広げる minor 拡張: H-0004(target_summary / plot_target)+ H-0005(連続目的変数 Gaussian 回帰 AIC) + H-0006(Phase B 二変量 API: plot_pair / aic_heatmap / association_matrix / association_plot)の 3 つの HISTORY エントリと、それを支える 5 本のチュートリアル ノートブック(03 / 04 / 05 / 06 / 07)を含む。詳細は HISTORY.md および以下の各節を参照。

Fixed

  • DescribeResult.to_html(path) / TargetSummary.to_html(path) を atomic write 化(pycatdap._io.atomic_write_text 経由)。同時に読み取るプロセス(mkdocs serve の watcher 等)が空ファイルや書き込み途中の状態を観測するリスクを排除

Added

  • Phase B 二変量 API(H-0006、Issue #13)— 段階的に追加:
  • pycatdap.plot_pair(df, x, y, *, kind="auto", bins=None, backend=...) — 対称ラッパー。dtype に基づき (target, explanatory) を決定し plot_target に委譲 (連続 × カテゴリ → カテゴリが target、連続 × 連続 → y が target、両カテゴリ → y が target)
  • pycatdap.association_matrix(df, *, measure="aic", bins=None, criterion="bic") — 全列ペアの ΔAIC 行列を返す(非対称、対角 NaN)。target_summary を全 (i, j) ペアで 呼び出し、M.loc[i, j]target=i, explanatory=jdelta_aic を格納。 measure="cramers_v" / "mutual_info" は H-0007 で別途追加予定
  • pycatdap.aic_heatmap(result, *, threshold=0.0, backend=...)Catdap1Result または pd.DataFrame を受け取り、diverging colormap (RdYlGn_r、中心 0)で ΔAIC ヒートマップを描画。threshold 未満のセルに * 注釈
  • pycatdap.association_plot(table, *, threshold=2.0, backend=...) — vcd assoc(shade=TRUE) 風 Pearson 標準化残差ヒートマップ。 TargetSummary または pd.DataFrame(クロス頻度表)を受け取り、 diverging colormap(RdBu_r、中心 0)で描画。 RegressionTargetSummaryTypeErrorplot_target(kind="scatter") を推奨)
  • チュートリアル docs/tutorials/07-bivariate-phase-b.ipynb — Phase B の 4 つの API を Titanic データセットで通しデモ
  • 目的変数 × 説明変数ペア分析 API(H-0004):
  • pycatdap.target_summary(df, target, explanatory, *, bins=None) -> TargetSummary — counts / row_prop / col_prop / expected / pearson_residuals / delta_aic を保持し、 .show / .to_html / .to_dict / .to_plotly_json を提供
  • pycatdap.plot_target(df, target, explanatory, *, kind="auto", bins=None, backend=...) — dtype 組合せで stacked / mosaic / violin / box / hist を自動選択(matplotlib/plotly 両対応)
  • 連続説明変数は bins=None で AIC 最適 binning、bins=int で等幅、bins=list で明示境界
  • 連続目的変数サポート — Gaussian 回帰 AIC 拡張(H-0005、Issue #56):
  • pycatdap.RegressionTargetSummary 新規 dataclass — 連続 target に対する per-X-bin {count, target_mean, target_std} + delta_aic + r_squared + n_effective + intervals + criterion.show / .to_html / .to_dict / .to_plotly_json を提供
  • target_summarytarget_bins / criterion パラメータ追加。連続 target かつ target_bins=NoneRegressionTargetSummary を返し、target_bins 指定で既存 TargetSummary(候補 © fallback)を返す
  • criterion="bic"(default、Yao 1988 推奨)/ "aic" / "aicc"(Hurvich-Tsai 系)
  • 欠損値ハンドリング戦略 M2: Y のみ dropna; X 欠損は明示的 _missing_ pseudo-bin に集約。同一 Y 上の異なる X 候補で AIC_null が一致(R-1)
  • plot_targetkind"scatter" / "bin_means" を追加、連続 target × 連続 X で散布図 + bin 平均線、連続 target × カテゴリ X で box / violin を自動選択
  • 参照実装: nbx-liz/AdvancedCATDAP scoring.py:calc_score_reg_bincount_idx から移植
  • 連続 target に対する従来の ValueError は廃止 — RegressionTargetSummary を返す挙動に変更
  • チュートリアルノートブック 3 本を追加(Issue #27):
  • docs/tutorials/03-iris-pooling.ipynb — iris での AIC 最適 binning
  • docs/tutorials/04-hellogoodbye-multivariate.ipynb — 56 binary 変数での nvar 利用例
  • docs/tutorials/05-real-world-eda.ipynb — seaborn Titanic(欠損あり)での実データ EDA
  • docs/tutorials/06-target-pair-titanic.ipynbtarget_summary / plot_target の全分岐デモ(cat × cat / multi-level / cat × continuous)、AIC 最適 binning と等幅 binning の比較、全 explanatory の ΔAIC ランキング、HTML / Plotly export。 末尾に連続 target サポートの研究 Issue #56 へのリンク
  • pycatdap[tutorial] extras(seaborn)— Notebook 05 用
  • CI で nbmake によるノートブック実行検証(notebooks ジョブ)
  • [dependency-groups].notebooks — Notebook 実行用開発依存(nbmake / seaborn / plotly / matplotlib / ipykernel)

Changed

  • docs/tutorials/02-eda-titanic.ipynb — 03/04/05 へのクロスリファレンスを追加、bundled clean 版と seaborn messy 版の関係を明示。さらに target_summary を使った single-pair drill-down teaser 節を追加し、06 へリンク
  • docs/tutorials/05-real-world-eda.ipynb — クリーニング済み Titanic で target_summarysex / age(連続)に適用する節を追加、AIC 最適 binning の効果を確認
  • docs/tutorials/06-target-pair-titanic.ipynb — 末尾の「Coming soon: continuous targets」プレースホルダ節を H-0005 の動作デモ(連続 target = fareRegressionTargetSummaryplot_target の box / scatter、criterion="aic" / "aicc" / "bic" 比較、target_bins fallback の対比)へ置換。Summary 表に regression-mode の 3 行を追加
  • docs/tutorials/01-basic-catdap.ipynb — 解説文を英訳。v0.2 由来の日本語ナレーションを CONTRIBUTING.md の English-only ポリシーに揃える(PR #52)
  • BLUEPRINT.md §3.1 / §5.7 — H-0004 / H-0005 / H-0006 で追加したモジュール(_target_pair.py / _association.py)と公開 API(4 関数 + 2 ペア API)を反映

[0.3.0] — 2026-05-26

このリリースで pycatdap は「AIC ベース EDA + ML 誤差分析ライブラリ」として再定位された。詳細は HISTORY.md H-0001 / H-0002 / H-0003 を参照。

Added

公開 API

  • pycatdap.plot — 描画バックエンドの選択機能(matplotlib / plotly 両対応)
  • pycatdap.plot.matplotlib.*, pycatdap.plot.plotly.* — バックエンド別実装
  • Plotly バックエンドの完全実装: mosaic_plot, barplot_twoway, aic_comparison_plot
  • 結果オブジェクトの .to_plotly_json() メソッド(Catdap1Result, Catdap2Result
  • pycatdap.describe(df) → DescribeResult — 単変量サマリ
  • .show() / .to_html() / .to_dict() / .to_plotly_json() 各メソッド
  • 列分類: continuous / categorical / boolean / datetime / other(pandas 2.x の StringDtype に対応)
  • pycatdap.plot_variable(df, col, kind="auto"|"hist"|"bar", backend=...) — 単変量プロット
  • pycatdap.plot_missing(df, backend=...) — 欠損値パターンのバーチャート

サンプルデータセット

  • pycatdap.datasets.load_titanic() — R datasets::Titanic 由来(2,201 × 4、全カテゴリカル)
  • pycatdap.datasets.load_iris() — Fisher's iris(150 × 5、連続 4 列 + 種別)
  • pycatdap.datasets__init__ から直接アクセス可能に

任意依存

  • pycatdap[plotly] extras(plotly + jinja2)
  • pycatdap[all] extras(plot + plotly 一括)

ドキュメント・計画

  • 戦略ドキュメント HISTORY.md — H-0001/H-0002/H-0003 accepted
  • 全体開発計画 PLAN.md — v0.2.x〜v1.0 のロードマップ
  • BLUEPRINT.md §3.2 — 5 つの Mermaid アーキテクチャ図
  • ドキュメントサイト mkdocs-material + GitHub Pages
  • mkdocstrings による API リファレンス自動生成
  • mkdocs-jupyter による notebook 埋め込み
  • 新規チュートリアル 02-eda-titanic.ipynb — Phase A API の総覧
  • README リフレッシュ(ポジショニング、比較表、quickstart、ロードマップ)
  • CONTRIBUTING.md に R 参照 CSV 生成手順を追加

品質・インフラ

  • tests/test_against_r.py 2層化: property-based + 厳密数値比較(CSV reference があれば atol=1e-4)
  • Makefile に r-reference / test-slow ターゲット追加
  • .github/workflows/docs.yml — PR ビルド検証 + main push で Pages 自動デプロイ
  • pyproject.toml の dependency-group: docs を追加

Changed

  • pycatdap.plotting.*(v0.2 互換)は pycatdap.plot.matplotlib.* への透過的な re-export shim に変更(既存ユーザー影響なし)
  • docs/tutorial.ipynbdocs/tutorials/01-basic-catdap.ipynb に移動

Migration

破壊的変更なし。from pycatdap.plotting import mosaic_plot は v1.0 まで動作し続ける。 新規ユーザーは canonical な from pycatdap.plot import mosaic_plotbackend=... で切替)を推奨。

[0.2.0] — 2026-03-22

Added

  • コアAIC計算 (_aic.py): compute_aic_twoway, compute_base_aic, compute_delta_aic
  • 分割表構築 (_contingency.py): build_crosstab, build_multidim_crosstab
  • CATDAP-01 (catdap1.py): 全カテゴリカル変数ペアのΔAIC評価
  • プーリング (_pooling.py): 等間隔・不等間隔の連続変数カテゴリ化
  • CATDAP-02 (catdap2.py): 最適説明変数部分集合探索
  • サンプルデータセット (datasets.py): HealthData (52例), HelloGoodbye (13,954例)
  • 可視化 (plotting.py): aic_comparison_plot, barplot_twoway, mosaic_plot
  • チュートリアルノートブック (docs/tutorial.ipynb) — 10項目の正当性検証付き
  • R比較テスト (tests/test_against_r.py)
  • Project scaffold with src layout
  • CI/CD pipeline (GitHub Actions)
  • PyPI trusted publishing via TestPyPI → PyPI