vimure v0.2.0 (2024-06-02) #93
Replies: 1 comment
-
|
@danielRedhead and @eapower, I've released a new package version ( Let me know if it addresses the issues you were facing a while back (#92). You shouldn't need to use a custom reporter mask now that we have those three common reporting scenarios mapped. You can install the new version with the following command: devtools::install_github("latentnetworks/vimure", subdir="src/R", ref="v0.2.0")(Since v0.1.3, the line above is all you need; there is no need to fiddle with reticulate or Python versions. However, note that it's possible our internal reticulate could conflict with your own reticulate if you use, for example, The online tutorials have not yet been updated to the new package version. I will wait for your feedback if I need to make other tweaks and release a minor fix (v0.2.1) Let me know once you had the chance to test it all! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
This version introduces major changes to the way reporters' mask is handled.
(Major)
Instead of creating a custom reporter's mask, users are now encouraged to choose from three preset reporting scenarios that are hardcoded into the code:
reporting_scenario = 1(single-sampling, excluding self-loops)reporting_scenario = 2(double-sampling, excluding self-loops)reporting_scenario = 3(nodes can report any ties in the network, excluding self-loops)Updated the internal logic of the Python function
read_from_edgelist()(Python) to properly enforce the new parameterreporting_scenarioor a custom reporter mask, if informed. This function is also involked by the R package when the user passes an data.frame as input. The logic behind reporters' mask is now handled in the following priority order:reporters(a list) was passed to the function (i.e.read_from_edgelist(edgelist, reporters=reporting_nodes)). If it was, the reporters' mask is set to double-sampling (i.e.reporting_scenario = 2), but applied only to the subset of nodes passed as reporters.reportersparameter is passed, the function checks if the parameterRwas passed to the function (i.e.,read_from_edgelist(edgelist, R=custom_mask)). If it was, then this custom mask is checked for validity and used as the reporters' mask.reportersnorRparameters are passed, thereporting_scenarioparameter is used to determine the reporting scenario.(R)
reporting_scenario(int) parameter tovimure()function.reporting_scenario(int) parameter togenerate_X()function, used when creating synthetic X data.flag_self_reporterparameter fromgenerate_X()function, as this functionality is now handled by thereporting_scenarioparameter.vimure()function . By default, the model will use the double-sampling scenario and does not expect a custom reporter mask.reporter_maskbeing ignored by the R package #92 [BUG] Customreporter_maskbeing ignored by the R package': 1) Check that custom reporters' mask are enforced 2) Check that custom reporters' mask are enforced when input is edgelist.(Python)
reporting_scenario(int) parameter toVIMureModel()constructor.reporting_scenario(int) parameter to_build_X()method, used when creating synthetic X data.flag_self_reporterparameter from_build_X()method, as this functionality is now handled by thereporting_scenarioparameter.VIMureModel#fit()method. By default, the model will use the double-sampling scenario and does not expect a custom reporter mask.TestSyntheticWithReportingScenariosto ensure the new reporting scenarios work as expected.test_data_as_edgelist_reporting_scenario_2, using Karnataka data, to check if thereporting_scenarioparameter is working as expected when the real data is passed as an edgelist.(Internal)
build_self_reporters_mask(reporting_scenario, L, N, M)hosted in theutils.pyfile. This function is now used by theread_from_edgelist()function to create the reporters' mask, by thegenerate_X()function to create the synthetic X data and by theVIMureModel#fit()method to create the reporters' mask for the model.What does that mean for users?
If your data is double-sampled, you shouldn't need to change anything. Just run the
vimure()function (R) orvimure_object.fit()method as usual, just like what is described in Step 3 of Tutorial 2. By default,reporting_scenario=2, which means all users in the network can only report on ties they are involved in as either ego or alter (self-loops excluded).Pass
reporting_scenario=1to the function if the nodes in your network should only be allowed to report the ties they are involved in as ego, orreporting_scenario=3if the nodes could report on any ties, even those they are not involved in.This discussion was created from the release vimure v0.2.0 (2024-06-02).
Beta Was this translation helpful? Give feedback.
All reactions