Loading...

vastorbit.VastFrame.kurtosis

VastFrame.kurtosis(columns: Annotated[str | list[str], 'STRING representing one column or a list of columns'] | None = None, **agg_kwargs) TableSample

Calculates the kurtosis of the VastFrame to obtain a measure of the data’s peakedness or tailness. The kurtosis statistic helps us understand the shape of the data distribution. It quantifies whether the data has heavy tails or is more peaked relative to a normal distribution.

By aggregating the VastFrame with kurtosis, we can gain valuable insights into the data’s distribution characteristics.

Warning

To compute kurtosis, vastorbit needs to execute multiple queries. It necessitates, at a minimum, a query that includes a subquery to perform this type of aggregation. This complexity is the reason why calculating kurtosis is typically slower than some other types of aggregations.

Parameters:
  • columns (SQLColumns, optional) – List of the VastColumns names. If empty, all VastColumns are used.

  • **agg_kwargs – Any optional parameter to pass to the Aggregate function.

Returns:

result.

Return type:

TableSample

Examples

For this example, we will use the following dataset:

import vastorbit as vo

data = vo.VastFrame(
    {
        "x": [1, 2, 4, 9, 10, 15, 20, 22],
        "y": [1, 2, 1, 2, 1, 1, 2, 1],
        "z": [10, 12, 2, 1, 9, 8, 1, 3],
    }
)

Now, let’s calculate the kurtosis for specific columns.

data.kurtosis(
    columns = ["x", "y", "z"],
)
kurtosis
"x"-1.4466103509194639
"y"-2.2400000000000007
"z"-2.0835703549543307
Rows: 1-3 | Columns: 2

Note

All the calculations are pushed to the database.

Hint

For more precise control, please refer to the aggregate method.

See also

VastColumn.kurtosis() : Kurtosis for a specific column.
VastFrame.skewness() : Skewness for particular columns.
VastFrame.std() : Standard Deviation for particular columns.