Skip to content

Fix Tree mdl cost #1

@ahmadzuhd

Description

@ahmadzuhd

In Code TreeDfaFast.scala

The code must use .toList before .map so that equal costs per-transition are NOT deduplicated. transitions is a Set[Transition], so a bare Set.map would return a Set[Double] and silently discard duplicate cost values.

The correct code should be:
idCost + labelCost + transitions.toList.map(tr => tr.from.multiplicities.map(p => idCost + log2(p._2)).sum + labelCost + idCost).sum

However, this change will cause the following test to fail "learnDisjointConcreteStrings"

We need to validate that fix and if correct if possible to reason why the test fails at this stage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions