-
Notifications
You must be signed in to change notification settings - Fork 74
Mean statistics fixes #1091
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
Mean statistics fixes #1091
Conversation
…gator, such that mixed numbers are unified first. Big number support is dropped. Created generic rowX() function aggregateOfRow(), used by rowMean() and rowMeanOf<T>()
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.
Please add some notes in comments for public mean
about new behavior, so that we don't forget to mention it there when writing KDocs in the future.
core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/DataColumnType.kt
Show resolved
Hide resolved
# Conflicts: # core/api/core.api
…lue. This simplifies logic in a lot of places. It can still be nullable for aggregators that require it (like min/max).
Fixed feedback, but I also found some other important stuff:
|
unifying numbers can now handle null/nothing in the input.
…s of aggregateOf. Fixed nullability in lambda return types. Made sure all lambdas are crossinline. Added test for medianOf to check everything still works as expected.
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.
Great! However, I wonder - are there any aggregators that take null into account?
They all filter nulls out before aggregating. This was always done already for columns and it's now always the case. There doesn't seem to be a statistic function that does something special with nulls, so I think this is the best choice. |
Helps and follows #961
To be merged after #1078mean
. It's now based onTwoStepNumbersAggregator
, such that mixed numbers are unified first.rowX()
functionaggregateOfRow()
, used byrowMean()
androwMeanOf<T>()
describe()