-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revert Cardinality Requirement for Histograms #301
Changes from 16 commits
2cef000
cad3e84
f197884
1ed9655
c56f79d
c0388df
cf045de
6ae9767
0db6376
1e6f572
7836abf
9c17abb
b3509f6
d428289
3e6389f
f6d344c
e32f50c
33b0ad3
cf947e0
fce74a3
f9d6b59
d9d39c2
853844a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,7 +53,7 @@ def initialize_chart(self): | |
|
||
# Default when bin too small | ||
if markbar < (x_range / 24): | ||
markbar = (x_max - x_min) / 12 | ||
markbar = abs(x_max - x_min) / 12 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would there ever be a case such that calling There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree, I added this as a final check for integer overflow so that at least our code doesn't error and it just means the user inputs are too extreme (positive or negative) to handle. @dorisjlee should we even worry about this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think xmax will always be larger than xmin. |
||
|
||
self.data = AltairChart.sanitize_dataframe(self.data) | ||
end_attr_abv = str(msr_attr.attribute) + "_end" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to clarify, does
ldf.cardinality[c]
return the number of rows for a given column? In this case, I wonder if removing this check would lead to some irregular behavior when there are very few rows. Is there some other part in the code that checks for this?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no. it returns the unique number of values -- we only compute histograms for dataframes > 5 rows.