PAMI is a Python library containing 100+ algorithms to discover useful patterns in various databases across multiple computing platforms. (Active)
Previous | 🏠 Home | Next |
This page describes the process to create synthetic transactional databases of varying sizes. Please note that this code is different from the widely used synthetic IBM data generator. <– Return to home page
This page describes the process to create synthetic temporal databases of varying sizes. The users can create different types of temporal databases.
Please note that all of the above forms of temporal databases can be created by varying the input parameters.
A synthetic transactional database can be created by calling generateTransactionalDatabase
class in PAMI.extras.generateDatabase.
import PAMI.extras.generateDatabase.generateTemporalDatabase as dbGenerator
totalNumberOfTransactions_D=1000 #Number of transactions that must exist in a database. Symbol used for this term is D
totalNumberOfItems_I=500 #total number of items that must exist in a database. Symbol used for this term is I
maximumLengthOfTransaction_T=20 #Maximum number of items that must exist in a database
probabilityOfRecurrenceOfTimeStamp_P=0 #Set the above value to 0 to create an irregular temporal database of Type-II.
sep = '\t' "Specify the seperator. \t is the default seperator"
outputFile='D1000I500T20P0.tsv' #Specify the file name.
# 'D' represents the database size,
# 'I' represents the total number of items and
# 'P' represents the probability of occurrence of an item in a database
temporalDB = generateTemporalDatabase(totalNumberOfTransactions, totalNumberOfItems,temporalDB = generateTemporalDatabase(numOfTransactions, maxNumOfItems, maxNumOfItemsPerTransaction, outFileName, percent, sep)
temporalDB.createTemporalFile()