settings['SAE_SVM_RBF_COMBO'] = 1
settings['SVM_POLY'] = 0
settings['DL_S'] = 0
settings['DL_U'] = 0

settings['finetune_lr'] = 1
settings['batch_size'] = 100
settings['pretraining_interations'] = 5004
settings['pretrain_lr'] = 0.001
settings['training_epochs'] = 1503
settings['hidden_layers_sizes'] = [100, 100]
settings['corruption_levels'] = [0,0]


filename = settings['filename']
file_obj = FileOperator(filename)
ddis = file_obj.readStripLines()
import logging
import time
current_date = time.strftime("%m_%d_%Y")

logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)

logname = 'log_DL_contact_matrix_load' + current_date + '.log'
handler = logging.FileHandler(logname)
handler.setLevel(logging.DEBUG)

# create a logging format

formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
settings['SAE_SVM_RBF'] = 1
settings['SAE_SVM_RBF_COMBO'] = 1
settings['SVM_POLY'] = 0
settings['DL_S'] = 1
settings['DL_U'] = 0

settings['finetune_lr'] = 1
settings['batch_size'] = 100
settings['pretraining_interations'] = 5002
settings['pretrain_lr'] = 0.001
settings['training_epochs'] = 20000  # change epochs for split net
settings['hidden_layers_sizes'] = [100, 100]
settings['corruption_levels'] = [0, 0]

filename = settings['filename']
file_obj = FileOperator(filename)
ddis = file_obj.readStripLines()
import logging
import time
current_date = time.strftime("%m_%d_%Y")

logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)

logname = 'log_DL_contact_matrix_load' + current_date + '.log'
handler = logging.FileHandler(logname)
handler.setLevel(logging.DEBUG)

# create a logging format

formatter = logging.Formatter(
import sys,os
from IO_class import FileOperator
import numpy as np
#get input file name
reportFile=sys.argv[1]
reportFileObj=FileOperator(reportFile)
lines=reportFileObj.readStripLines()

#initiate variables
listOfddi=[]
listOfAUC=[]
listOfsvmRecall=[]
listOfsvmPrecision=[]
listOfbaselineAUC=[]
listOfbaselineRecall=[]
listOfbaselinePrecision=[]

for line in lines:
    [ddi, seqNumber, AUC, svmRecall, svmPrecision,
    baselineAUC, baselineRecall, baselinePrecision]= line.split()
    listOfddi.append(ddi)
    listOfAUC.append(float(AUC))
    listOfsvmRecall.append(float(svmRecall))
    listOfsvmPrecision.append(float(svmPrecision))
    listOfbaselineAUC.append(float(baselineAUC))
    listOfbaselineRecall.append(float(baselineRecall))
    listOfbaselinePrecision.append(float(baselinePrecision))
    
print 'The total number of DDIs is  %d ' % len(set(listOfddi))
print 'The number of training sequence pairs LOO is  %d ' % len(lines)
print 'The number of average SVM AUC is  %f ' % np.mean(listOfAUC)