Esempio n. 1
0
 
 '''
 4) run_learnFeatureExistence.py
 '''
 numberFE = learnFE(path, 10000000000)
 
 exit()
 '''
 5) run_learnSentimentMF.py
 '''
 learnSentimentMF(path,2000000000)
 
 '''
 6) run_learnAggregationModel.py
 '''
 numberAM = learnAggreationModel(path,2000000000)
 
 '''
 7) run_applyFeatureExistance.py
 '''
 modelfile = path + '/models/modelDict_%d.model'%numberFE
 trainAveragesFile = path+'/models/trainAverages_%d.model'%numberFE
 
 applyFE(path, modelfile, trainAveragesFile, 20000000000)
 
 '''
 8) run_applySentimentMF.py
 '''
 applySMF(path, 50000)
 
 '''
import sys
sys.path.append('../')
import logging
import time


from sentimentAggregation.learnAggregationModel import learnAggreationModel

if __name__ == '__main__':
    logger = logging.getLogger('signature')

    logfile = '../../data/log/%d_learnAggreationModel.log'%int(time.time())
    logging.basicConfig(filename = logfile, format='%(asctime)s : %(name)-12s: %(levelname)s : %(message)s')
    logging.root.setLevel(level=logging.DEBUG)
    logger.info("running %s" % ' '.join(sys.argv))
    
    console = logging.StreamHandler()
    console.setLevel(logging.DEBUG)
    # set a format which is simpler for console use
    formatter = logging.Formatter('%(asctime)s : %(name)-12s: %(levelname)-8s %(message)s')
    # tell the handler to use this format
    console.setFormatter(formatter)
    logger.addHandler(console)
    

    #path = '../../data/restaurants/'
    path = '../../data/beautyspa/'
    learnAggreationModel(path,20000)