Skip to content

Commit c75a6e1

Browse files
authored
Merge pull request #25 from mu373/change-result-return-type
Update documentation for result arguments
2 parents 987cc23 + aad87f6 commit c75a6e1

File tree

18 files changed

+290
-47
lines changed

18 files changed

+290
-47
lines changed

docs/api.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
API Reference
2-
============
2+
=============
33

44
This section provides detailed API documentation for the tailestim package.
55

docs/conf.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,15 @@
2323

2424
extensions = [
2525
'sphinx.ext.autodoc',
26+
'numpydoc',
2627
'sphinx.ext.viewcode',
2728
'sphinx.ext.napoleon',
2829
'sphinx.ext.intersphinx',
2930
]
3031

32+
numpydoc_show_class_members = False
33+
autodoc_typehints = "none"
34+
3135
# Napoleon settings
3236
napoleon_google_docstring = True
3337
napoleon_numpy_docstring = True

docs/estimators/hill.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Hill Estimator
2-
=============
2+
===============
33

44
.. currentmodule:: tailestim.estimators
55

docs/estimators/kernel.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Kernel-Type Estimator
2-
==================
2+
======================
33

44
.. currentmodule:: tailestim.estimators
55

docs/estimators/moments.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Moments Estimator
2-
================
2+
==================
33

44
.. currentmodule:: tailestim.estimators
55

docs/estimators/pickands.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Pickands Estimator
2-
================
2+
==================
33

44
.. currentmodule:: tailestim.estimators
55

docs/estimators/smooth_hill.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Smooth Hill Estimator
2-
===================
2+
=====================
33

44
.. currentmodule:: tailestim.estimators
55

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Contents
2727
api
2828

2929
References
30-
---------
30+
------------
3131

3232
- I. Voitalov, P. van der Hoorn, R. van der Hofstad, and D. Krioukov. Scale-free networks well done. *Phys. Rev. Res.*, Oct. 2019, doi: `10.1103/PhysRevResearch.1.033034 <https://doi.org/10.1103/PhysRevResearch.1.033034>`_.
3333
- I. Voitalov. `ivanvoitalov/tail-estimation <https://github.com/ivanvoitalov/tail-estimation>`_, GitHub. Mar. 2018.

docs/requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
sphinx>=8.0.0
22
pydata-sphinx-theme>=0.15.0
3-
sphinx-autodoc-typehints>=1.25.0
3+
sphinx-autodoc-typehints>=1.25.0
4+
numpydoc>=2.0.0

docs/result.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,25 @@ Result Class
55
:members:
66
:undoc-members:
77
:show-inheritance:
8+
9+
Examples
10+
--------
11+
.. code-block:: python
12+
13+
from tailestim import TailData
14+
from tailestim import HillEstimator
15+
16+
data = TailData(name='Pareto').data
17+
18+
# Initialize and fit Hill estimator
19+
hill = HillEstimator()
20+
hill.fit(data)
21+
22+
# Get estimated parameters
23+
result = hill.get_parameters() # This returns TailEstimatorResult class.
24+
print(result)
25+
26+
# Access individual parameters
27+
gamma = result.gamma # Power-law exponent estimate
28+
xi = result.xi # Tail index estimate
29+

0 commit comments

Comments
 (0)