tdigest#

group tdigest
class tdigest_column_view : private cudf::column_view#
#include <tdigest_column_view.hpp>

Given a column_view containing tdigest data, an instance of this class provides a wrapper on the compound column for tdigest operations.

A tdigest is a “compressed” set of input scalars represented as a sorted set of centroids (https://arxiv.org/pdf/1902.04023.pdf). This data can be queried for quantile information. Each row in a tdigest column represents an entire tdigest.

The column has the following structure:

struct { // centroids for the digest list { struct { double // mean double // weight } } // these are from the input stream, not the centroids. they are used // during the percentile_approx computation near the beginning or // end of the quantiles double // min double // max }

Public Types

using offset_iterator = size_type const*#

Iterator over offsets.

Public Functions

tdigest_column_view(column_view const&)#

Construct tdigest_column_view from a column_view.

tdigest_column_view(tdigest_column_view&&) = default#

Move constructor.

tdigest_column_view(tdigest_column_view const&) = default#

Copy constructor.

tdigest_column_view &operator=(tdigest_column_view const&) = default#

Copy assignment operator.

Returns:

this object after copying the contents of the other object (copy)

tdigest_column_view &operator=(tdigest_column_view&&) = default#

Move assignment operator.

Returns:

this object after moving the contents of the other object (transfer ownership)

column_view parent() const#

Returns the parent column.

Returns:

The parent column

lists_column_view centroids() const#

Returns the column of centroids.

Returns:

The list column of centroids

column_view means() const#

Returns the internal column of mean values.

Returns:

The internal column of mean values

column_view weights() const#

Returns the internal column of weight values.

Returns:

The internal column of weight values

double const *min_begin() const#

Returns the first min value for the column. Each row corresponds to the minimum value for the accompanying digest.

Returns:

const pointer to the first min value for the column

double const *max_begin() const#

Returns the first max value for the column. Each row corresponds to the maximum value for the accompanying digest.

Returns:

const pointer to the first max value for the column

Public Static Attributes

static constexpr size_type mean_column_index = {0}#

Mean column index.

static constexpr size_type weight_column_index = {1}#

Weight column index.

static constexpr size_type centroid_column_index = {0}#

Centroid column index.

static constexpr size_type min_column_index = {1}#

Min column index.

static constexpr size_type max_column_index = {2}#

Max column index.