Description Usage Arguments Value Author(s) See Also Examples
A datastream generator that produces semi-random transactions within a specified range. Some items will be more frequent by design. Algorithm originally developed for IBM by Agrawal.
1 2 | DSD_Transactions_Agrawal(type = c("integer"), setSize = 50,
maxTransactionSize = 10, ..., verbose = FALSE)
|
type |
The type of transaction data to produce. Currently integer is the only option |
setSize |
The size of the set to create transactions from |
maxTransactionSize |
The maximum size for any one transaction |
verbose |
How much information the algorithm prints to the console. |
... |
Additional parameters |
Returns a DSD_Transactions_Agrawal
object (subclass of
DSD_Transactions
, DSD
) which is a list of the defined
params. The params are either passed in from the function or
created internally
Derek Phanekham
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
#create agrawal transaction datastream
dsd <- DSD_Transactions_Agrawal()
#create with a set size of 50 and a max transaction size of 10
dsd <- DSD_Transactions_Agrawal(setSize=50, maxTransactionSize=10)
#create with custom size function
dsd <- DSD_Transactions_Agrawal(setSize= 50, maxTransactionSize= 10 , size=function(max) rexp(max))
#get a transaction from the datastream
transaction <- get_points(dsd)
transaction
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.