-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathanomaly.cpp
More file actions
40 lines (36 loc) · 1.17 KB
/
anomaly.cpp
File metadata and controls
40 lines (36 loc) · 1.17 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include "common.hpp"
#include "community.hpp"
#include "file_io.hpp"
#include "network.hpp"
#include <iostream>
int main(int argc, char **argv) {
int num_comms = 2;
int triple_type = D3CS_NOBACK;
int cut_type = D3C_NOBACK_COND;
std::string name = "anomaly";
std::cout << "DIRLAP ---------" << std::endl;
{
Network net = Network("data", name, triple_type);
CommDetection comm(net, num_comms, DIRLAP, cut_type, name);
comm.Run();
std::vector<int> comms = comm.Communities();
WriteVector(comms, "anomaly_dl_comms.txt");
}
std::cout << "D3C NO BACK DIRLAP ---------" << std::endl;
{
Network net = Network("data", name, triple_type);
CommDetection comm(net, num_comms, D3C_ONLY_NOBACK_DIRLAP, cut_type, name);
comm.Run();
std::vector<int> comms = comm.Communities();
WriteVector(comms, "anomaly_subdl_comms.txt");
}
std::cout << "TENSOR ---------" << std::endl;
{
Network net = Network("data", name, triple_type);
CommDetection comm(net, num_comms, TENSOR, cut_type, name);
comm.Run();
std::vector<int> comms = comm.Communities();
WriteVector(comms, "anomaly_tsc_comms.txt");
}
std::cout << "END ---------" << std::endl;
}