Method to return the recall value at a particular cutoff level.

@param at cutoff level
@return the recall corresponding to the requested cutoff level
160805
@Override
    public double getValueAt(final int at) {
        if (userRecallAtCutoff.containsKey(at)) {
            int n = 0;
            double rec = 0.0;
            for (U u : userRecallAtCutoff.get(at).keySet()) {
                double urec = getValueAt(u, at);
                if (!Double.isNaN(urec)) {
                    rec += urec;
                    n++;
                }
            }
            if (n == 0) {
                rec = 0.0;
            } else {
                rec = rec / n;
            }
            return rec;
        }
        return Double.NaN;
    }
1365501
def _recall_prec(self, record, count):
        
        record = np.delete(record, np.where(record[:, 1].astype(int) == 0)[0], axis=0)
        sorted_records = record[record[:,0].argsort()[::-1]]
        tp = np.cumsum(sorted_records[:, 1].astype(int) == 1)
        fp = np.cumsum(sorted_records[:, 1].astype(int) == 2)
        if count <= 0:
            recall = tp * 0.0
        else:
            recall = tp / float(count)
        prec = tp.astype(float) / (tp + fp)
        return recall, prec
60699
public static int getIsolationLevelFor(String isoLevel)
    {
        if(isoLevel == null || StringUtils.isEmpty(isoLevel))
        {
            LoggerFactory.getDefaultLogger().debug(
                    "[LockHelper] Specified isolation level string is 'null', using the default isolation level");
            return IsolationLevels.IL_DEFAULT;
        }
        if (isoLevel.equalsIgnoreCase(IsolationLevels.LITERAL_IL_READ_UNCOMMITTED))
        {
            return IsolationLevels.IL_READ_UNCOMMITTED;
        }
        else if (isoLevel.equalsIgnoreCase(IsolationLevels.LITERAL_IL_READ_COMMITTED))
        {
            return IsolationLevels.IL_READ_COMMITTED;
        }
        else if (isoLevel.equalsIgnoreCase(IsolationLevels.LITERAL_IL_REPEATABLE_READ))
        {
            return IsolationLevels.IL_REPEATABLE_READ;
        }
        else if (isoLevel.equalsIgnoreCase(IsolationLevels.LITERAL_IL_SERIALIZABLE))
        {
            return IsolationLevels.IL_SERIALIZABLE;
        }
        else if (isoLevel.equalsIgnoreCase(IsolationLevels.LITERAL_IL_OPTIMISTIC))
        {
            return IsolationLevels.IL_OPTIMISTIC;
        }
        else if (isoLevel.equalsIgnoreCase(IsolationLevels.LITERAL_IL_NONE))
        {
            return IsolationLevels.IL_NONE;
        }
        LoggerFactory.getDefaultLogger().warn("[LockHelper] Unknown isolation-level '" + isoLevel + "', using default isolation level");
        return IsolationLevels.IL_DEFAULT;
    }
254987
@Override
  protected final CompletableFuture<Double> getValue() {
    double rounder = 1 / this.minStep;
    return getDoubleValue()
        .thenApply(d -> d == null ? null : Math.round(d * rounder) / rounder)
        .thenApply(
            d -> {
              if (d != null) {
                if (d < minValue) {
                  LOGGER.warn(
                      "Detected value out of range "
                          + d
                          + ". Returning min value instead. Characteristic "
                          + this);
                  return minValue;
                }
                if (d > maxValue) {
                  LOGGER.warn(
                      "Detected value out of range "
                          + d
                          + ". Returning max value instead. Characteristic "
                          + this);
                  return maxValue;
                }
                return d;
              }
              return null;
            });
  }
711408
@Override
    public double getValueAt(final int at) {
        if (userRecallAtCutoff.containsKey(at)) {
            double sum = 0.0;
            double rec = 0.0;
            for (U u : userRecallAtCutoff.get(at).keySet()) {
                double urec = getValueAt(u, at);
                double utotal = userTotalRecall.get(u);
                if (!Double.isNaN(urec)) {
                    rec += urec * utotal;
                    sum += utotal;
                }
            }
            if (sum == 0.0) {
                rec = 0.0;
            } else {
                rec = rec / sum;
            }
            return rec;
        }
        return Double.NaN;
    }
1148973
public double gMeasure(int output) {
        double precision = precision(output);
        double recall = recall(output);
        return EvaluationUtils.gMeasure(precision, recall);
    }
395679
@Override
  public Level getLevel()
  {
    if (_localLevel != null) {
      Level level = _localLevel.get();

      if (level != null) {
        return level;
      }
    }

    return _systemLevel;
  }
1297370
public int getLevel() {
    if (ListItem_Type.featOkTst && ((ListItem_Type)jcasType).casFeat_level == null)
      jcasType.jcas.throwFeatMissing("level", "de.julielab.jules.types.ListItem");
    return jcasType.ll_cas.ll_getIntValue(addr, ((ListItem_Type)jcasType).casFeatCode_level);}
1364849
public Version cutoff(int index) {
        if (!isBeyondBounds(index)) {
            labels = labels.subList(--index, labels.size());
            numbers = numbers.subList(index, numbers.size());
        }
        return this;
    }
786388
public int logPrecision(int recall) {
    int totaltaken = 0;
    int rightIndex = numSamples() - 1; //next right candidate
    int leftIndex = 0; //next left candidate
    int totalcorrect = 0;

    while (totaltaken < recall) {
      double confr = Math.abs(scores[rightIndex] - .5);
      double confl = Math.abs(scores[leftIndex] - .5);
      int chosen = leftIndex;
      if (confr > confl) {
        chosen = rightIndex;
        rightIndex--;
      } else {
        leftIndex++;
      }
      //System.err.println("chose "+chosen+" score "+scores[chosen]+" class "+classes[chosen]+" correct "+correct(scores[chosen],classes[chosen]));
      if ((scores[chosen] >= .5) && (classes[chosen] == 1)) {
        totalcorrect++;
      }
      if ((scores[chosen] < .5) && (classes[chosen] == 0)) {
        totalcorrect++;
      }
      totaltaken++;
    }

    return totalcorrect;
  }
393078
def recall_series(y_true, y_score, k=None, value=True):
    
    y_true, y_score = to_float(y_true, y_score)
    top = _argsort(y_score, k)

    if not value:
        y_true = 1-y_true

    a = np.nan_to_num(y_true[top]).cumsum()
    return pd.Series(a, index=np.arange(1, len(a)+1))
959524
def _compute_precision_recall(input_, labels, threshold,
                              per_example_weights):
  """"""

  # To apply per_example_weights, we need to collapse each row to a scalar, but
  # we really want the sum.
  labels.get_shape().assert_is_compatible_with(input_.get_shape())
  relevant = tf.to_float(tf.greater(labels, 0))
  retrieved = tf.to_float(tf.greater(input_, threshold))
  selected = relevant * retrieved

  if per_example_weights is not None:
    per_example_weights = _convert_and_assert_per_example_weights_compatible(
        input_,
        per_example_weights,
        dtype=None)
    per_example_weights = tf.to_float(tf.greater(per_example_weights, 0))
    selected = functions.reduce_batch_sum(selected) * per_example_weights
    relevant = functions.reduce_batch_sum(relevant) * per_example_weights
    retrieved = functions.reduce_batch_sum(retrieved) * per_example_weights
  sum_relevant = tf.reduce_sum(relevant)
  sum_retrieved = tf.reduce_sum(retrieved)
  selected = tf.reduce_sum(selected)
  return selected, sum_retrieved, sum_relevant
214776
public ResidueNumber getResidue(int positionInRange, AtomPositionMap map) {
		if (map == null) throw new NullPointerException("The AtomPositionMap must be non-null");
		int i = 0;
		for (Map.Entry<ResidueNumber, Integer> entry : map.getNavMap().entrySet()) {
			if (i == positionInRange) return entry.getKey();
			if (contains(entry.getKey(), map)) {
				i++;
			}
		}
		return null;
	}
363628
public ValueMention getMentions(int i) {
    if (Value_Type.featOkTst && ((Value_Type)jcasType).casFeat_mentions == null)
      jcasType.jcas.throwFeatMissing("mentions", "de.julielab.jules.types.ace.Value");
    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Value_Type)jcasType).casFeatCode_mentions), i);
    return (ValueMention)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((Value_Type)jcasType).casFeatCode_mentions), i)));}
178170
public String getLevel() {
    if (EventMention_Type.featOkTst && ((EventMention_Type)jcasType).casFeat_level == null)
      jcasType.jcas.throwFeatMissing("level", "de.julielab.jules.types.ace.EventMention");
    return jcasType.ll_cas.ll_getStringValue(addr, ((EventMention_Type)jcasType).casFeatCode_level);}
1281284
def recall_at_precision(y_true, y_pred, precision):
    
    y_true, y_pred = _mask_value_nan(y_true, y_pred)
    precision, recall, _ = skm.precision_recall_curve(y_true, y_pred)
    return recall[np.searchsorted(precision - precision, 0)]
1286378
public int[] optimalCwaArray() {
    int[] arr = new int[numSamples()];
    for (int recall = 1; recall <= numSamples(); recall++) {
      arr[recall - 1] = precision(recall);
    }
    return arr;
  }