function uniquecounts(rows, class_col_id) {
  var results = {};
  for (row of rows) {
    // The result is in the column specified by scorevar
    var r = row[1][class_col_id];
    if (!Object.keys(results).includes(r)) {
      results[r] = 0;
    }
    results[r] += 1;
  }
  return results; // An array of counts per each unique val in the labels column
}
// Create counts of possible class labels in the same group of rows

Create counts of possible class labels in the same group of rows
Create counts of possible class labels in the same group of rows
function uniquecounts(rows, class_col_id) {
  var results = {};
  for (row of rows) {
    var r = row[1][class_col_id];
    if (!Object.keys(results).includes(r)) {
      results[r] = 0;
    }
    results[r] += 1;
  }
  return results; 
}
function uniquecounts ( rows , class_col_id ) { var results = { } ; for ( row of rows ) { var r = row [ 1 ] [ class_col_id ] ; if ( ! Object . keys ( results ) . includes ( r ) ) { results [ r ] = 0 ; } results [ r ] += 1 ; } return results ; }
Create counts of possible class labels in the same group of rows
Create counts of possible class labels in the same group of rows
// The result is in the column specified by scorevar
 // An array of counts per each unique val in the labels column
