#!/usr/bin/env python
# -*- coding: utf-8 -*-

import argparse
import logging
import logging.config
import os.path

from config.constant import Values
import components.data
import model.feature_model
from semantic.taint import GroupLabel
import components.predict
import components.evaluate
import visitor.loader


from sklearn.ensemble import AdaBoostClassifier
from sklearn.ensemble import GradientBoostingClassifier
from sklearn.ensemble import VotingClassifier
from sklearn.externals import joblib
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.feature_extraction.text import TfidfTransformer
from sklearn.model_selection import GridSearchCV
from sklearn.model_selection import ShuffleSplit
from sklearn.pipeline import Pipeline
from sklearn.preprocessing import FunctionTransformer
from sklearn.preprocessing import LabelEncoder
from sklearn.svm import LinearSVC
from sklearn.linear_model import LinearRegression


label_encoder = None


if __name__ == '__main__':
	logging.config.dictConfig(Values.log_init_config)
	logger = logging.getLogger(__name__)
	
	train_groups = modules.data.complete_set(Values.all_train_labeled_tainted_groups_multiIMG_path)
	test_groups = modules.data.complete_set(Values.all_test_labeled_tainted_groups_multiIMG_path)
	from model.test_best_model import FeatureModel
	best_model = FeatureModel()
	best_model.test_best_model_train_sub(train_groups,test_groups)





