Skip to content

Improvement of the Individual structure #45

Closed

Description

@TheLokj

The Individual structure should be modified to facilitate future updates (regression, multi-class, etc.). Ideally, metric-specific substructures/enums should be created, encompassing the current individual.auc, individual.specificity, individual.sensitivity and individual.metrics with different subtypes (BinaryClassification, Regression, etc.), for example, in a single subfield individual.metrics.

This modification is also necessary to enable, among other things, the addition of a direction to the AUC, which is currently impossible (or would require a dirty code).

Activity

  1. added theissue type on Jan 16, 2026
  2. eprifti commented on Mar 24, 2026

    @eprifti
    Contributor

    Partially addressed in commit 8200176

    The most critical structural change has been made:

    Done:

    • Individual.features converted from HashMap<usize, i8> to BTreeMap<usize, i8>
    • Deterministic iteration order for all algorithms (fixes ACO is not deterministic with fixed seed #57)
    • Simplified compute_hash() (no longer needs BTreeMap conversion)
    • Removed redundant sorted workarounds in evaluate functions

    Remaining (original issue scope):

    • Refactor metrics into enum: Metrics { BinaryClassification { auc, sensitivity, specificity, ... }, Regression { spearman, mse, ... } }
    • Add directed AUC support
    • Support different metric sets per task type (needed for Add regressions  #15 regressions)

    The metrics refactor is the remaining work — it's needed to enable regressions (#15) with Spearman correlation as a fitness function.

  3. eprifti commented on Mar 24, 2026

    @eprifti
    Contributor

    Completed in PR #58. Individual metrics refactored into ClassificationMetrics struct. All 756 tests pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions