Description
When using min_prevalence = 90 combined with a language = binary, the feature selection results is not to small, so why is not working ? Instead of exiting gracefully with a clean error message, the program panics. The program works with min_prevalence = 90 and when language' is not binary`. Why is not working with those parameter ?
Steps to Reproduce
- Set
min_prevalence = 90
- Use a
language = binary
- Run the program
- Observe the panic
param.yaml
Actual Behavior
The program panics:
thread '<unnamed>' (38) panicked at src/ga.rs:104:9:
Initial population size is too small (30<50 individuals)!
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' (19) panicked at src/main.rs:157:29:
Thread panicked!: Any { .. }
Logs
2026-03-05 23:13:19 [INFO] Training using Genetic Algorithm
2026-03-05 23:13:19 [INFO] Selecting features...
2026-03-05 23:13:19 [WARN] Class "PD" has only 9 significant features based on required threshold ! All features kept for this class.
2026-03-05 23:13:19 [WARN] Class "PR/CR" has only 5 significant features based on required threshold ! All features kept for this class.
2026-03-05 23:13:19 [INFO] 14 features selected
2026-03-05 23:13:19 [ERROR] Initial population size is too small (30<50 individuals)!
We can see there are 14 features, it should work.
Environment
min_prevalence: 90
language = binary
- Affected files:
src/ga.rs:104, src/main.rs:157
Labels
bug, feature
Description
When using
min_prevalence = 90combined with alanguage = binary, the feature selection results is not to small, so why is not working ? Instead of exiting gracefully with a clean error message, the program panics. The program works withmin_prevalence = 90and whenlanguage' is notbinary`. Why is not working with those parameter ?Steps to Reproduce
min_prevalence = 90language = binaryparam.yaml
Actual Behavior
The program panics:
Logs
We can see there are 14 features, it should work.
Environment
min_prevalence:90language = binarysrc/ga.rs:104,src/main.rs:157Labels
bug,feature