Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preprocessing start-time and end-time bug #39

Closed
auzaheta opened this issue Jun 17, 2021 · 2 comments · Fixed by #84
Closed

Preprocessing start-time and end-time bug #39

auzaheta opened this issue Jun 17, 2021 · 2 comments · Fixed by #84
Assignees
Labels
Difficulty: Moderate Expected workload is several weeks. Status: Blocked Issue requires other issues (e.g. bugs, dependencies) to be resolved before it can be addressed. Type: Bug Issue is about an error in existing code that needs fixing.
Milestone

Comments

@auzaheta
Copy link
Collaborator

Describe the bug
The initialization of the stats matrices doesn't consider the start time argument.
This issue related to #33

To Reproduce

# direct network
eventsIncrement <- data.frame(
  time = cumsum(
    c(1, 5, 3, 4, 2, 1, 3, 4, 5, 1, 3, 4)),
  sender = sprintf("Actor %d",
    c(1, 3, 2, 2, 5, 1, 3, 3, 4, 2, 5, 1)),
  receiver = sprintf("Actor %d",
    c(2, 2, 3, 3, 1, 5, 4, 4, 2, 3, 2, 2)),
  increment =
    c(1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1),
  stringsAsFactors = FALSE
)

actorsEx <- data.frame(
  label = sprintf("Actor %d", 1:5),
  present = rep(TRUE, 5),
  attr1 = c(9.9, 0.1, 0.5, 0.45, 0.25),
  stringsAsFactors = FALSE
)

networkState <- matrix(
  c(0, 3, 0, 0, 0,
    1, 0, 1, 1, 0,
    0, 0, 0, 1, 0,
    0, 0, 1, 0, 0,
    0, 0, 0, 0, 0),
  nrow = 5, ncol = 5, byrow = TRUE,
  dimnames = list(sprintf("Actor %d", 1:5),
                  sprintf("Actor %d", 1:5))
)

# defining objects
networkState <- defineNetwork(
  matrix = networkState, nodes = actorsEx,
  directed = TRUE)
networkState <- linkEvents(
  x = networkState,
  changeEvent = eventsIncrement,
  nodes = actorsEx)
depNetwork <- defineDependentEvents(
  events = eventsIncrement,
  nodes = actorsEx,
  defaultNetwork = networkState)

prep <- estimate(depNetwork ~ inertia(networkState, window = 5,
                            preprocessOnly = TRUE,
                             estimationInit = list(startTime = 7))
prep$initialStats

Expected behavior

It should be an empty matrix

Desktop (please complete the following information):

  • OS: Windows 10 Education
  • R Version 4.0.3
  • Goldfish Version 1.5.0
@auzaheta auzaheta added Type: Bug Issue is about an error in existing code that needs fixing. Difficulty: Moderate Expected workload is several weeks. Status: Blocked Issue requires other issues (e.g. bugs, dependencies) to be resolved before it can be addressed. labels Jun 17, 2021
@auzaheta auzaheta added this to the EUSN workshop milestone Jun 17, 2021
@auzaheta auzaheta self-assigned this Jun 17, 2021
auzaheta added a commit that referenced this issue Sep 6, 2022
@auzaheta auzaheta changed the title Preprocessing with a different start time doesn't compute the correct initial stats matrices Preprocessing start-time and end-time bug Sep 13, 2022
@auzaheta
Copy link
Collaborator Author

Other bugs for end-time were found.
For DyNAM-rate events with interval 0 are produced for the preprocessing when start-time is not specified.
An additional review of the estimation engine is required to understand how this information is used.

@auzaheta
Copy link
Collaborator Author

Additional tests using windows for DyNAM-rate are needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty: Moderate Expected workload is several weeks. Status: Blocked Issue requires other issues (e.g. bugs, dependencies) to be resolved before it can be addressed. Type: Bug Issue is about an error in existing code that needs fixing.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant