Skip to content

feat: regression support — Data.y Vec<u8> → Vec<f64>, Spearman/RMSE fitness#76

Merged
eprifti merged 3 commits intomainfrom
feat/regression-y-f64
Mar 25, 2026
Merged

feat: regression support — Data.y Vec<u8> → Vec<f64>, Spearman/RMSE fitness#76
eprifti merged 3 commits intomainfrom
feat/regression-y-f64

Conversation

@eprifti
Copy link
Copy Markdown
Contributor

@eprifti eprifti commented Mar 25, 2026

Summary

  • Change Data.y from Vec<u8> to Vec<f64> across 10 source files
  • Regression mode auto-detected from fit function (spearman/rmse/mutual_information)
  • Feature selection bypasses class-based tests in regression mode, uses prevalence only
  • Classification unchanged: labels stored as 0.0/1.0/2.0

Test

  • 776 lib tests pass
  • Regression tested on wetlab_protocol gene_count: SA finds Spearman=0.164 with k=15

Known limitation

Display still shows AUC/sensitivity/specificity (0.0 for regression) — needs regression-specific display

Closes #15

eprifti added 3 commits March 25, 2026 23:01
All class labels (0/1/2) are now stored as f64 (0.0/1.0/2.0).
Continuous y values (gene_count, etc.) can now be loaded for regression.

Changes across 10 files:
- data.rs: field type, loading, feature selection, class operations
- individual.rs: evaluation, confusion matrix, threshold optimization
- population.rs: fitness computation, removed y_f64 intermediaries
- utils.rs: all metric functions, bootstrap, stratification
- cv.rs: fold splitting, stratification
- voting.rs: confusion matrix, predictions
- bayesian_mcmc.rs: posterior computation
- csv_report.rs: metric export
- lib.rs: remove_class calls

776 lib tests pass.
Closes #15
…d feature selection

- Regression mode auto-detected from fit function (spearman/rmse/mutual_information)
- Feature selection bypasses class-based tests, uses prevalence only
- Tested on wetlab_protocol gene_count: SA finds Spearman=0.164 with k=15

Known limitation: display still shows AUC/sensitivity/specificity (all 0.0 for regression).
The fit value correctly shows the Spearman correlation.

Closes #15
@eprifti eprifti merged commit 96505da into main Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add regressions

1 participant