How to embed expert knowledge /constraints in ML training?

I don’t know what kind of “ML” you are interested in but constrained splines might help you. Constrained P-Splines have nice properties and have been around for awhile (and can handle monotonic, etc constraints). You can check out this book on P-Splines which has a large amount of nicely written R code which is extremely simple to translate to Julia: https://psplines.bitbucket.io/

Simon Wood (of mgcv fame) has a paper on embedding shape constrained splines in generalized additive models here: Shape constrained additive models | Statistics and Computing with an accompanying R package.

3 Likes