Skip to content

Refine “high cardinality” warning - #1668

Merged
Fil merged 1 commit into
mainfrom
fil/refine-cardinality-warning
Jun 2, 2023
Merged

Refine “high cardinality” warning#1668
Fil merged 1 commit into
mainfrom
fil/refine-cardinality-warning

Conversation

@Fil

@Fil Fil commented Jun 2, 2023

Copy link
Copy Markdown
Contributor

The intent of this “high cardinality” warning (as specified here) is the following: when a mark only¹ makes sense with grouping—currently area, line, linearRegression and density—, we want to warn when the number of groups (G.size) is higher than the smallest possible number of meaningful groups, which is I.length >> 1 (obtained when the groups are pairs).

However when there is an odd number of elements, having 1 element that falls out is to be expected and should not invalidate the chart.

Closes #1667

¹ It's not a hard rule: the areaY mark with a stroke, the lineY mark with a marker, and the density mark tolerate single points. But these are not the default usage.

…61 (comment))) is the following: when a mark only¹ makes sense with grouping—currently area, line, linearRegression and density—, we want to warn when the number of groups (G.size) is higher than the smallest possible number of _meaningful_ groups, which is I.length >> 1 (obtained when the groups are pairs).

However when there is an odd number of elements, having 1 element that falls out is to be expected and should not invalidate the chart.

Closes #1667

¹ It's not a hard rule: the areaY mark with a stroke, the lineY mark with a marker, and the density mark tolerate single points. But these are not the default usage.
@Fil
Fil requested a review from mbostock June 2, 2023 05:44
@Fil
Fil enabled auto-merge (squash) June 2, 2023 05:46

@mbostock mbostock left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@Fil
Fil merged commit de76f93 into main Jun 2, 2023
@Fil
Fil deleted the fil/refine-cardinality-warning branch June 2, 2023 15:36
Fil added a commit that referenced this pull request Aug 21, 2023
chaichontat pushed a commit to chaichontat/plot that referenced this pull request Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

spurious "high cardinality" warning

2 participants