Description
Describe breaks on Number
columns. This happens because the Iterable<Number>.std()
function accepts Number
but doesn't convert them to Double
(like mean()
does).
There are a couple more missing actually:
-
cumSum
- Misses
Byte
,Short
HasDataColumn
overloads but notIterable
/Sequence
- Misses
-
mean
HasSequence<Double | Float>
but not for otherNumber
types
-
median
- Misses
Float
,Byte
,Short
,Number
(it only works onComparable
) - Needs to handle other types consistently
NoSequence
overloads- Cannot
skipNA
(if applicable)
- Misses
-
min
andmax
- internal
Iterable<T>.min
andmax
are not used and can be removed. Stdlib functions for Comparable sequences and iterables are used instead. - Misses
Number
(it only works onComparable
) Short
andByte
are converted toInt
for some reason
- internal
-
std
- Breaks if type is
Number
Short
andByte
are cast toInt
which works but is a bit iffyIterable overloads missing forNumber
,Short
,Byte
Sequence overloads missingNullable overloads missing for Iterable (and sequence)
- Breaks if type is
-
varianceAndMean
- also provides
std(ddof: Int)
function without docs of what ddof even means, as well ascount
. Could have a better name. Also can produce nulls?? this screams for documentation. - variance functions are missing on DataColumns entirely (had to be added separately for Kandy)
- Misses
Short
,Byte
,Number
, and nullable overloads Misses Sequence overloads
- also provides
-
sum
- Has
TODO
s where types are amiss - Misses
Float
(!),Short
,Byte
,Number
in variousIterable
overloads.
- Has
-
All are also missing
BigInteger
as we're supportingBigDecimal
too. -
There are plenty of public overloads on
Iterable
andSequence
. It's fine to have them internally, but I feel like we're clogging the public scope here.mean
, for instance, is already covered in the stdlib. -
We need to honor some conversion table (see below)
-
Describe now only shows min, median, and max for
<T : Comparable<T>>
columns, so notNumber
. This makes sense, but not from a user-perspective. We can just convert to Double first, then calculate it.