static/js/calculate.js
/**
 * Calculate adjusted Rand index between current and reference binning plans.
 * @function calcAdjRand
 * @param {Object} mo - main object
 * @param {string} field - categorical field to serve as reference
 */
Calculate adjusted Rand index between current and reference binning plans.
@function calcAdjRand
@param {Object} mo - main object
@param {string} field - categorical field to serve as reference
Calculate adjusted Rand index between current and reference binning plans . @function calcAdjRand @param { Object } mo - main object @param { string } field - categorical field to serve as reference
function calcAdjRand(mo, field) {
  if (!mo.cache.nctg) return;
  const ari = adjustedRandScore(factorize(mo.binned)[0],
    factorize(mo.data[mo.cols.names.indexOf(field)])[0]);
  toastMsg(`Adjusted Rand index between current binning plan and ` +
    `"${field}": ${ari.toFixed(5)}.`, mo.stat, 0, false, true);
}
function calcAdjRand ( mo , field ) { if ( ! mo . cache . nctg ) return ; const ari = adjustedRandScore ( factorize ( mo . binned ) [ 0 ] , factorize ( mo . data [ mo . cols . names . indexOf ( field ) ] ) [ 0 ] ) ; toastMsg ( ` ` + ` ${ field } ${ ari . toFixed ( 5 ) } ` , mo . stat , 0 , false , true ) ; }
Calculate adjusted Rand index between current and reference binning plans.
Calculate adjusted Rand index between current and reference binning plans .