Skip to content

Fix Tree mdl cost #1

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.

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions