Giter Site home page Giter Site logo

glissa.jl's Introduction

  • Stochastic processes for epidemiology
  • Computational demography
  • Distributed, parallel, high-performance computing
  • Provenance systems

glissa.jl's People

Contributors

adolgert avatar

Watchers

 avatar  avatar

glissa.jl's Issues

shape constraints on P-splines

Wood and Pya (https://link.springer.com/article/10.1007/s11222-013-9448-7) present a method to set up constraints on P-splines (monotonic, convex/concave, etc). These kinds of constraints, along with max/min constraints would be very helpful for using these to fill in unknown functions in mechanistic models! For example, mosquito feeding rate should increase with increasing host density, but cannot exceed some maximum rate given by digestion/handling time.

penalized splines?

hi @adolgert!

How hard would it be to introduce penalty matrices (penalizing, for example second derivatives) to these splines? Basically, if $X$ is the model matrix of the spline, $y$ the data, $\beta$ the spline coefficients, $\lambda$ a scalar parameter controlling the amount of smoothing, and $S$ a penalty matrix, we'd want to solve a penalized least squares problem of the form:

$$ \lVert y - X\beta \rVert^{2} + \lambda \beta^{\top} S \beta $$

I have an example here (https://gist.github.com/slwu89/50f81e6bbc296261e29851d3585ae554) of using JuMP to solve this kind of penalized least squares problem using a penalized cubic spline where the $X$ and $S$ matrices are produced by the "mgcv" R package, but it would be nice for the whole thing to be in Julia.

possible API

In mgcv, the API is set up around the idea of generic "smooths" that are incorporated into a model (including P, cubic, thin plate, and other flavors of splines).

If we were to take inspiration from this, the main interface functions for users are:

Facilities for imposing shape constraints in mgcv are more limited, and seem to only exist for cubic splines (see https://rdrr.io/cran/mgcv/man/mono.con.html).

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.