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
- Supply rows, conditionColumns, targetRows in the field shapes below.
- Run the calculation. Correct format, shape, range, or undefined-statistic errors before interpreting a result.
- 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 field | Meaning and units | Accepted input |
|---|---|---|
| rows | Rows | Required. Array of Array of Text; maximum UTF-16 length 128.; maximum items 32.; minimum items 1; maximum items 512. |
| conditionColumns | Distinct zero-based columns defining exact equality. | Required. Array of Safe integer; minimum 0; maximum 31.; maximum items 32. |
| targetRows | Distinct zero-based rows in the target set. | Required. Array of Safe integer; minimum 0; maximum 511.; maximum items 512. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| equivalenceClasses | Equivalence Classes | Required. Array of Array of Safe integer; minimum 0; maximum 511.; minimum items 1; maximum items 512.; minimum items 1; maximum items 512. |
| classByRow | First-encounter equivalence-class index for every input row. | Required. Array of Safe integer; minimum 0; maximum 511.; minimum items 1; maximum items 512. |
| lower | Sorted row indexes in classes entirely included in targetRows. | Required. Array of Safe integer; minimum 0; maximum 511.; maximum items 512. |
| upper | Sorted row indexes in classes intersecting targetRows. | Required. Array of Safe integer; minimum 0; maximum 511.; maximum items 512. |
| boundary | Sorted upper-minus-lower row indexes. | Required. Array of Safe integer; minimum 0; maximum 511.; maximum items 512. |
| negative | Sorted row indexes outside the upper region. | Required. Array of Safe integer; minimum 0; maximum 511.; maximum items 512. |
{
"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
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.