Kernel-Type Estimator#

class tailestim.estimators.kernel.KernelTypeEstimator(bootstrap=True, hsteps=200, alpha=0.6, t_bootstrap=0.5, r_bootstrap=500, eps_stop=0.99, verbose=False, diagn_plots=False, base_seed=None, **kwargs)[source]#

Bases: BaseTailEstimator

Kernel-type estimator for tail index estimation.

This class implements the Kernel-type estimator with optional double-bootstrap for optimal bandwidth selection. It uses both biweight and triweight kernels for estimation.

Parameters:
bootstrapbool, default=True

Whether to use double-bootstrap for optimal threshold selection.

hstepsint, default=200

Parameter controlling number of bandwidth steps.

alphafloat, default=0.6

Parameter controlling the amount of “smoothing”. Should be greater than 0.5.

t_bootstrapfloat, default=0.5

Parameter controlling the size of the 2nd bootstrap. Defined from n2 = n*(t_bootstrap).

r_bootstrapint, default=500

Number of bootstrap resamplings for the 1st and 2nd bootstraps.

eps_stopfloat, default=0.99

Parameter controlling range of AMSE minimization. Defined as the fraction of order statistics to consider during the AMSE minimization step.

verbosebool, default=False

Flag controlling bootstrap verbosity.

diagn_plotsbool, default=False

Flag to switch on/off generation of AMSE diagnostic plots.

base_seed: None | SeedSequence | BitGenerator | Generator | RandomState, default=None

Base random seed for reproducibility of bootstrap.

__init__(bootstrap=True, hsteps=200, alpha=0.6, t_bootstrap=0.5, r_bootstrap=500, eps_stop=0.99, verbose=False, diagn_plots=False, base_seed=None, **kwargs)[source]#
get_params()[source]#

Get the parameters of the estimator.

Returns:
dict

Dictionary containing the parameters of the estimator.

get_result()[source]#

Get the estimated parameters.

Attributes:
estimatorBaseTailEstimator

The estimator instance (e.g., HillEstimator, PickandsEstimator, etc.) used for estimation.

xi_star_float

Optimal tail index estimate (ξ).

gamma_float

Power law exponent (γ).

k_arr_np.ndarray

Array of order statistics.

xi_arr_np.ndarray

Array of tail index estimates.

k_star_float

Optimal order statistic (k*).

bootstrap_results_dict

Bootstrap results.

Returns:
TailEstimatorResult

Examples#

from tailestim import TailData
from tailestim import HillEstimator

data = TailData(name='Pareto').data

# Initialize and fit Kernel-type estimator
kernel = KernelTypeEstimator(
    bootstrap=True,
    hsteps=200,
    alpha=0.6
)
kernel.fit(data)

# Get estimated values
res = kernel.get_result()