Here is a description of the algorithms used by dms_tools.
Examples
Algorithm to infer site-specific preferences