Skip to content

Commit 3a38235

Browse files
committed
wrap up VQA
1 parent 9dc17c9 commit 3a38235

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

dump/Cpp/main.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ int main(int argc, char** argv) {
9090
}
9191
*/
9292
//code to read prov from files
93-
string provfilename = "/home/sleepytodeath/rapidnet_v1.0/data/vqa/terminal/prov_eval_terminal.txt";
93+
string provfilename = "/home/sleepytodeath/rapidnet_v1.0/data/vqa/factory/prov_eval_factory.txt";
9494
string head = "sim" + provfilename.substr(provfilename.find_last_of("_") + 1, provfilename.find(".txt") - provfilename.find_last_of("_") - 1);
9595
ifstream pfin(provfilename);
9696
stringstream buffer;
@@ -139,7 +139,7 @@ int main(int argc, char** argv) {
139139

140140
vector<string> filenames;
141141
string path = "/home/sleepytodeath/rapidnet_v1.0/data/vqa/";
142-
string foldername = "terminal";
142+
string foldername = "factory";
143143
filenames.push_back(path + foldername + "/word_obs.txt");
144144
filenames.push_back(path + foldername + "/sim_obs.txt");
145145
filenames.push_back(path + foldername + "/hasq_obs.txt");
@@ -228,7 +228,7 @@ int main(int argc, char** argv) {
228228
//suff.printProv(suff.getSuffProv());
229229
cout<<endl;
230230
*/
231-
/*
231+
232232
clock_t t2 = clock();
233233
suff.setInfluence(dnf.getLambda());
234234
//suff.setInfluence(suff.getSuffProv());
@@ -242,7 +242,7 @@ int main(int argc, char** argv) {
242242
suff.sortInfluence(head);
243243
Literal x1 = suff.maxInfluence();
244244
cout<<"Sequential maxInfluence Literal: "<<x1.getName()<<" "<<x1.getProb()<<endl<<endl;
245-
*/
245+
246246

247247
suff.findMostContri(dnf.getLambda());
248248

@@ -278,7 +278,7 @@ int main(int argc, char** argv) {
278278

279279

280280
clock_t t3 = clock();
281-
vector<Literal> vcl = suff.changedLiterals(dnf.getLambda(), 0.0082, head);
281+
vector<Literal> vcl = suff.changedLiterals(dnf.getLambda(), 0.0026, head);
282282
//vector<Literal> vcl = suff.changedLiterals(suff.getSuffProv(), 0.9, head);
283283
t3 = clock() - t3;
284284
cout<<"Parallel changed literals running time: "<<((float)t3)/CLOCKS_PER_SEC<<" seconds"<<endl<<endl;

dump/Cpp/query

0 Bytes
Binary file not shown.

result.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1488,8 +1488,6 @@ barn pLambda = 0.019
14881488
hotel pLambda = 0.0125
14891489
horse pLambda = 0.0075
14901490

1491-
Most contributive EDBtuple: hasImgbuildingislarge
1492-
Probability: 1
14931491

14941492
hasImghousewithroof seqInfl=0.0108
14951493
hasImgpalmbeforebuilding seqInfl=0.0089
@@ -1723,8 +1721,7 @@ college pLambda = 0.0017
17231721
factory pLambda = 0.0014
17241722
library pLambda = 0.0008
17251723

1726-
Most contributive EDBtuple: hasImgmanwearspants
1727-
Probability: 1
1724+
17281725

17291726
hasImgmanwearspants seqInfl=0.0023
17301727
hasImgshelfwithbooks seqInfl=0.0017

0 commit comments

Comments
 (0)