-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerated.py
More file actions
26 lines (18 loc) · 816 Bytes
/
generated.py
File metadata and controls
26 lines (18 loc) · 816 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from model.graph_mcmc import Graph_MCMC
def run():
graph = Graph_MCMC()
graph.read_from_file("generated.gml")
feature_names = graph.get_feature_names()
graph.partition(B_min=2, B_max=5)
# ml_classifier = graph.train_map_classifier()
# ml_classifier.plot_final_weights(feature_names)
# mcmc_classifier = graph.sample_classifier_mcmc(100, True)
# mcmc_classifier.plot_sampled_weights(feature_names)
_B_max = graph.mcmc(10, verbose=True)
marginal_classifier = graph.sample_classifier_marginals(2500, step_scaling=0.001, sigma=1, verbose=True)
marginal_classifier.plot_sampled_weights(feature_names)
marginal_classifier.plot_sample_histogram()
marginal_classifier.plot_sample_history()
if __name__ == "__main__":
print("Analysing simulated data")
run()