main.cpp
1.08 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
41
42
#include <stdlib.h>
#include <string>
#include <fstream>
#include <algorithm>
#include <stim/biomodels/network.h>
#include <ANN/ANN.h>
#include <boost/tuple/tuple.hpp>
using namespace stim;
//template <typename T>
network<float>* network1;
int main(int argc, char* argv[])
{
if(argc < 4){
std::cout<<"Please specify a ground truth and test case"<<std::endl;
exit(1);
}
float resample_rate = 0.1;
float sigma = atof(argv[3]);
stim::network<float> GT;stim::network<float> T;
// load obj files to 3D network class
GT.load_obj(argv[1]);
T.load_obj(argv[2]);
// resample the loaded networks
stim::network<float> resampled_GT;stim::network<float> resampled_T;
resampled_GT = GT.resample(sigma * resample_rate);
resampled_T = T.resample(sigma * resample_rate);
// compare ground truth with truth and viceversa
float gFPR, gFNR;
gFPR = resampled_GT.compare(resampled_T, sigma);
gFNR = resampled_T.compare(resampled_GT, sigma);
// print false alarms and misses
std::cout << "False postive rate is " << gFPR << std::endl;
std::cout << "False negative rate is " << gFNR << std::endl;
}