isFeatureInvalid = (
  data,
  uniqueDataVals = null,
  invalidCountThreshold = INVALID_COUNT_THRESHOLD,
  invalidPercentageThreshold = INVALID_PERCENTAGE_THRESHOLD
) => {
  const uniques = uniqueDataVals || Array.from(new Set(data));
  const hasNaN = uniques.some(d => isNaN(d) || d === null);
  return (
    uniques.length < 2 ||
    (hasNaN &&
      uniques.length > data.length * invalidPercentageThreshold &&
      uniques.length > invalidCountThreshold)
  );
}
@param {Array} data feature values
@param {Array} uniqueDataVals unique values in feature values
@return {Boolean}