Skip to content

Main content

Rough Set Lower and Upper Approximation Calculator

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.

Loading tool…

Description

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.

An exact categorical description can make several rows indistinguishable. Rough-set lower and upper regions distinguish rows certainly inside a supplied target from rows possibly inside it under those equivalence classes; this is set approximation rather than probabilistic classification.

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.

When to use this tool

Use this tool when you need the stated calculation or classification with explicit inputs, intermediate evidence, and boundary conventions.

How to use the tool and how it works

  1. Supply rows, conditionColumns, targetRows in the field shapes below.
  2. Run the calculation. Correct format, shape, range, or undefined-statistic errors before interpreting a result.
  3. Read equivalenceClasses, classByRow, lower, upper, boundary, negative. Use the conventions below.

Group rows by exact selected categorical-column tuples in first-encounter order. Lower contains classes wholly within targetRows, upper classes intersecting it, boundary their difference, and negative classes disjoint from it. Return sorted regions and per-row class IDs.1

Input fieldMeaning and unitsAccepted input
rowsRowsRequired. Array of Array of Text; maximum UTF-16 length 128.; maximum items 32.; minimum items 1; maximum items 512.
conditionColumnsDistinct zero-based columns defining exact equality.Required. Array of Safe integer; minimum 0; maximum 31.; maximum items 32.
targetRowsDistinct zero-based rows in the target set.Required. Array of Safe integer; minimum 0; maximum 511.; maximum items 512.
Output fieldInterpretationReturned shape
equivalenceClassesEquivalence ClassesRequired. Array of Array of Safe integer; minimum 0; maximum 511.; minimum items 1; maximum items 512.; minimum items 1; maximum items 512.
classByRowFirst-encounter equivalence-class index for every input row.Required. Array of Safe integer; minimum 0; maximum 511.; minimum items 1; maximum items 512.
lowerSorted row indexes in classes entirely included in targetRows.Required. Array of Safe integer; minimum 0; maximum 511.; maximum items 512.
upperSorted row indexes in classes intersecting targetRows.Required. Array of Safe integer; minimum 0; maximum 511.; maximum items 512.
boundarySorted upper-minus-lower row indexes.Required. Array of Safe integer; minimum 0; maximum 511.; maximum items 512.
negativeSorted row indexes outside the upper region.Required. Array of Safe integer; minimum 0; maximum 511.; maximum items 512.
json
{
  "input": {
    "rows": [
      [
        "red",
        "S"
      ],
      [
        "red",
        "M"
      ],
      [
        "blue",
        "S"
      ],
      [
        "blue",
        "S"
      ]
    ],
    "conditionColumns": [
      0
    ],
    "targetRows": [
      0,
      2,
      3
    ]
  },
  "output": {
    "equivalenceClasses": [
      [
        0,
        1
      ],
      [
        2,
        3
      ]
    ],
    "classByRow": [
      0,
      0,
      1,
      1
    ],
    "lower": [
      2,
      3
    ],
    "upper": [
      0,
      1,
      2,
      3
    ],
    "boundary": [
      0,
      1
    ],
    "negative": []
  }
}

Limitations and assumptions

  • Row and column indexes are zero-based and must be unique and in range. Empty conditionColumns produces one class for all rows. Exact literal equality is not fuzzy similarity, missing-value inference, or a learned classifier.
  • 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

Choose the statistic according to the question and data conventions. Inspect the supplied series or matrix and the stated assumptions before comparing outputs from implementations with different defaults.

References

  1. Tool behavior and example: Rough Set Lower and Upper Approximation Tool — tool.io

Similar or alternative tools

  • Intersection

    Return unique strings shared by two lists.

  • Difference

    Return unique values from the first string list that are absent from the second.