Hill Estimator#
- class tailestim.estimators.hill.HillEstimator(bootstrap=True, t_bootstrap=0.5, r_bootstrap=500, eps_stop=0.99, verbose=False, diagn_plots=False, base_seed=None, max_resample=50, **kwargs)[source]#
Bases:
BaseTailEstimatorHill estimator for tail index estimation.
This class implements the Hill estimator with optional double-bootstrap for optimal threshold selection.
- Parameters:
- bootstrapbool, default=True
Whether to use double-bootstrap for optimal threshold selection.
- 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.
- max_resampleint, default=50
Maximum number of resampling attempts when the double-bootstrap detects a false AMSE minimum (k2 > k1). Raises RuntimeError if exceeded.
- __init__(bootstrap=True, t_bootstrap=0.5, r_bootstrap=500, eps_stop=0.99, verbose=False, diagn_plots=False, base_seed=None, max_resample=50, **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 Hill estimator
hill = HillEstimator()
hill.fit(data)
# Get estimated values
res = hill.get_result()