mathjs
Version:
Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser and offers an integrated solution to work with numbers, big numbers, complex numbers, units, and matrices.
14 lines (13 loc) • 311 B
JavaScript
module.exports = {
'name': 'kldivergence',
'category': 'Probability',
'syntax': [
'n!',
'factorial(n)'
],
'description': 'Calculate the Kullback-Leibler (KL) divergence between two distributions.',
'examples': [
'math.kldivergence([0.7,0.5,0.4], [0.2,0.9,0.5])'
],
'seealso': []
};