static/js/util.js
/**
 * List features and their frequencies from a feature-type column.
 * @function listFeas
 * @param {Array} arr - feature set column
 * @returns {Object} feature to frequency map
 */
List features and their frequencies from a feature-type column.
@function listFeas
@param {Array} arr - feature set column
@returns {Object} feature to frequency map
List features and their frequencies from a feature - type column . @function listFeas @param { Array } arr - feature set column @returns { Object } feature to frequency map
function listFeas(arr) {
  const res = {};
  const n = arr.length;
  let fea;
  for (let i = 0; i < n; i++) {
    for (fea of arr[i]) {
      res[fea] = (res[fea] || 0) + 1;
    };
  }
  return res;
}
function listFeas ( arr ) { const res = { } ; const n = arr . length ; let fea ; for ( let i = 0 ; i < n ; i ++ ) { for ( fea of arr [ i ] ) { res [ fea ] = ( res [ fea ] || 0 ) + 1 ; } ; } return res ; }
List features and their frequencies from a feature-type column.
List features and their frequencies from a feature - type column .