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

Time window bug #87

Open
nurek-mateusz opened this issue Oct 19, 2024 · 0 comments
Open

Time window bug #87

nurek-mateusz opened this issue Oct 19, 2024 · 0 comments

Comments

@nurek-mateusz
Copy link
Collaborator

The propagation in a temporal network created from a file based on a time window does not work if consecutive windows contain different sets of nodes.

ValueError: Net should have one actors set in snaps!

Minimal reproducible example:

import network_diffusion as nd
from utils import functions
from tqdm import tqdm


# example.csv contains (sender receiver time):
'''
1 2 10
2 1 13
1 3 17
3 1 21
1 3 26
'''

data = 'example.csv'
g = nd.TemporalNetwork.from_txt(data, time_window=10)

seeding_budget = 20
tnem = nd.models.TemporalNetworkEpistemologyModel(
            seed_selector=nd.seeding.RandomSeedSelector(),
            seeding_budget=(100-seeding_budget, seeding_budget),
            trials_nr=10,
            epsilon=0.01,
        )

experiment = nd.Simulator(model=tnem, network=g)
experiment.perform_propagation(n_epochs=10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant