Skip to content

Program crashes with min_prevalence = 90 and language = binary #49

@LuciecLaurent

Description

@LuciecLaurent

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

  1. Set min_prevalence = 90
  2. Use a language = binary
  3. Run the program
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions