Compare Networks Demo
This demo illustrates how to simulate and compare semantic fluency data using two different networks — the original USF network and a perturbed version of it. This is useful for evaluating how well a model-generated or alternate network captures actual fluency behavior.
Overview:
Load a known semantic network (USF animal subset).
Create a perturbed version of the network by randomly flipping ~10% of edges.
Generate fluency lists from both networks using censored random walks.
Compute log-likelihoods of those lists under both networks.
Save likelihoods and data for further inspection.
Key Concepts:
Perturbation: Randomly flip edges to simulate variation or error in network structure.
Fluency Simulation: Generate fluency lists using random walks with optional jump probabilities.
Likelihood Comparison: Assess how well each network explains data generated from itself and the other network.
Functions Used:
snafu.read_graph
snafu.DataModel
snafu.gen_lists
snafu.probX
Output:
Prints log-likelihoods to console
Saves rounded log-likelihoods in demos_data/expected_likelihoods.pkl