Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
ced6088
Merge pull request #920 from casact/main
henrydingliu Jun 4, 2026
38b31a1
Update conf.py
henrydingliu Jun 5, 2026
4a9b9dc
Update conf.py
henrydingliu Jun 5, 2026
ebf96d9
Update conf.py
henrydingliu Jun 5, 2026
172c8ab
Update conf.py
henrydingliu Jun 5, 2026
bdc83c5
Update conf.py
henrydingliu Jun 5, 2026
6e92b74
Update conf.py
henrydingliu Jun 5, 2026
6c11c9b
Update conf.py
henrydingliu Jun 5, 2026
a8b91a5
Added development_format
kennethshsu Jun 4, 2026
bf71b47
removed the development_format from friedland_med_mal
kennethshsu Jun 4, 2026
9db4fc7
FIX: Make quarterly.csv development dates ISO 8601-compatible.
genedan Jun 5, 2026
e11d092
TST: Add unit tests to cover missing lines in base.py.
genedan Jun 7, 2026
ec03ef2
FIX: Fix typo in test, but in column type checking.
genedan Jun 7, 2026
4a16b5a
FIX: Fix for pandas 3.
genedan Jun 7, 2026
0316596
FIX: Fix for pandas 3.
genedan Jun 7, 2026
f1c882e
Update friedland_wc_self_insurer.csv
henrydingliu Jun 5, 2026
a9ca51c
Update friedland_auto_freq_sev.csv
henrydingliu Jun 5, 2026
279e69e
Update friedland_wc_self_insurer.csv
henrydingliu Jun 5, 2026
b754e74
Update friedland_auto_freq_sev.csv
henrydingliu Jun 5, 2026
4818aaa
Update _manifest.py
henrydingliu Jun 5, 2026
dfe2d29
Delete chainladder/utils/data/friedland_xyz_freq_sev.csv
henrydingliu Jun 5, 2026
c734a4e
Update friedland_xyz_auto_bi.csv
henrydingliu Jun 5, 2026
55177b0
Delete chainladder/utils/data/friedland_xyz_case.csv
henrydingliu Jun 5, 2026
0c1a8b1
Update _manifest.py
henrydingliu Jun 5, 2026
1003dbd
Update chapter_6.rst
henrydingliu Jun 5, 2026
d88155b
Deprecate dask array backend (#842)
priyam0k Jun 7, 2026
214d14e
Gate dask warning to actual dask dataframes (#842)
priyam0k Jun 7, 2026
96f6909
TST: Add tests for missing lines in _LocBase.
genedan Jun 7, 2026
a418aa3
DOCS: Add type aliases for Triangle, IndexExpression, and _AxisKey.
genedan Jun 7, 2026
9d8fe70
TST: Exclude typing.py from coverage.
genedan Jun 7, 2026
c9c0de9
DOCS: Add annotations, typing, and return consistent tuples for key f…
genedan Jun 7, 2026
2a711e1
FIX: Apply Bugbot fixes.
genedan Jun 7, 2026
3b655c5
FIX: Apply Bugbot fixes.
genedan Jun 7, 2026
4f4c0ec
FIX: Apply Bugbot fixes.
genedan Jun 7, 2026
bc0e3c4
Switching codecov to main
kennethshsu Jun 9, 2026
c3cfe7f
TST: Add tests for missing lines in slice.py.
genedan Jun 8, 2026
be48672
DOCS: Add typing and annotations.
genedan Jun 8, 2026
d97ecb5
FIX: Code cleanup to handle warnings.
genedan Jun 8, 2026
96db5d9
TST: Add more meaningful assertions and annotations.
genedan Jun 9, 2026
3770180
FIX: Fix boundary on development slicing test.
genedan Jun 9, 2026
283e66c
FIX: Fix boundary on development slicing test.
genedan Jun 9, 2026
789d295
adding support for multi-triangle in mackchainladder
henrydingliu May 28, 2026
86f5acf
Update test_predict.py
henrydingliu Jun 12, 2026
81ff370
Update triangle.py
henrydingliu Jun 12, 2026
ce3f6ee
Update base.py
henrydingliu Jun 12, 2026
276dedf
Update test_triangle.py
henrydingliu Jun 12, 2026
7d0b241
Update benktander.py
henrydingliu Jun 12, 2026
aa17446
Update test_predict.py
henrydingliu Jun 12, 2026
00c252a
Update pyproject.toml
henrydingliu Jun 12, 2026
4f4f2d9
Delete docs/friedland/chapter_8.ipynb
henrydingliu Jun 12, 2026
c1792bf
docs: use uppercase option name AUTO_SPARSE after options refactor (#…
SaguaroDev Jun 12, 2026
5299fb3
docs: reset AUTO_SPARSE after backend demo so prism stays sparse
SaguaroDev Jun 14, 2026
984948c
Merge pull request #895 from SaguaroDev/889-docs-options-refactor
henrydingliu Jun 14, 2026
fe023b4
Merge pull request #971 from casact/main
henrydingliu Jun 14, 2026
e7c0bf0
docs: reset ULT_VAL after demo in methods notebook
SaguaroDev Jun 14, 2026
d4b75e5
Merge pull request #972 from SaguaroDev/methods-ult-val-reset
henrydingliu Jun 14, 2026
5b6c2f6
Update stochastic-tutorial.ipynb
henrydingliu Jun 14, 2026
24ec6cd
Update pyproject.toml
henrydingliu Jun 14, 2026
9bb9721
Update pyproject.toml
henrydingliu Jun 14, 2026
39ed398
Update pytest.yml
henrydingliu Jun 14, 2026
d3312d4
Update pytest.yml
henrydingliu Jun 14, 2026
aff286f
Update pytest.yml
henrydingliu Jun 14, 2026
e432fc7
Update pytest.yml
henrydingliu Jun 14, 2026
f6ed637
Update pytest.yml
henrydingliu Jun 14, 2026
2e7ce68
Update pytest.yml
henrydingliu Jun 14, 2026
5404502
Update pytest.yml
henrydingliu Jun 14, 2026
7ed2585
build: floor patsy>=1.0.2 and statsmodels>=0.14.6 for pandas 3 (#889)
SaguaroDev Jun 14, 2026
7cb7eac
Merge pull request #974 from SaguaroDev/889-pandas3-dep-floors
henrydingliu Jun 14, 2026
b4c619d
Update plot_munich.ipynb
henrydingliu Jun 14, 2026
0486f53
docs: show full inherited method docstrings on Triangle API page
Jun 15, 2026
e74a008
Merge pull request #978 from EKtheSage/docs/970-inherited-docstrings
henrydingliu Jun 15, 2026
8a4de4a
Merge pull request #979 from casact/main
henrydingliu Jun 15, 2026
cb1ef40
docs: add docstrings for Triangle broadcast_axis, copy, reindex
Jun 15, 2026
308a07c
Merge pull request #983 from EKtheSage/docs/970-triangle-methods
henrydingliu Jun 15, 2026
a4b9ff1
docs: add docstrings for Triangle exp, log, sqrt, round
Jun 15, 2026
a213e93
Address review: document banker's rounding on round
Jun 15, 2026
3539462
docs: add docstrings for Triangle head, tail, sort_index
Jun 15, 2026
38325a2
Address review: use triangles wording in head and tail docs
Jun 15, 2026
d3ed85e
docs: add docstrings for Triangle compute and pipe
Jun 15, 2026
af81678
Address review: add pipe docstring example
Jun 15, 2026
ef39d01
Merge pull request #984 from EKtheSage/docs/970-pandas-ufuncs
henrydingliu Jun 15, 2026
0cc432c
Merge pull request #985 from EKtheSage/docs/970-pandas-indexing
henrydingliu Jun 15, 2026
c528fac
Merge pull request #986 from EKtheSage/docs/970-misc-methods
henrydingliu Jun 15, 2026
b660535
Merge branch 'main' into experimental
henrydingliu Jun 16, 2026
d26f931
Update api.md
henrydingliu Jun 16, 2026
a9a330a
Update api.md
henrydingliu Jun 16, 2026
6d0004b
Update stochastic-tutorial.ipynb
henrydingliu Jun 17, 2026
6814ebf
docs(utilities): live list_samples table + model_diagnostics demo (#9…
SaguaroDev Jun 17, 2026
7c68c7e
Merge branch 'experimental' of https://github.com/casact/chainladder-…
kennethshsu Jun 17, 2026
0c92830
Merge pull request #1015 from casact/main
henrydingliu Jun 18, 2026
23d0e4c
Update constant.py
henrydingliu Jun 19, 2026
7f6276f
Update glm.py
henrydingliu Jun 19, 2026
8685977
Update utility_functions.py
henrydingliu Jun 19, 2026
ac6234f
Update glm.py
henrydingliu Jun 19, 2026
e70fae9
Update glm.py
henrydingliu Jun 19, 2026
fc46999
Update glm.py
henrydingliu Jun 19, 2026
eeb467d
Update glm.py
henrydingliu Jun 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions chainladder/development/constant.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,14 @@ def __init__(self, patterns=None, style="ldf", callable_axis=0, groupby=None):

def fit(self, X, y=None, sample_weight=None):
"""Fit the model with X.

Parameters
----------
X : Triangle-like
    Set of LDFs to which the munich adjustment will be applied.
y : Ignored
sample_weight : Ignored

Returns
-------
self : object
Expand Down
36 changes: 20 additions & 16 deletions chainladder/development/glm.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,26 @@ class TweedieGLM(DevelopmentBase):
Column name for the response variable of the GLM. If omitted, then the
first column of the Triangle will be used.
power: float, default=1
The power determines the underlying target distribution according
to the following table:
+-------+------------------------+
| Power | Distribution |
+=======+========================+
| 0 | Normal |
+-------+------------------------+
| 1 | Poisson |
+-------+------------------------+
| (1,2) | Compound Poisson Gamma |
+-------+------------------------+
| 2 | Gamma |
+-------+------------------------+
| 3 | Inverse Gaussian |
+-------+------------------------+
For ``0 < power < 1``, no distribution exists.
The power determines the underlying target distribution according
to the following table:

.. list-table::
:header-rows: 1

* - Power
- Distribution
* - 0
- Normal
* - 1
- Poisson
* - (1,2)
- Compound Poisson Gamma
* - 2
- Gamma
* - 3
- Inverse Gaussian

For ``0 < power < 1``, no distribution exists.
alpha: float, default=1
Constant that multiplies the penalty term and thus determines the
regularization strength. ``alpha = 0`` is equivalent to unpenalized
Expand Down
3 changes: 2 additions & 1 deletion chainladder/utils/utility_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,8 @@ def model_diagnostics(
- ``Run Off 1/2/3...``: Expected incremental emergence in successive future valuation periods (from ``full_expectation_``)
- ``Apriori``: Expected ultimate for Benktander family of methods (from ``expectation_``)

Columns from the original Triangle are cross-joined into the index. ``Measure`` will contain all the columns from the original Triangle.
Columns from the original Triangle are cross-joined into the index.
``Measure`` will contain all the columns from the original Triangle.
"""
from chainladder import Pipeline, Triangle

Expand Down
73 changes: 44 additions & 29 deletions docs/user_guide/utilities.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"cells": [
{
"cell_type": "markdown",
"id": "7e2c2fa7-9d32-404b-9121-51d06ac57324",
"metadata": {},
"source": [
"# Utilities\n",
Expand All @@ -13,38 +12,54 @@
"\n",
"## Sample Datasets\n",
"\n",
"A variety of datasets can be loaded using :func:`load_sample()`. These are\n",
"sample datasets that are used in a variety of examples within this\n",
"documentation.\n",
"\n",
"\n",
"| Dataset | Description | \n",
"|-----------|------------------------------------------------------|\n",
"| abc | ABC Data |\n",
"| auto | Auto Data |\n",
"| berqsherm | Data from the Berquist Sherman paper |\n",
"| cc_sample | Sample Insurance Data for Cape Cod Method in Struhuss|\n",
"| clrd | CAS Loss Reserving Database |\n",
"| genins | General Insurance Data used in Clark |\n",
"| ia_sample | Sample data for Incremental Additive Method in Schmidt|\n",
"| liab | more data|\n",
"| m3ir5 | more data|\n",
"| mcl | Sample insurance data for Munich Adjustment in Quarg|\n",
"| mortgage | more data|\n",
"| mw2008 | more data|\n",
"| mw2014 | more data|\n",
"| quarterly | Sample data to demonstrate changing Triangle grain|\n",
"| raa | Sample data used in Mack Chainladder|\n",
"| ukmotor | more data|\n",
"| usaa | more data|\n",
"| usauto | more data|\n",
"A variety of datasets can be loaded using `load_sample()`. These are sample\n",
"datasets that are used throughout the examples in this documentation. The full\n",
"list is available through `list_samples()`, which returns a table of every\n",
"bundled dataset along with its index, columns, and grain."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import chainladder as cl\n",
"\n",
"cl.list_samples()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Model Diagnostics\n",
"\n",
"`model_diagnostics()` summarizes a fitted IBNR model into a single Triangle\n",
"whose columns are the diagnostic vectors of interest, such as the latest\n",
"diagonal, IBNR, and ultimate. It accepts a fitted estimator or a `Pipeline`,\n",
"and an optional `groupby` to summarize at a coarser index level."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"model = cl.Chainladder().fit(cl.load_sample('raa'))\n",
"cl.model_diagnostics(model)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Chainladder Persistence\n",
"\n",
"All estimators can be persisted to disk or database\n",
"using ``to_json`` or ``to_pickle``. Restoring the estimator is as simple as\n",
"``cl.read_json`` or ``cl.read_pickle``.\n"
"All estimators can be persisted to disk or database using `to_json` or\n",
"`to_pickle`. Restoring the estimator is as simple as `cl.read_json` or\n",
"`cl.read_pickle`."
]
},
{
Expand Down
Loading