2.4 KiB
2.4 KiB
Story 4.3: Dashboard de Résultats Interactif
Status: review
Story
As a Julien (Analyst), I want to see the model results through interactive charts, so that I can easily diagnose the performance of my regression.
Acceptance Criteria
- Results View: A new "Results" tab or page displays the output of the regression.
- Metrics Cards: Key statistics (R², Adj. R², P-value, Sample Size) are shown in high-visibility cards with Shadcn UI.
- Primary Chart: A "Real vs Predicted" scatter chart with a reference 45-degree line.
- Diagnostic Chart: A "Residuals Distribution" histogram or "Residuals vs Fitted" plot.
- Coefficient Table: A clean table showing each predictor, its coefficient, and its p-value (color-coded for significance < 0.05).
Tasks / Subtasks
- Visualization Development (AC: 1, 3, 4)
- Create
frontend/src/features/analysis/components/AnalysisResults.tsx. - Implement "Real vs Predicted" chart using
Recharts. - Implement "Residuals" diagnostic chart.
- Create
- Data Integration (AC: 2, 5)
- Update
useGridStoreto trigger the regression run and storeanalysisResults. - Build the metrics summary UI and coefficient table.
- Update
Dev Notes
- Feedback: Added visual error reporting in the UI if the regression fails.
- Charts: Used
ScatterChartfor real-vs-pred andAreaChartfor residuals distribution. - UX: Auto-switch to "Results" tab upon successful execution.
Project Structure Notes
- Created
frontend/src/features/analysis/components/AnalysisResults.tsx. - Integrated results state in
frontend/src/store/use-grid-store.ts. - Updated
frontend/src/app/page.tsxwith robust error handling.
References
- [Source: epics.md#Story 4.3]
- [Source: ux-design-specification.md#Design Directions]
Dev Agent Record
Agent Model Used
{{agent_model_name_version}}
Completion Notes List
- Implemented
AnalysisResultscomponent with responsive charts. - Added visual indicators for statistical significance.
- Verified correct state management flow from configuration to results display.
- Improved error handling and user feedback during execution.
File List
- /frontend/src/features/analysis/components/AnalysisResults.tsx
- /frontend/src/store/use-grid-store.ts
- /frontend/src/app/page.tsx
- /frontend/src/features/analysis/components/AnalysisConfiguration.tsx