Loading...
The University of Aizu, Aizu-Wakamatsu, Japan
+81-8048340999










                         

Synthetic utility database generator

This page describes the process to generate a synthetic utility database.

Example

#import the algorithm
from PAMI.extras.syntheticDataGenerator import utilityDatabase as udb #specify the parameters databaseSize = 100000 numberOfItems = 2000 averageLengthOfTransaction = 10 minimumInternalUtilityValue = 1 maximumInternalUtilityValue = 100 minimumExternalUtilityValue = 1 maximumExternalUtilityValue = 10 #initialize the algorithm alg = udb.utilityDatabase(databaseSize, numberOfItems, \ averageLengthOfTransaction,\ minimumInternalUtilityValue,\ maximumInternalUtilityValue,\ minimumExternalUtilityValue,\ maximumExternalUtilityValue) #execute the algorithm alg.generate() #save the generated data in a file alg.save(fileName1) alg.saveItemsInternalUtilityValues(fileName2) alg.saveItemsExternalUtilityValues(fileName3) #Get the generated data as a dataframe (Optional feature) utilityDF = alg.getUtilityData() internalUDF = alg.getInternalUtilityData() externalUDF = alg.getExternalUtilityData()