Ejemplo n.º 1
0
def SLCT(para,dataPath,data,curData):
	util.config(para)
	startTime = time.time() # start timing
	# load the dataset
	loglines = dataloader.load(para)
	# log template extraction
	slct.extract(loglines, para)
	timeInterval=time.time() - startTime
	print('execution time is: %f (precision calculation,data preprocessing and templates splitting not counted)'%(timeInterval))
	tempParameter=tempPara(dataname=data[curData]+'/',savePath=dataPath)
	tempProcess(tempParameter)
	return timeInterval
# parameter config area
para = {'dataPath': '../data/', # data path
        'dataName': 'Orangelab_sense_temperature', # set the dataset name     
        'outPath': 'result/', # output path for results
        'metrics': ['MAE', 'NMAE', 'RMSE', 'MRE', 'NNPRE', 'SNR'], # evaluation metrics  
        'samplingRate': np.arange(0.05, 0.96, 0.05), # sampling rate
        'rounds': 1, # how many runs to perform at each sampling rate
        'lmbda': 1e-5, # sparisty regularization parameter
        'trainingPeriod': 33, # training time periods
        'saveTimeInfo': False, # whether to keep track of the running time
        'saveLog': False, # whether to save log into file
        'debugMode': False, #whether to record the debug info
        'parallelMode': False # whether to leverage multiprocessing for speedup
        }

startTime = time.time() # start timing
utils.setConfig(para) # set configuration
logger.info('==============================================')
logger.info('CS-PCA: [Quer et al., TWC\'2012]')

# load the dataset
dataMatrix = dataloader.load(para)

# evaluate compressive monitoring algorithm
evaluator.execute(dataMatrix, para)

logger.info('All done. Elaspsed time: ' + utils.formatElapsedTime(time.time() - startTime)) # end timing
logger.info('==============================================')

Ejemplo n.º 3
0
		'outPath': 'result/',
		'metrics': ['MAE', 'NMAE', 'RMSE', 'MRE', 'NPRE'], # delete where appropriate		
		'density': np.arange(0.05, 0.31, 0.05), # matrix density
		'rounds': 20, # how many runs are performed at each matrix density
		'dimension': 10, # dimenisionality of the latent factors
		'etaInit': 0.001, # inital learning rate. We use line search
						 # to find the best eta at each iteration
		'lambda': 200, # regularization parameter
		'maxIter': 300, # the max iterations
		'saveTimeInfo': False, # whether to keep track of the running time
		'saveLog': True, # whether to save log into file
		'debugMode': False, # whether to record the debug info
        'parallelMode': True # whether to leverage multiprocessing for speedup
		}


startTime = time.time() # start timing
utils.setConfig(para) # set configuration
logger.info('==============================================')
logger.info('PMF: Probabilistic Matrix Factorization')

# load the dataset
dataTensor = dataloader.load(para)

# evaluate QoS prediction algorithm
evaluator.execute(dataTensor, para)

logger.info('All done. Elaspsed time: ' + utils.formatElapsedTime(time.time() - startTime)) # end timing
logger.info('==============================================')
 
Ejemplo n.º 4
0
    'dataPath': '../../../data/',
    'dataName': 'dataset#2',
    'dataType': 'rt',  # set the dataType as 'rt' or 'tp'
    'outPath': 'result/',
    'metrics': ['MAE', 'NMAE', 'RMSE', 'MRE',
                'NPRE'],  # delete where appropriate		
    'density': np.arange(0.05, 0.31, 0.05),  # matrix density
    'rounds': 20,  # how many runs are performed at each matrix density
    'topK': 10,  # the parameter of TopK similar users or services
    'lambda': 0.8,  # the combination coefficient of UPCC and IPCC
    'saveTimeInfo': False,  # whether to keep track of the running time
    'saveLog': True,  # whether to save log into file
    'debugMode': False,  # whether to record the debug info
    'parallelMode': True  # whether to leverage multiprocessing for speedup
}

startTime = time.time()  # start timing
utils.setConfig(para)  # set configuration
logger.info('==============================================')
logger.info('Approach: [UPCC, IPCC, UIPCC][TSC 2011]')

# load the dataset
dataTensor = dataloader.load(para)

# evaluate QoS prediction algorithm
evaluator.execute(dataTensor, para)

logger.info('All done. Elaspsed time: ' +
            utils.formatElapsedTime(time.time() - startTime))  # end timing
logger.info('==============================================')
Ejemplo n.º 5
0
    'outPath': 'result/',
    'metrics': ['NDCG', 'Precision'],  # delete where appropriate
    'metric_parameter': [1, 5, 10, 50, 100],
    'density': [0.01, 0.1, 0.3],  # matrix density
    'rounds': 10,  # how many runs are performed at each matrix density
    'dimension': 10,  # dimenisionality of the latent factors
    'etaInit': 0.01,  # inital learning rate. We use line search
    # to find the best eta at each iteration
    'lambda': 0.1,  # regularization parameter
    'maxIter': 300,  # the max iterations
    'saveTimeInfo': False,  # whether to keep track of the running time
    'saveLog': True,  # whether to save log into file
    'debugMode': False,  # whether to record the debug info
    'parallelMode': True  # whether to leverage multiprocessing for speedup
}

startTime = time.time()  # start timing
utils.setConfig(para)  # set configuration
logger.info('==============================================')
logger.info('PMF: Probabilistic Matrix Factorization')

# load the dataset
dataMatrix = dataloader.load(para)

# evaluate QoS prediction algorithm
evaluator.execute(dataMatrix, para)

logger.info('All done. Elaspsed time: ' +
            utils.formatElapsedTime(time.time() - startTime))  # end timing
logger.info('==============================================')
Ejemplo n.º 6
0
import os, sys, time
sys.path.append('../../')
sys.path.append('../')
from logparser import slct
from commons.util import logger
from commons import util
from commons import dataloader


#########################################################
# config area
#
para = {'dataPath': '../data/', # data path
        'dataName': 'redlug.com', # set the dataset name
        'outPath': 'result/', # output path for results
        'supportThreshold': 1, # set support threshold
        'saveLog': True, # whether to save log into file
        }
util.config(para)
#########################################################

startTime = time.time() # start timing

# load the dataset
loglines = dataloader.load(para)

# log template extraction
slct.extract(loglines, para)

logger.info('All done. Elaspsed time: ' + util.formatElapsedTime(time.time() - startTime)) # end timing
logger.info('==============================================')