forked from MengtingWan/KDEm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.py
46 lines (43 loc) · 1.87 KB
/
test.py
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
43
44
45
46
# -*- coding: utf-8 -*-
"""
test.py
@author: Mengting Wan
"""
import sys
import test_real as real
import test_syn_uni as syn_uni
import test_syn_mix as syn_mix
if __name__=="__main__":
print "================================="
#print "Definition: test -data -method"
print "Definition: test data"
print "Parameters"
print " data: the dataset indicater"
print " should be one of 'synuni', 'synmix', 'realpop' and 'realtrip'"
print " 'synuni': run experiments on Synthetic(unimodal) datasets"
print " 'synmix': run experiments on Synthetic(mix) datasets"
print " 'realpop': run experiments on the Population(outlier) dataset"
print " 'realtrip': run experiments on Tripadvisor datasets"
print " the default is 'realpop'."
#print " method: the method indicater"
#print " should be one from 'kernel', 'all'"
#print " 'kernel': run only KDEm/KDE on indicated datasets"
#print " 'all': run KDEm/KDE, and all other baseline methods on indicated datsets"
#print " the default is 'kernel'"
#print " Notice that results from 'kernel' and 'all' are the same on Synthetic(mix) datasets and Tripadvisor datasets"
print "Example: test realpop"
print "=================================="
if(len(sys.argv)>1):
arg = sys.argv[1]
if arg=="synuni":
syn_uni.run_test_uni(m=200, n=100, k=50)
elif arg=="synmix":
syn_mix.run_test_mix(m=200, n=100, k=50)
elif arg=="realpop":
real.run_test_pop()
elif arg=="realtrip":
real.run_test_tripadvisor()
else:
"Error: the input parameter should be one of 'synuni', 'synmix', 'realpop' and 'realtrip'"
else:
real.run_test_pop(m=200, n=100, k=50)