#import the algorithm
from PAMI.extras.syntheticDataGenerator import georeferencedTransactionalDatabase as gtdb
#specify the parameters
databaseSize = 100000
numberOfItems = 2000
averageLengthOfTransaction = 10
#bounding box
minimumXvalue = 0
minimumYvalue = 0
maximumXvalue = 100
maximumYvalue = 100
#The above four lines ensure that the spatial information of every item in the database lie within (0, 0) and (100, 100).
#initialize the algorithm
alg = gtdb.georeferencedTransactionalDatabase(databaseSize, numberOfItems, averageLengthOfTransaction)
#execute the algorithm
alg.generate()
#save the generated data in a file
alg.save(fileName)
alg.saveLocationData(fileName2)
#Get the generated data as a dataframe (Optional feature)
dataFrame = alg.getData()
locationDataFrame = alg.getLocationData()
#import the algorithm
from PAMI.extras.syntheticDataGenerator import georeferencedTemporalDatabase as gtempdb
#specify the parameters
databaseSize = 100000
numberOfItems = 2000
averageLengthOfTransaction = 10
probabilityToMissNextTimestamp = 0
# 0 (or 0%) - regular temporal database with uniform time gap between the transactions
# <1 (or <100%) - irregular temporal database with non-uniform time gaps between the transactions
probabilityOfRecurrenceOfTimestampInNextTransaction = 20
# 0 (or 0%) - every transaction will have a different timestamp
# 1 (or 100%) - every transaction will have the same timestamp
#bounding box
minimumXvalue = 0
minimumYvalue = 0
maximumXvalue = 100
maximumYvalue = 100
#The above four lines ensure that the spatial information of every item in the database lie within (0, 0) and (100, 100).
#initialize the algorithm
alg = gtempdb.georeferencedTemporalDatabase(databaseSize, numberOfItems, \
averageLengthOfTransaction, \
probabilityToMissNextTimestamp,\
probabilityToMissNextTimestamp, \
minimumXvalue, minimumYvalue,\
maximumXvalue,maximumYvalue)
#execute the algorithm
alg.generate()
#save the generated data in a file
alg.save(fileName)
alg.saveLocationData(fileName2) #optional
#Get the generated data as a dataframe (Optional features)
dataFrame = alg.getData()
locationDataFrame = alg.getLocationData()
#import the algorithm
from PAMI.extras.syntheticDataGenerator import georeferencedUtilityDatabase as gudb
#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()