Description
Construct and shuffle synthetic baskets from feasible count-controlled pair designs, returning contingency cells and delegated rule metrics without a causal interpretation.
Synthetic statistical data separates a specified generating model from the values observed in a finite draw. A model parameter, a sample summary, and the result of a fitted analysis answer different questions; retaining them separately makes numerical and statistical checks easier to interpret.
Construct and shuffle synthetic baskets from feasible count-controlled pair designs, returning contingency cells and delegated rule metrics without a causal interpretation.
When to use this tool
Use this generator to create reproducible cooccurrence lift contrast corpus cases from the supplied model or bank. Inspect the returned evidence before using cases in a test or exercise.
How to use the tool and how it works
- Supply itemA, itemB, neitherItem, designs in the field shapes below. Set seed when you need an explicit replay.
- Run the tool and correct any input error. For generated controls, distinguish a successful fixture containing an invalid case from failure to generate the fixture.
- Read cases. Use the conventions below. Keep answer-bearing fields separate when presenting an exercise.
Construct exact both, only-A, only-B, and neither transaction counts from each supplied design, using a separate neither-item label. Shuffle baskets and return pair metrics and mined itemset/rule evidence for comparison.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| itemA | Item A | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 64. |
| itemB | Item B | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 64. |
| neitherItem | Neither Item | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 64. |
| designs | Designs | Required. Array of Object; no unknown keys.; minimum items 2; maximum items 8. |
| designs[].label | Supplied display label. | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 64. |
| designs[].transactionCount | Transaction Count | Required. Safe integer; minimum 2; maximum 128. |
| designs[].countA | Count A | Required. Safe integer; minimum 1; maximum 128. |
| designs[].countB | Count B | Required. Safe integer; minimum 1; maximum 128. |
| designs[].jointCount | Joint Count | Required. Safe integer; minimum 0; maximum 128. |
| seed | Optional numeric seed; takes precedence over context randomness. Without either, use the fixed tool.io default seed. | Optional. Safe integer. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| cases | Cases | Required. Array of Object; no unknown keys.; minimum items 2; maximum items 8. |
| cases[].label | Supplied display label. | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 64. |
| cases[].cells | Cells | Required. Object; no unknown keys. |
| cases[].cells.both | Both | Required. Safe integer; minimum 0; maximum 128. |
| cases[].cells.onlyA | Only A | Required. Safe integer; minimum 0; maximum 128. |
| cases[].cells.onlyB | Only B | Required. Safe integer; minimum 0; maximum 128. |
| cases[].cells.neither | Neither | Required. Safe integer; minimum 0; maximum 128. |
| cases[].transactions | Transactions | Required. Array of Array of Text; minimum UTF-16 length 1; maximum UTF-16 length 64.; minimum items 1; maximum items 2.; minimum items 2; maximum items 128. |
| cases[].metrics | Metrics | Required. Object; no unknown keys. |
| cases[].metrics.countA | Count A | Required. Safe integer; minimum 1; maximum 128. |
| cases[].metrics.countB | Count B | Required. Safe integer; minimum 1; maximum 128. |
| cases[].metrics.jointCount | Joint Count | Required. Safe integer; minimum 0; maximum 128. |
| cases[].metrics.support | Support | Required. Finite number. |
| cases[].metrics.confidence | Confidence | Required. Finite number. |
| cases[].metrics.lift | Lift | Required. Finite number. |
| cases[].mining | Mining | Required. Object; no unknown keys. |
| cases[].mining.itemsets | Itemsets | Required. Array of Object; no unknown keys.; minimum items 0; maximum items 41. |
| cases[].mining.itemsets[].items | Items | Required. Array of Text; minimum UTF-16 length 1; maximum UTF-16 length 64.; minimum items 1; maximum items 3. |
| cases[].mining.itemsets[].count | Count | Required. Safe integer; minimum 0; maximum 128. |
| cases[].mining.itemsets[].support | Support | Required. Finite number. |
| cases[].mining.itemsets[].coreSupport | Core Support | Required. Finite number. |
| cases[].mining.rules | Rules | Required. Array of Object; no unknown keys.; minimum items 0; maximum items 150. |
| cases[].mining.rules[].antecedent | Antecedent | Required. Array of Text; minimum UTF-16 length 1; maximum UTF-16 length 64.; minimum items 1; maximum items 3. |
| cases[].mining.rules[].consequent | Consequent | Required. Array of Text; minimum UTF-16 length 1; maximum UTF-16 length 64.; minimum items 1; maximum items 3. |
| cases[].mining.rules[].support | Support | Required. Finite number. |
| cases[].mining.rules[].confidence | Confidence | Required. Finite number. |
| cases[].mining.rules[].lift | Lift | Required. Finite number. |
| cases[].mining.rules[].coreSupport | Core Support | Required. Finite number. |
| cases[].mining.rules[].coreConfidence | Core Confidence | Required. Finite number. |
| cases[].mining.rules[].coreLift | Core Lift | Required. Finite number. |
| randomness | Replay source and normalized 32-bit seed, or null seed for an advancing context source. | Required. Object; no unknown keys. |
| randomness.seed | Optional safe-integer replay seed; normalization and precedence are explained below. | Required. Safe integer. or Null. |
| randomness.source | Source | Required. Text; one of "context", "seed". |
An explicit safe-integer seed takes precedence over injected context randomness and is normalized to an unsigned 32-bit integer. With no seed and no context source, replay uses the fixed tool.io default seed. A context source must return finite values from zero inclusive to one exclusive; its advancing state must be retained separately. randomness records the source and normalized seed, or null for context. These generators are not cryptographic random sources.
{
"input": {
"itemA": "A",
"itemB": "B",
"neitherItem": "other",
"designs": [
{
"label": "rare-pair",
"transactionCount": 4,
"countA": 2,
"countB": 2,
"jointCount": 2
},
{
"label": "common-pair",
"transactionCount": 4,
"countA": 2,
"countB": 4,
"jointCount": 2
}
],
"seed": 42
},
"output": {
"cases": [
{
"label": "rare-pair",
"cells": {
"both": 2,
"onlyA": 0,
"onlyB": 0,
"neither": 2
},
"transactions": [
[
"A",
"B"
],
[
"other"
],
[
"A",
"B"
],
[
"other"
]
],
"metrics": {
"countA": 2,
"countB": 2,
"jointCount": 2,
"support": 0.5,
"confidence": 1,
"lift": 2
},
"mining": {
"itemsets": [
{
"items": [
"A"
],
"count": 2,
"support": 0.5,
"coreSupport": 0.5
},
{
"items": [
"B"
],
"count": 2,
"support": 0.5,
"coreSupport": 0.5
},
{
"items": [
"other"
],
"count": 2,
"support": 0.5,
"coreSupport": 0.5
},
{
"items": [
"A",
"B"
],
"count": 2,
"support": 0.5,
"coreSupport": 0.5
}
],
"rules": [
{
"antecedent": [
"A"
],
"consequent": [
"B"
],
"support": 0.5,
"confidence": 1,
"lift": 2,
"coreSupport": 0.5,
"coreConfidence": 1,
"coreLift": 2
},
{
"antecedent": [
"B"
],
"consequent": [
"A"
],
"support": 0.5,
"confidence": 1,
"lift": 2,
"coreSupport": 0.5,
"coreConfidence": 1,
"coreLift": 2
}
]
}
},
{
"label": "common-pair",
"cells": {
"both": 2,
"onlyA": 0,
"onlyB": 2,
"neither": 0
},
"transactions": [
[
"B"
],
[
"A",
"B"
],
[
"A",
"B"
],
[
"B"
]
],
"metrics": {
"countA": 2,
"countB": 4,
"jointCount": 2,
"support": 0.5,
"confidence": 1,
"lift": 1
},
"mining": {
"itemsets": [
{
"items": [
"A"
],
"count": 2,
"support": 0.5,
"coreSupport": 0.5
},
{
"items": [
"B"
],
"count": 4,
"support": 1,
"coreSupport": 1
},
{
"items": [
"A",
"B"
],
"count": 2,
"support": 0.5,
"coreSupport": 0.5
}
],
"rules": [
{
"antecedent": [
"A"
],
"consequent": [
"B"
],
"support": 0.5,
"confidence": 1,
"lift": 1,
"coreSupport": 0.5,
"coreConfidence": 1,
"coreLift": 1
},
{
"antecedent": [
"B"
],
"consequent": [
"A"
],
"support": 0.5,
"confidence": 0.5,
"lift": 1,
"coreSupport": 0.5,
"coreConfidence": 0.5,
"coreLift": 1
}
]
}
}
],
"randomness": {
"seed": 42,
"source": "seed"
}
}
} Limitations and assumptions
- Marginal and joint counts must be combinatorially feasible. Lift and confidence describe the planted finite distribution rather than causation or an observed market; the neither label is a real item in the generated baskets.
- A replay requires the same complete input and implementation. The stated sampling convention applies within its eligible space. A finite draw does not exhaust all possible outputs; repeats remain possible unless a distinct-selection rule is explicit.
- The field tables state structural bounds; cross-field constraints and bounded search or output budgets also apply. Unknown keys are rejected where the object contract disallows them. Input errors are distinct from null fields and deliberate invalid controls in a successful output.
Alternative or Complementary methods
For a supplied example, inspect the returned construction or delegated check directly. To evaluate a consumer, also test cases chosen for its own boundaries; a generated finite corpus does not establish exhaustive coverage.
References
Similar or alternative tools
- FP-Growth Frequent Itemset Mining Tool
Mine bounded transaction itemsets with actual FP-trees and weighted conditional pattern bases, counting each item once per transaction and retaining empty transactions in support denominators.
- Rough Set Lower and Upper Approximation Tool
Compute Pawlak lower, upper, boundary and negative regions for a supplied row-index target under exact equality of selected categorical columns; empty column selection creates one indiscernibility class.