Example #1
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('==============================================')
# 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('==============================================')

        'topK': 10, # the parameter of TopK similar users or services, the default 
					# value is topK = 10 as in the reference paper
		'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': 30, # L2 regularization parameter
		'alpha': 0.4,  # the parameter of combination, 0.4 as in the reference paper
		'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('NIMF: Neighbourhood Integrated 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('==============================================')