Feat/enhanced error analysis - #20
Merged
Merged
Conversation
Add --analysis flag to batch_evaluate.py for comprehensive error reporting: - Token breakdown table per category (Exact Match, Accuracy, Sub/Del/Ins, Error Rate, Impact on Total) - Frequent substitution/deletion/insertion tables with counts - Multi-panel category breakdown chart (stacked bar + contribution panel) New core library modules: - analysis.py: TER, category contributions, error type distribution, frequency analysis (compute_error_summary as convenience entry point) - charts.py: matplotlib chart generation (category_breakdown_chart, frequent_errors_bar_chart) Extended existing modules: - measure.py: token_error_details() and text_error_details() to collect individual error records from aligned token pairs - measure_batch.py: collect_error_details param, aggregate_error_details() - reporting.py: format_contribution_table(), format_frequent_errors_table() Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Wire analysis.py, charts.py, and the new reporting helpers into the Streamlit visualizer. Rename Manual Inspection to Single Sample Analysis; promote Token Error Rate and Accuracy to prominent metric tiles in both tabs with a subtle category decomposition that sums to TER; auto-rerender the single-sample view on sidebar toggles (no button). Batch Overall Metrics mirrors the same layout and adds Category Analysis + Frequent Errors sections. Domain config is now user-selectable from the sidebar (Legal/Medical/Technical/From file/None). Refresh CLAUDE.md to document the new modules, CLI flags, and terminology. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… config - Remove frequent_errors_bar_chart from charts.py (tables are sufficient) - Update batch_evaluate.py --chart flag to produce only category_breakdown.png - Add .streamlit/config.toml with toolbarMode=minimal to hide Deploy button Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Reflect redesigned visualizer (Single Sample Analysis tab, auto-render, TER/Accuracy metric tiles, category breakdown chart, frequent-error tables, updated session state keys) - Document new CLI flags (--analysis, --top-n, --chart) and analysis output files in docs/batch-processing.md - Document error analysis Python API (aggregate_error_details, compute_error_summary, collect_error_details) with examples Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.