Implement CV-based optimization strategy to fix convergence issues #62
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.
…and improve performance
This commit introduces a major optimization improvement to FFX by replacing the traditional pathwise learning approach with a cross-validation based strategy that significantly reduces convergence warnings and improves computational efficiency.
Key Improvements
🎯 Performance Gains
🔧 Technical Enhancements
New CV-Based Optimization Strategy
ffx/core/model_factories.py:594-731_cvBasedLearn()using scikit-learn's ElasticNetCV/LassoCVConfiguration Option
ffx/core/build_strategy.py:31optimization_strategy('cv' or 'pathwise')Enhanced Traditional Approach
🧪 Testing Results
Comparison on iris dataset:
🔄 Migration Path
optimization_strategy='pathwise'to use originalProblem Solved
This addresses the long-standing issue of excessive convergence warnings from scikit-learn's coordinate descent algorithm when using FFX. The original pathwise approach with 1000+ alpha values and aggressive L1 regularization (0.95) was suboptimal for symbolic regression problems, leading to:
The new CV-based approach uses modern optimization best practices specifically tailored for symbolic regression workloads.
🤖 Generated with Claude Code