feat: Implement control subtraction for LASSO behavioral prediction and add corresponding tests#4
Conversation
…e tests for control subtraction
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThis pull request introduces a comprehensive diagnostic framework for LASSO-based behavioral predictions. It adds a new Python script that orchestrates multi-condition and multi-mode diagnostic runs, aggregates results into various output formats (CSV, JSON, Markdown), and includes regression tests to validate newly exported utility functions for receptor ablation and fixed-scaler fitting. Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant CLI as Command Line
participant Parser as Argument Parser
participant Orchestrator as Main Orchestrator
participant Predictor as LassoBehavioralPredictor
participant Stats as Statistics Engine
participant FileIO as File I/O
User->>CLI: Execute script with arguments
CLI->>Parser: Parse conditions, modes, lambda_range
Parser-->>CLI: Validated arguments
CLI->>Orchestrator: Initiate diagnostic run
loop For each condition and mode
Orchestrator->>Predictor: run_mode (condition, mode, params)
Predictor->>Predictor: fit_behavior
Predictor->>Stats: Compute y_stats, x_stats, pred_stats
Stats-->>Predictor: Statistics (mean, std, collapse flags)
Predictor-->>Orchestrator: RunResult + details dict
end
Orchestrator->>Stats: Aggregate metrics across runs
Orchestrator->>FileIO: Write per_condition_metrics.csv
Orchestrator->>FileIO: Write per_condition_top_coefs.csv
Orchestrator->>FileIO: Write collapse_flags.csv
Orchestrator->>FileIO: Write per_condition_yx_stats.json
Orchestrator->>FileIO: Write reproducibility_check.csv
Orchestrator->>FileIO: Write SUMMARY.md
FileIO-->>User: Output files generated
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
✨ Finishing touches
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
check if lasso working right it seems to be!
Summary by CodeRabbit
New Features
Tests
✏️ Tip: You can customize this high-level summary in your review settings.