Skip to content

Main content

Random Association Rule Threshold Exercise Generator

Generate anchored synthetic baskets and a directed rule exercise with sampled thresholds, unrounded answers and explicitly rounded core evidence; association implies no causation.

Loading tool…

Description

Generate anchored synthetic baskets and a directed rule exercise with sampled thresholds, unrounded answers and explicitly rounded core evidence; association implies no causation.

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.

Generate anchored synthetic baskets and a directed rule exercise with sampled thresholds, unrounded answers and explicitly rounded core evidence; association implies no causation.

When to use this tool

Use this generator to create reproducible association rule threshold exercise 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

  1. Supply items, transactionCount, backgroundProbability, supportChoices, confidenceChoices, liftChoices in the field shapes below. Set seed when you need an explicit replay.
  2. 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.
  3. Read transactions, rule, thresholds, answer. Use the conventions below. Keep answer-bearing fields separate when presenting an exercise.

Guarantee every item occurs in a singleton transaction, add sampled nonempty background baskets, and choose a directed item pair and thresholds. Calculate pair metrics, look up the mined rule, and test support, confidence, and lift inclusively.1

Delegated operations used for this result: association rules. Their calculation or parsing conventions apply to the corresponding result fields.2

Input fieldMeaning and unitsAccepted input
itemsItemsRequired. Array of Text; minimum UTF-16 length 1; maximum UTF-16 length 64.; minimum items 2; maximum items 6.
transactionCountTransaction CountRequired. Safe integer; minimum 2; maximum 128.
backgroundProbabilityBackground ProbabilityRequired. Finite number; minimum 0; maximum 1.
supportChoicesSupport ChoicesRequired. Array of Finite number; maximum 1; strictly above 0.; minimum items 1; maximum items 8.
confidenceChoicesConfidence ChoicesRequired. Array of Finite number; minimum 0; maximum 1.; minimum items 1; maximum items 8.
liftChoicesLift ChoicesRequired. Array of Finite number; minimum 0.; minimum items 1; maximum items 8.
seedOptional numeric seed; takes precedence over context randomness. Without either, use the fixed tool.io default seed.Optional. Safe integer.
Output fieldInterpretationReturned shape
transactionsTransactionsRequired. Array of Array of Text; minimum UTF-16 length 1; maximum UTF-16 length 64.; minimum items 1; maximum items 6.; minimum items 2; maximum items 128.
ruleRuleRequired. Object; no unknown keys.
rule.antecedentAntecedentRequired. Text; minimum UTF-16 length 1; maximum UTF-16 length 64.
rule.consequentConsequentRequired. Text; minimum UTF-16 length 1; maximum UTF-16 length 64.
thresholdsThresholdsRequired. Object; no unknown keys.
thresholds.supportSupportRequired. Finite number.
thresholds.confidenceConfidenceRequired. Finite number.
thresholds.liftLiftRequired. Finite number.
answerAnswerRequired. Object; no unknown keys.
answer.metricsMetricsRequired. Object; no unknown keys.
answer.metrics.countACount ARequired. Safe integer; minimum 1; maximum 128.
answer.metrics.countBCount BRequired. Safe integer; minimum 1; maximum 128.
answer.metrics.jointCountJoint CountRequired. Safe integer; minimum 0; maximum 128.
answer.metrics.supportSupportRequired. Finite number.
answer.metrics.confidenceConfidenceRequired. Finite number.
answer.metrics.liftLiftRequired. Finite number.
answer.coreRuleCore RuleRequired. Object; no unknown keys. or Null.
answer.meetsSupportMeets SupportRequired. Boolean.
answer.meetsConfidenceMeets ConfidenceRequired. Boolean.
answer.meetsLiftMeets LiftRequired. Boolean.
answer.acceptedAcceptedRequired. Boolean.
randomnessReplay source and normalized 32-bit seed, or null seed for an advancing context source.Required. Object; no unknown keys.
randomness.seedOptional safe-integer replay seed; normalization and precedence are explained below.Required. Safe integer. or Null.
randomness.sourceSourceRequired. 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.

json
{
  "input": {
    "items": [
      "bread",
      "milk"
    ],
    "transactionCount": 4,
    "backgroundProbability": 0.5,
    "supportChoices": [
      0.25,
      0.5
    ],
    "confidenceChoices": [
      0.5,
      0.75
    ],
    "liftChoices": [
      1,
      1.5
    ],
    "seed": 42
  },
  "output": {
    "transactions": [
      [
        "bread"
      ],
      [
        "bread",
        "milk"
      ],
      [
        "bread",
        "milk"
      ],
      [
        "milk"
      ]
    ],
    "rule": {
      "antecedent": "milk",
      "consequent": "bread"
    },
    "thresholds": {
      "support": 0.25,
      "confidence": 0.75,
      "lift": 1.5
    },
    "answer": {
      "metrics": {
        "countA": 3,
        "countB": 3,
        "jointCount": 2,
        "support": 0.5,
        "confidence": 0.6666666666666666,
        "lift": 0.8888888888888888
      },
      "coreRule": {
        "antecedent": [
          "milk"
        ],
        "confidence": 0.666666666667,
        "consequent": [
          "bread"
        ],
        "lift": 0.888888888889,
        "support": 0.5
      },
      "meetsSupport": true,
      "meetsConfidence": false,
      "meetsLift": false,
      "accepted": false
    },
    "randomness": {
      "seed": 42,
      "source": "seed"
    }
  }
}

Limitations and assumptions

  • Support passes when jointCount reaches ceil(threshold times transaction count). A missing mined rule can coexist with explicit zero cooccurrence metrics. Threshold acceptance is synthetic evidence, not causation or business advice.
  • 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

  1. Tool behavior and example: Random Association Rule Threshold Exercise Generator — tool.io

  2. Calculation or validation: data-mining/association-rules — tool.io

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.