-
Notifications
You must be signed in to change notification settings - Fork 0
/
Egoshare_3_TrainTestSVM.py
executable file
·45 lines (35 loc) · 1.29 KB
/
Egoshare_3_TrainTestSVM.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
#!coding: utf-8
from svm import *
import os
import time
GENERATE_CAPTCHA_BASED_MODELS = True
GENERATE_SIMULATION_BASED_MODELS = False
VERBOSE = 0
MODEL_FOLDER = 'Egoshare/Models'
if GENERATE_CAPTCHA_BASED_MODELS:
CRANGE = [1000]
KERNEL_TYPE = [RBF, POLY, LINEAR, SIGMOID]
TRAINING_FOLDER = 'Egoshare/DBTraining-Captcha_based'
TEST_FOLDER = 'Egoshare/DBTest-Captcha_based'
GENERATE_ANYWAY = 1
for C in CRANGE:
for KERNEL in KERNEL_TYPE:
MODEL_FILE = "captcha_based_TR=1896_TEST=714_C="+str(C)+"_KERNEL="+str(KERNEL)+".svm"
#Génération du modèle
execfile("Train & Test SVM.py")
#Test du modèle
execfile("Egoshare_5_TestPerf.py")
if GENERATE_SIMULATION_BASED_MODELS:
CRANGE = [1000]
KERNEL_TYPE = [LINEAR, SIGMOID]
TRAINING_FOLDER = 'Egoshare/DBTraining-Simulation_based'
TEST_FOLDER = 'Egoshare/DBTest-Simulation_based'
GENERATE_ANYWAY = 1
for C in CRANGE:
for KERNEL in KERNEL_TYPE:
MODEL_FILE = "simulation_based_NEW_C="+str(C)+"_KERNEL="+str(KERNEL)+".svm"
#Génération du modèle
execfile("Train & Test SVM.py")
#Test du modèle
execfile("Egoshare_5_TestPerf.py")
raw_input()