T
- Column<T>
, Comparator<T>
, FilterSpec<T>
, Iterable<T>
, NumberFilters
, NumberFilterSpec<T>
, NumberMapFunctions
DoubleColumn
, FloatColumn
, IntColumn
, LongColumn
, NumberColumn
, ShortColumn
public interface NumericColumn<T extends Number> extends Column<T>, NumberMapFunctions, NumberFilters
Modifier and Type | Method | Description |
---|---|---|
default boolean |
allMatch(DoublePredicate test) |
Returns true if all rows satisfy the predicate, false otherwise
|
default boolean |
anyMatch(DoublePredicate test) |
Returns true if any row satisfies the predicate, false otherwise
|
default double[] |
asDoubleArray() |
|
default DoubleColumn |
asDoubleColumn() |
Returns a new DoubleColumn containing a value for each value in this column
|
default FloatColumn |
asFloatColumn() |
Returns a new FloatColumn containing a value for each value in this column
|
default IntColumn |
asIntColumn() |
Returns a new IntColumn containing a value for each value in this column
|
default LongColumn |
asLongColumn() |
Returns a new LongColumn containing a value for each value in this column
|
default ShortColumn |
asShortColumn() |
Returns a new ShortColumn containing a value for each value in this column
|
StringColumn |
asStringColumn() |
Returns a StringColumn consisting of the (unformatted) String representation of this column
values
|
default double |
autoCorrelation() |
Returns the auto-correlation (correlation between each element and the next)
|
default double |
autoCorrelation(int lag) |
Returns the auto-correlation between elements separated by
lag . |
NumericColumn<T> |
copy() |
Returns a deep copy of the receiver
|
default int |
count(DoublePredicate test) |
Counts the number of rows satisfying predicate
|
default int |
count(DoublePredicate test,
int max) |
Counts the number of rows satisfying predicate, but only upto the max value
|
default Selection |
eval(BiPredicate<Number,Number> predicate,
Number number) |
|
default Selection |
eval(DoublePredicate predicate) |
|
default double |
geometricMean() |
Returns the geometric mean of the data in this column
|
double |
getDouble(int index) |
Returns a double representation of the number at
index |
default NumberInterpolator<T> |
interpolate() |
Returns a
NumberInterpolator object that can be used to interpolate values for elements
missing in the column |
default boolean |
isEmpty() |
Returns true if the column has no data
|
default Selection |
isIn(Collection<Number> numbers) |
|
default Selection |
isMissing() |
Returns a selection containing an index for every missing value in this column
|
default Selection |
isNotIn(Collection<Number> numbers) |
|
default Selection |
isNotMissing() |
Returns a selection containing an index for every non-missing value in this column
|
default double |
kendalls(NumericColumn<?> otherColumn) |
Returns the Kendall's Tau Rank correlation between the receiver and the otherColumn
|
default double |
kurtosis() |
Returns the kurtosis of the data in this column
|
NumericColumn<T> |
lag(int n) |
Returns a column of the same type and size as the receiver, containing the receivers values
offset by n.
|
default NumericColumn<T> |
lead(int n) |
Returns a column of the same type as the receiver, containing the receivers values offset -n
For example if you lead a column containing 2, 3, 4 by 1, you get a column containing 3, 4, NA.
|
default <R extends Column<RT>,RT> |
mapInto(DoubleFunction<? extends RT> fun,
R into) |
Maps the function across all rows, appending the results to the provided Column
|
default double |
max() |
Returns the largest value in this column
|
default Optional<Double> |
max(it.unimi.dsi.fastutil.doubles.DoubleComparator comp) |
Returns the maximum row according to the provided Comparator
|
default double |
mean() |
Returns the mean of the data in this column
|
default double |
median() |
Returns the median or 50th percentile of the data in this column
|
default double |
min() |
Returns the smallest value in this column
|
default Optional<Double> |
min(it.unimi.dsi.fastutil.doubles.DoubleComparator comp) |
Returns the minimum row according to the provided Comparator
|
default boolean |
noneMatch(DoublePredicate test) |
Returns true if no row satisfies the predicate, false otherwise
|
default DoubleColumn |
pctChange(int periods) |
Returns a column containing the percentage change between values that are
periods apart |
default double |
pearsons(NumericColumn<?> otherColumn) |
Returns the pearson's correlation between the receiver and the otherColumn
|
default double |
percentile(double percentile) |
Returns the given percentile of the data in this column
|
default double |
populationVariance() |
Returns the population variance of the data in this column
|
default double |
product() |
Returns the product of values in this column
|
default double |
quadraticMean() |
Returns the quadraticMean, aka the root-mean-square, for all values in this column
|
default double |
quartile1() |
Returns the 1st quartile of the data in this column
|
default double |
quartile3() |
Returns the 3rd quartile of the data in this column
|
default double |
range() |
Returns the range of the data in this column
|
default double |
reduce(double initial,
DoubleBinaryOperator op) |
Reduction with binary operator and initial value
|
default Optional<Double> |
reduce(DoubleBinaryOperator op) |
Reduction with binary operator
|
default NumberRollingColumn |
rolling(int windowSize) |
Returns a
RollingColumn with the given windowSize, which can be used for performing
calculations on rolling subsets of my data |
void |
setPrintFormatter(NumberFormat format,
String missingValueIndicator) |
Sets the print formatter to a new
ColumnFormatter constructed
from the given number format and missing value indicator TODO: make these return the column? |
void |
setPrintFormatter(NumberColumnFormatter formatter) |
Sets the print formatter to the argument
|
default double |
skewness() |
Returns the skewness of the data in this column
|
default double |
spearmans(NumericColumn<?> otherColumn) |
Returns the Spearman's Rank correlation between the receiver and the otherColumn
|
default double |
standardDeviation() |
Returns the standard deviation of the data in this column
|
default Stats |
stats() |
Returns a
Stats object that collects common statistical measures of the data in this
column |
default double |
sum() |
Returns the sum of the values in this column
|
default Double |
summarize(Selection selection,
NumericAggregateFunction function) |
Summarizes the data in this column for all rows where the current value matches the selection
criteria
|
default Table |
summary() |
Returns a table of common statistical values that together describe the data in this column
|
default double |
sumOfLogs() |
Returns the sum of logs of the data in this column
|
default double |
sumOfSquares() |
Returns the sum of squares of the data in this column
|
default double |
variance() |
Returns the sample variance of the data in this column
|
default NumericColumn<T> |
where(Selection selection) |
Returns the subset of data in this column included in the given
Selection |
allMatch, anyMatch, append, append, append, appendCell, appendCell, appendMissing, appendObj, asBytes, asList, asObjectArray, asSet, byteSize, clear, columnWidth, contains, count, count, countMissing, countUnique, emptyCopy, emptyCopy, equals, filter, first, get, getString, getUnformattedString, indexOf, inRange, isMissing, last, map, map, mapInto, max, max, min, min, name, noneMatch, parser, print, reduce, reduce, removeMissing, rowComparator, sampleN, sampleX, set, set, set, set, set, set, setMissing, setMissingTo, setName, setParser, size, sortAscending, sortDescending, sorted, subset, title, type, unique, valueHash
compare, comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
forEach, iterator, spliterator
isBetweenExclusive, isBetweenInclusive, isCloseTo, isEqualTo, isEqualTo, isGreaterThan, isGreaterThan, isGreaterThanOrEqualTo, isGreaterThanOrEqualTo, isLessThan, isLessThan, isLessThanOrEqualTo, isLessThanOrEqualTo, isNegative, isNonNegative, isNotEqualTo, isNotEqualTo, isPositive, isZero, size
abs, add, add, add, asPercent, asRatio, bin, cube, cubeRoot, cumMax, cumMin, cumProd, cumSum, difference, divide, divide, divide, isMissing, log10, log1p, logN, multiply, multiply, multiply, name, neg, normalize, pctChange, power, power, reciprocal, remainder, remainder, round, roundInt, size, sqrt, square, subtract, subtract, subtract
default boolean isEmpty()
default double[] asDoubleArray()
asDoubleArray
in interface NumberMapFunctions
default Selection eval(DoublePredicate predicate)
eval
in interface NumberFilters
default Selection eval(BiPredicate<Number,Number> predicate, Number number)
eval
in interface NumberFilters
default Selection isIn(Collection<Number> numbers)
isIn
in interface NumberFilters
isIn
in interface NumberFilterSpec<T extends Number>
default Selection isNotIn(Collection<Number> numbers)
isNotIn
in interface NumberFilters
isNotIn
in interface NumberFilterSpec<T extends Number>
default Selection isMissing()
isMissing
in interface Column<T extends Number>
isMissing
in interface FilterSpec<T extends Number>
isMissing
in interface NumberFilters
default Selection isNotMissing()
isNotMissing
in interface Column<T extends Number>
isNotMissing
in interface FilterSpec<T extends Number>
isNotMissing
in interface NumberFilters
default int count(DoublePredicate test)
test
- the predicatedefault int count(DoublePredicate test, int max)
test
- the predicatemax
- the maximum number of rows to countdefault boolean allMatch(DoublePredicate test)
test
- the predicatedefault boolean anyMatch(DoublePredicate test)
test
- the predicatedefault boolean noneMatch(DoublePredicate test)
test
- the predicatedefault Optional<Double> max(it.unimi.dsi.fastutil.doubles.DoubleComparator comp)
default Optional<Double> min(it.unimi.dsi.fastutil.doubles.DoubleComparator comp)
void setPrintFormatter(NumberFormat format, String missingValueIndicator)
ColumnFormatter
constructed
from the given number format and missing value indicator TODO: make these return the column?void setPrintFormatter(NumberColumnFormatter formatter)
default double reduce(double initial, DoubleBinaryOperator op)
initial
- initial valueop
- the operatordefault Optional<Double> reduce(DoubleBinaryOperator op)
op
- the operatordefault <R extends Column<RT>,RT> R mapInto(DoubleFunction<? extends RT> fun, R into)
fun
- function to mapinto
- Column to which results are appendeddefault NumericColumn<T> where(Selection selection)
Selection
default NumberInterpolator<T> interpolate()
NumberInterpolator
object that can be used to interpolate values for elements
missing in the columninterpolate
in interface Column<T extends Number>
default Double summarize(Selection selection, NumericAggregateFunction function)
Example: myColumn.summarize(myColumn.isLessThan(100), AggregateFunctions.count);
default double sum()
sum
in interface NumberMapFunctions
default double product()
default double mean()
default double median()
default double quartile1()
default double quartile3()
default double percentile(double percentile)
default double range()
default double max()
default double min()
default double variance()
default double populationVariance()
default double standardDeviation()
default double sumOfLogs()
default double sumOfSquares()
default double geometricMean()
default double quadraticMean()
default double kurtosis()
default double skewness()
default double pearsons(NumericColumn<?> otherColumn)
default double autoCorrelation()
default double autoCorrelation(int lag)
lag
. If lag is 2, the
correlation is computed between pairs of elements 0 and 2, 1 and 3; 2 and 4, etc.default double spearmans(NumericColumn<?> otherColumn)
otherColumn
- A NumberColumn with no missing valuesorg.apache.commons.math3.exception.NotANumberException
- if either column contains any missing valuesdefault double kendalls(NumericColumn<?> otherColumn)
default Table summary()
default Stats stats()
Stats
object that collects common statistical measures of the data in this
columndefault NumberRollingColumn rolling(int windowSize)
RollingColumn
with the given windowSize, which can be used for performing
calculations on rolling subsets of my datadefault DoubleColumn pctChange(int periods)
periods
apartdefault NumericColumn<T> lead(int n)
NumericColumn<T> lag(int n)
For example if you lag a column containing 2, 3, 4 by 1, you get a column containing NA, 2, 3
double getDouble(int index)
index
getDouble
in interface NumberFilters
getDouble
in interface NumberMapFunctions
default LongColumn asLongColumn()
The exact behavior when overridden depends on the type of the receiver (LongColumn, FloatColumn, etc.)
In this version, the result is a copy of the original
default IntColumn asIntColumn()
The exact behavior when overridden depends on the type of the receiver (LongColumn, FloatColumn, etc.)
In this version, the result is a copy of the original
default FloatColumn asFloatColumn()
The exact behavior when overridden depends on the type of the receiver (LongColumn, FloatColumn, etc.)
In this version, the result is a copy of the original
default DoubleColumn asDoubleColumn()
The exact behavior when overridden depends on the type of the receiver (LongColumn, FloatColumn, etc.)
In this version, the result is a copy of the original
default ShortColumn asShortColumn()
The exact behavior when overridden depends on the type of the receiver (LongColumn, FloatColumn, etc.)
In this version, the result is a copy of the original
NumericColumn<T> copy()
StringColumn asStringColumn()
asStringColumn
in interface Column<T extends Number>
StringColumn
built using the column Column.getUnformattedString(int)
methodCopyright © 2022. All rights reserved.