featuretools.primitives.Kurtosis#

class featuretools.primitives.Kurtosis(fisher=True, bias=True, nan_policy='propagate')[source]#

Calculates the kurtosis for a list of numbers

Parameters:
  • fisher (bool) – Optional. If True, Fisher’s definition is used (normal ==> 0.0). If False, Pearson’s definition is used (normal ==> 3.0). Default is True.

  • bias (bool) – Optional. If False, then the calculations are corrected for statistical bias. Default is True.

  • nan_policy (str) – Optional. Defines how to handle when input contains Nan. Possible values include [‘propagate’, ‘raise’, ‘omit’]. ‘propagate’ returns Nan, ‘raise’ throws an error, ‘omit’ performs the calculations ignoring Nan values. Default is ‘propagate’.

Examples

>>> kurtosis = Kurtosis()
>>> kurtosis([1, 2, 3, 4, 5])
-1.3

You can use Pearson’s definition by setting the ‘fisher’ argument to False

>>> kurtosis_fisher = Kurtosis(fisher=False)
>>> kurtosis_fisher([1, 2, 3, 4, 5])
1.7

You can correct for statistical bias by setting the ‘bias’ argument to False

>>> kurtosis_bias = Kurtosis(bias=False)
>>> kurtosis_bias([1, 2, 3, 4, 5])
-1.2000000000000004

You can specifiy how to handle NaN values in the input with the ‘nan_policy’ argument

>>> kurtosis_nan_policy = Kurtosis(nan_policy='omit')
>>> kurtosis_nan_policy([1, 2, None, 3, 4, 5])
-1.3
__init__(fisher=True, bias=True, nan_policy='propagate')[source]#

Methods

__init__([fisher, bias, nan_policy])

flatten_nested_input_types(input_types)

Flattens nested column schema inputs into a single list.

generate_name(base_feature_names, ...)

generate_names(base_feature_names, ...)

get_args_string()

get_arguments()

get_description(input_column_descriptions[, ...])

get_filepath(filename)

get_function()

Attributes

base_of

base_of_exclude

commutative

default_value

Default value this feature returns if no data found.

description_template

input_types

woodwork.ColumnSchema types of inputs

max_stack_depth

name

Name of the primitive

number_output_features

Number of columns in feature matrix associated with this feature

return_type

ColumnSchema type of return

stack_on

stack_on_exclude

stack_on_self

uses_calc_time