Skip to content

Logical error in selecting the best model for Robyn_refresh #674

@sahbakn

Description

@sahbakn

Describe issue

I believe there might be a logical error is selecting the best model based on 'error_scores' in refresh.R.
Based on my understanding, we want to choose the model with the highest error score. However, the code snippet below shows that the sorting is done on 'solID' first and then 'error_score', and given the solIDs are unique, the selection is done on the string of solIDs not on error score. I have seen this in practice too, seeing the next model for refresh is selected based on the solIDs strings.

In Refresh.R:

    ## Select winner model for current refresh
    OutputCollectRF$resultHypParam <- OutputCollectRF$resultHypParam %>%
      arrange(.data$solID, desc(.data$error_score)) %>%
      select(.data$solID, everything()) %>%
      ungroup()
    bestMod <- OutputCollectRF$resultHypParam$solID[1]

Environment & Robyn version

Robyn version 3.7 and above

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions