Base Class#

Base class for tail index estimation.

class tailestim.estimators.base.BaseTailEstimator(bootstrap=True, base_seed=None, **kwargs)[source]#

Bases: ABC

Abstract base class for tail index estimation.

This class defines the common interface and utility methods for all tail estimation implementations. Each specific estimation method should inherit from this class and implement the required abstract methods.

Parameters:
bootstrapbool, default=True

Whether to use double-bootstrap for optimal threshold selection. May not be applicable for all methods.

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

Base random seed for reproducibility of bootstrap. Only used for methods with bootstrap.

**kwargsdict

Additional parameters specific to each estimation method.

__repr__()[source]#

Return a string representation of the estimator.

__str__()[source]#

Format estimation object as a string.

fit(data)[source]#

Fit the estimator to the data.

Parameters:
datanp.ndarray

Input data array (e.g., degree sequence). The data will automatically be sorted in decreasing order.

abstractmethod get_params()[source]#

Get the parameters of the estimator.

Returns:
dict

Dictionary containing the parameters of the estimator.

abstractmethod get_result()[source]#

Get the estimated parameters.

Returns:
TailEstimatorResult

Object containing the estimated parameters. Parameters and results included varies by method.

Examples

>>> hill = HillEstimator()
>>> hill.fit(data)
>>> result = hill.get_result()
>>> gamma = result.gamma_
>>> xi = result.xi_