Skip to content

Commit

Permalink
add Python vignette
Browse files Browse the repository at this point in the history
  • Loading branch information
dutangc committed Sep 27, 2024
1 parent 701f1bc commit 9eb71fd
Show file tree
Hide file tree
Showing 7 changed files with 2,005 additions and 7 deletions.
14 changes: 10 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,20 @@ Authors@R: c(person("Christophe", "Dutang", role = c("aut", "cre"), email = "dut
person("Arthur", "Charpentier", role = c("aut"), comment = c(ORCID = "0000-0003-3654-6286")),
person("Ewen", "Gallic", role = c("ctb"), comment = c(ORCID = "0000-0003-3740-2620")),
person("Julien", "Siharath", role = c("ctb")))
Description: A collection of insurance datasets, originally for the book 'Computational Actuarial Science with R'
Description: A collection of insurance datasets, originally
for the book 'Computational Actuarial Science with R'
<https://www.routledge.com/Computational-Actuarial-Science-with-R/Charpentier/p/book/9781138033788>
edited by Arthur Charpentier. Now, the package contains a large variety of actuarial datasets.
edited by Arthur Charpentier. Now, the package contains a
large variety of insurance datasets. Vignettes provide
typical use-cases in actuarial science.
Depends: R (>= 3.6.0), xts, survival
Imports: lattice
Suggests: sp, sf, knitr, kableExtra, quarto, rmarkdown, AER, boot, broom, ChainLadder, demography, dplyr, forecast, ggplot2, glmnet, MASS, mgcv, pscl, rainbow, RColorBrewer, splines, tidyr, tidyverse, wesanderson
Suggests: sp, sf, knitr, kableExtra, quarto, rmarkdown,
AER, boot, broom, ChainLadder, demography, dplyr, forecast,
ggplot2, glmnet, MASS, mgcv, pscl, rainbow, RColorBrewer,
reticulate, splines, tidyr, tidyverse, wesanderson
License: GPL (>= 2)
URL: https://dutangc.github.io/CASdatasets/, http://dutangc.free.fr/pub/RRepos/, http://cas.uqam.ca/, http://dutangc.perso.math.cnrs.fr/RRepository/
URL: https://dutangc.github.io/CASdatasets/, http://dutangc.free.fr/pub/RRepos/, https://freakonometrics.github.io/CASdatasets/, http://dutangc.perso.math.cnrs.fr/RRepository/
BugReports: https://github.com/dutangc/CASdatasets/issues
NeedsCompilation: no
VignetteBuilder: quarto
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Current version for development.
- All **Geographical datasets** have been put in the extra directory `geodata/` of this repository.
- Put new packages in Suggest fields.
- New datasets have been added (see below).
- Add quarto vignettes with detailed use cases thanks to Julien.
- Add quarto vignettes with detailed use cases thanks to Julien. One vignette use Python with the following packages equipy, pandas, numpy, sklearn, seaborn, matplotlib, typing.
- The package has been uploaded on the [French research data repository](https://entrepot.recherche.data.gouv.fr) and obtained a DOI : [10.57745/P0KHAG](https://doi.org/10.57745/P0KHAG).

## Datasets lists
Expand Down
8 changes: 8 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,14 @@ articles:
contents:
- triangle_vignette
- triangle_aids_vignette
- title: Life insurance -- use cases of mortality modeling
navbar: ~
contents:
- mortality_vignette
- title: Fairness analysis
navbar: ~
contents:
- insur_fair_vignette_rf

toc:
number_sections: yes
Expand Down
2 changes: 1 addition & 1 deletion man/pricingame.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ data(pg17testyear4)
}
The bonus/malus system is compulsary in France, but we will only use it here as a possible feature. The coefficient is attached to the driver. It starts at 1 for young drivers (i.e. first year of insurance). Then, every year without claim, the bonus decreases by 5 percent until it reaches its minimum of 0.5. Without any claim, the bonus evolution would then be : 1 \eqn{->} 0.95 \eqn{->} 0.9 \eqn{->} 0.85 \eqn{->} 0.8 \eqn{->} 0.76 \eqn{->} 0.72 \eqn{->} 0.68 \eqn{->} 0.64 \eqn{->} 0.6 \eqn{->} 0.57 \eqn{->} 0.54 \eqn{->} 0.51 \eqn{->} 0.5.
The bonus/malus system is compulsory in France, but we will only use it here as a possible feature. The coefficient is attached to the driver. It starts at 1 for young drivers (i.e. first year of insurance). Then, every year without claim, the bonus decreases by 5 percent until it reaches its minimum of 0.5. Without any claim, the bonus evolution would then be : 1 \eqn{->} 0.95 \eqn{->} 0.9 \eqn{->} 0.85 \eqn{->} 0.8 \eqn{->} 0.76 \eqn{->} 0.72 \eqn{->} 0.68 \eqn{->} 0.64 \eqn{->} 0.6 \eqn{->} 0.57 \eqn{->} 0.54 \eqn{->} 0.51 \eqn{->} 0.5.
Every time the driver causes a claim (only certain types of claims are taken into account), the coefficient increases by 25 percent, with a maximum of 3.5. Thus, the range of bonus/malus coefficient extends from 0.5 to 3.5 in the datasets.
}
Expand Down
Loading

0 comments on commit 9eb71fd

Please sign in to comment.