If-Then Rule Builder

Build categorical IF–THEN rules from a small table, with observed confidence and coverage.

About this tool

Group a small categorical table by the selected IF columns and predict the most frequent value in the THEN column. The demo uses outlook alone so three understandable rules appear. Check more columns for a conjunction; uncheck them for broader rules. Click Build rules explicitly. Changing data, columns or filters clears the old results and export.

Paste CSV or load CSV, TSV or semicolon/pipe-separated text with a header, then Apply data. Under Edit cells, change individual values in the bounded table; the CSV text updates too. Limits: 200 rows, 2–8 unique headers up to 80 UTF-16 units, cells up to 128 units, text up to 262,144 units and files up to 256 KiB. Unequal rows, duplicate/empty names and invalid quoting are rejected; nothing is silently truncated. Whitespace is trimmed, strings NFC-normalized and case-sensitive. All values, including numbers, are categories.

Each exact tuple of selected condition values is a separate group, even if a value contains =, & or quotes. All conditions are joined by AND. The target column cannot be an IF column. Rows missing a selected condition or target are omitted from grouping and reported, but still belong to the original total used for coverage. Empty unselected cells do not disqualify a row.

Matches are the complete rows in a group; expand the number to see their original data-row indices (excluding the header). Confidence = rows with the chosen target / group matches. Coverage = group matches / all data rows. CSV also gives joint rule support = rows with chosen target / all rows, vote counts and full precision. Equal target counts choose the first label in Unicode order and show the tie. Rules are ordered by matches, then confidence, then condition tuple.

These are observed frequencies on the same input data, not validated predictive accuracy or causal/logical guarantees. A one-row group can have 100% confidence with almost no evidence; use minimum matches and confidence filters. No search over every column subset, Apriori, numeric thresholds, missing-value inference or automatic decision tree. For formal rules use Horn Clause Rule Engine; for geometric classification use Nearest Neighbor.