Giter Site home page Giter Site logo

neverfox / deeptriangle Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kasaai/deeptriangle

0.0 1.0 0.0 1.06 MB

DeepTriangle: A Deep Learning Approach to Loss Reserving

Home Page: https://www.mdpi.com/2227-9091/7/3/97

License: Other

R 21.21% TeX 78.79%

deeptriangle's Introduction

Travis build status

DeepTriangle

This is the companion repository to the paper DeepTriangle: A Deep Learning Approach to Loss Reserving.

Experiments

To get started, either clone the repo and build the R package, or install with

devtools::install_github("kasaai/deeptriangle")

You will also need the insurance package, which can be installed with

devtools::install_github("kasaai/insurance")

The experiments can be found in analysis/main.R. It is recommended that you use a GPU since many instances of the models are fit.

For convenience, we provide a predictions.feather file in the release.

predictions <- feather::read_feather("datasets/predictions.feather")

model_results <- dt_compute_metrics(predictions) %>%
  bind_rows(stochastic_model_results) %>%
  bind_rows(read_csv("datasets/automl_results.csv")) %>%
  gather(metric, value, mape, rmspe)

dt_tabulate_metrics(model_results, metric = "mape") %>%
  knitr::kable(booktabs = "T", digits = 3)
lob Mack ODP CIT LIT AutoML DeepTriangle
commercial_auto 0.060 0.217 0.052 0.052 0.068 0.043
other_liability 0.134 0.223 0.165 0.152 0.142 0.109
private_passenger_auto 0.038 0.039 0.038 0.040 0.036 0.025
workers_compensation 0.053 0.105 0.054 0.054 0.067 0.046

To create actual vs. predicted plots, use the dt_plot_predictions() function. Here are successful and unsuccessful examples of the model’s forecasting attempts.

Company 1767 commercial auto.

Company 337 workers’ compensation.

Testing different architectures

If you would like to try out different architectures or hyperparameters, you can do so by providing a function that returns a keras model. See the source code of dt_model() for a template.

For more details on the keras R package, visit https://keras.rstudio.com/.

deeptriangle's People

Contributors

ekthesage avatar kevinykuo avatar mages avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.