False negative rate `fn / (fn + tp)`
978583
def fnr(y, z):
    
    tp, tn, fp, fn = contingency_table(y, z)
    return fn / (fn + tp)
251118
def p_minus_assignment(self, t):
    ''''''
    self.accu.add(Term('obs_vlabel', [self.name,"gen(\""+t[1]+"\")","-1"]))
86908
def l1_error(true, pred):
  """"""
  return tf.reduce_sum(tf.abs(true - pred)) / tf.to_float(tf.size(pred))
371837
function compareNumericWithNaNs(x, y) {
    if (!isNaN(x) && !isNaN(y))
      return x - y;
    if (isNaN(x))
      return 1;
    if (isNaN(y))
      return -1;
    return 0;
  }
941923
function boolOrFn(val, args) {
    if (typeof val == TYPE_FUNCTION) {
        return val.apply(args ? args[0] || undefined : undefined, args);
    }
    return val;
}
612711
def obfn_f(self):
        
        """

        obf = 0.0
        for i in range(self.Nb):
            obf += self.obfn_fi(self.obfn_fvar(i), i)
        return obf
140321
function bounce(t) {
  const s = 7.5625;
  const p = 2.75;
  let l;
  if (t < (1 / p)) {
    l = s * t * t;
  } else {
    if (t < (2 / p)) {
      t -= (1.5 / p);
      l = s * t * t + 0.75;
    } else {
      if (t < (2.5 / p)) {
        t -= (2.25 / p);
        l = s * t * t + 0.9375;
      } else {
        t -= (2.625 / p);
        l = s * t * t + 0.984375;
      }
    }
  }
  return l;
}
1178634
def get_false_negative(self, scalar=True):
        """"""
        ans = pd.Series(PrettyDict([(k, safe_div(np.sum(self.loc[k]) - self[k][k],
                                                 np.sum(self.sum() - self.loc[k]))) for k in self.columns]))
        if (not self._scalar_stats and not scalar) or self._num_classes != 2:
            return ans
        return ans[self._pos_label]
1096009
def F(self, x):
        
        if isinstance(x, np.ndarray):
            nfwvals = np.ones_like(x)
            inds1 = np.where(x < 1)
            inds2 = np.where(x > 1)
            nfwvals[inds1] = (1 - x[inds1] ** 2) ** -.5 * np.arctanh((1 - x[inds1] ** 2) ** .5)
            nfwvals[inds2] = (x[inds2] ** 2 - 1) ** -.5 * np.arctan((x[inds2] ** 2 - 1) ** .5)
            return nfwvals

        elif isinstance(x, float) or isinstance(x, int):
            if x == 1:
                return 1
            if x < 1:
                return (1 - x ** 2) ** -.5 * np.arctanh((1 - x ** 2) ** .5)
            else:
                return (x ** 2 - 1) ** -.5 * np.arctan((x ** 2 - 1) ** .5)
92417
def _format_value_error(self, v, e, pm=" +/- "):
        
        # If we have weird stuff
        if not _s.fun.is_a_number(v) or not _s.fun.is_a_number(e) \
            or v in [_n.inf, _n.nan, _n.NAN] or e in [_n.inf, _n.nan, _n.NAN]: 
            return str(v)+pm+str(e)
        
        # Normal values.
        try:
            sig_figs = -int(_n.floor(_n.log10(abs(e))))+1            
            return str(_n.round(v, sig_figs)) + pm + str(_n.round(e, sig_figs))

        except:
            return str(v)+pm+str(e)
18147
def negate_gate(wordlen, input='x', output='~x'):
    """"""
    neg = bitwise_negate(wordlen, input, "tmp")
    inc = inc_gate(wordlen, "tmp", output)
    return neg >> inc
506872
function negativeCoefficient(node) {
  if (NodeType.isConstant(node)) {
    node = NodeCreator.constant(0 - parseFloat(node.value));
  }
  else {
    const numeratorValue = 0 - parseFloat(node.args[0].value);
    node.args[0] = NodeCreator.constant(numeratorValue);
  }
  return node;
}
247571
function backEaseInOut (p) {
    var f;
    if(p < 0.5) {
        f = 2 * p;
        return 0.5 * (f * f * f - f * Math.sin(f * Math.PI));
    } else {
        f = (1 - (2*p - 1));
        return 0.5 * (1 - (f * f * f - f * Math.sin(f * Math.PI))) + 0.5;
    }
}
947283
function bnpBitwiseTo(a,op,r) {
var i, f, m = Math.min(a.t,this.t);
for(i = 0; i < m; ++i) r.data[i] = op(this.data[i],a.data[i]);
if(a.t < this.t) {
 f = a.s&this.DM;
 for(i = m; i < this.t; ++i) r.data[i] = op(this.data[i],f);
 r.t = this.t;
} else {
 f = this.s&this.DM;
 for(i = m; i < a.t; ++i) r.data[i] = op(f,a.data[i]);
 r.t = a.t;
}
r.s = op(this.s,a.s);
r.clamp();
}
856016
public static function mcc(int $tp, int $tn, int $fp, int $fn) : float
    {
        return ($tp * $tn - $fp * $fn)
            / (sqrt(($tp + $fp) * ($tp + $fn)
            * ($tn + $fp) * ($tn + $fn)) ?: EPSILON);
    }
675214
function ptlog(df, lowerTail) {
      return function(x) {
         var val;

         if (utils.hasNaN(x, df) || df <= 0) { return NaN; }
         val = df > x * x ?
               bratio(0.5, df / 2, x * x / (df + x * x), false, true)
             : bratio(df / 2, 0.5, 1 / (1 + x / df * x), true, true);

         if (x <= 0) { lowerTail = !lowerTail; }

         return lowerTail ? log1p(-0.5 * Math.exp(val))
                          : val - Math.log(2);
      };
   }
701307
public static void negative( InterleavedS16 input , InterleavedS16 output ) {

		output.reshape(input.width,input.height);

		int columns = input.width*input.numBands;
		if(BoofConcurrency.USE_CONCURRENT ) {
			ImplPixelMath_MT.negative(input.data, input.startIndex, input.stride,
					output.data, output.startIndex, output.stride,
					input.height, columns);
		} else {
			ImplPixelMath.negative(input.data, input.startIndex, input.stride,
					output.data, output.startIndex, output.stride,
					input.height, columns);
		}
	}