Add control-subtracted LASSO behavioral prediction#3
Conversation
…nd add corresponding tests
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThis PR introduces control-subtraction (ΔPER) functionality to LASSO-based behavioral prediction. It adds a new CLI script, extends the core behavioral prediction library with control-condition matching and missing-control policies, updates documentation with usage examples, and includes comprehensive tests for the new workflow. Changes
Sequence DiagramsequenceDiagram
participant User
participant CLI as run_lasso_behavioral_prediction.py
participant Parser as Argument Parser
participant Predictor as LassoBehavioralPredictor
participant DataLoader as Data Alignment
participant LASSO as LASSO Fitting
participant FileOutput as Output Generation
User->>CLI: Execute with --subtract_control flags
CLI->>Parser: Parse conditions, lambda range, policies
Parser->>CLI: Return parsed arguments
loop Per Condition
CLI->>Predictor: fit_behavior(condition, subtract_control=True)
Predictor->>Predictor: _infer_control_condition()
Predictor->>DataLoader: Load opto & control behavior data
DataLoader->>DataLoader: Align pairs by missing_control_policy
DataLoader->>Predictor: Return ΔPER (opto − control)
Predictor->>LASSO: Fit model on ΔPER targets
LASSO->>Predictor: Return BehaviorModelResults
Predictor->>CLI: Return results with metadata
CLI->>FileOutput: Save plots, CSV, JSON (with mode prefix)
end
FileOutput->>User: Generated outputs per condition
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
Poem
✨ Finishing touches
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (4)
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 |
Adds control-subtraction support in LASSO fits, CLI for ΔPER runs, tests, and doc update.
Summary by CodeRabbit
New Features
Documentation
Tests
✏️ Tip: You can customize this high-level summary in your review settings.