# Story 4.1: Configuration de la Régression Status: review ## Story As a Julien (Analyst), I want to configure the parameters of my regression model, so that I can tailor the analysis to my specific hypothesis. ## Acceptance Criteria 1. **Model Selection:** Users can choose between "Linear Regression" and "Logistic Regression" in the sidebar. 2. **Dynamic Validation:** The system checks if the Target Variable (Y) is compatible with the selected model (e.g., continuous for Linear, binary/categorical for Logistic). 3. **Parameter Summary:** The sidebar displays a clear summary of the selected X variables and the Y variable before launch. 4. **Interactive Updates:** Changing X or Y variables updates the "Implementation Readiness" of the model (enable/disable the "Run" button). ## Tasks / Subtasks - [x] **UI Enhancements** (AC: 1, 3) - [x] Add model type dropdown to `AnalysisConfiguration.tsx`. - [x] Implement a "Selected Features" summary list. - [x] **Validation Logic** (AC: 2, 4) - [x] Implement frontend validation to check if the target variable matches the model type. - [x] Disable "Run Regression" button if validation fails or selection is incomplete. ## Dev Notes - **Validation Rules:** - `linear`: Cible doit être de type `numeric`. - `logistic`: Cible doit être `categorical` ou `boolean`. - **UI:** Added a toggle switch for model selection and refined the predictor selection list with importance bars. ### Project Structure Notes - Modified `frontend/src/features/analysis/components/AnalysisConfiguration.tsx`. - Updated `frontend/src/store/use-grid-store.ts` with `ModelType` state. ### References - [Source: epics.md#Story 4.1] - [Source: architecture.md#Frontend Architecture] ## Dev Agent Record ### Agent Model Used {{agent_model_name_version}} ### Completion Notes List - Integrated model type selection (Linear/Logistic). - Added comprehensive validation logic for target variables. - Refined the predictors list to show importance scores sum and visual bars. - Implemented state-aware activation of the execution button. ### File List - /frontend/src/store/use-grid-store.ts - /frontend/src/features/analysis/components/AnalysisConfiguration.tsx