EpiNet expects two CSV files: one for nodes and one for edges. The schema is domain-neutral so the same toolkit can be used for epidemiology, clinical pathways, research collaboration networks, referral systems, grant maps, patient journeys, or other graph-shaped problems.
Required:
IDOptional but commonly useful:
Outcome,Type,Label,Group,Time,Feature1,Feature2,...Example:
ID,Outcome,Type,Age,Clinic
Patient_1,1,Patient,62,A
Patient_2,0,Patient,44,B
Clinic_A,,Clinic,,Rules:
IDmust be unique.Outcomeis optional. If present, it can be used for outcome modeling and for defining target nodes in shortest-path analysis.- Numeric node attributes are added to the optional outcome model.
- Missing values should be meaningful. The toolkit does not assume that blank, unknown, not measured, and zero are the same thing.
Required:
SourceID,TargetIDOptional:
Weight,Relationship,Time,Direction,Metadata...Example:
SourceID,TargetID,Weight,Relationship
Patient_1,Clinic_A,1.0,visit
Patient_2,Clinic_A,1.0,visitRules:
- Every
SourceIDandTargetIDmust exist in the node file. - By default, edges are treated as undirected.
- Pass
--directedifSourceID -> TargetIDdirection matters. - Pass
--weight-column Weightto copy an edge column into the graph asweight. - Pass
--path-mode distanceonly if the weight column represents distance, cost, delay, or impedance. - Pass
--path-mode strengthonly if the weight column is a normalized 0..1 relationship strength. Internally, the toolkit converts strength into a non-negative cost with-log(strength). - Do not call a route "fastest" unless an edge column truly encodes time or delay.
Typical outputs:
graph_summary.json: node/edge counts, density, components, isolates.node_features.csv: graph-derived node features.nearest_targets.csv: nearest target node and shortest path per source.shortest_paths.csv: source-target path table.model_metrics.json: optional outcome-model metrics.model_feature_importance.csv: optional RandomForest feature importances.
python -m vahtian.epinet.toolkit \
--nodes synthetic_nodes.csv \
--edges synthetic_edges.csv \
--outcome-column Outcome \
--target-outcome 1