docstr: ...Test of ProxSlope.value
          
docstr_tok: ["...","Test","of","ProxSlope.value"]
code: def test_ProxSlope_value(self):
      """...Test of ProxSlope.value"""
      np.random.seed(1337)
      n_samples = 5000
      n_outliers = int(0.1 * n_samples)
      interc0 = np.zeros(n_samples)
      interc0[:n_outliers] = self.get_coeffs_strong(n_outliers)
      y = (interc0 + 3 * np.random.randn(interc0.shape[0])).astype(
          self.dtype
      )
  
      fdr = 0.6
      strength = 2.5
      prox = ProxSlope(strength=strength, fdr=fdr).astype(self.dtype)
      prox_value = prox.value(y)
  
      weights = self.get_weights_bh(strength, fdr, size=y.shape[0])
      y_abs = np.abs(y)
      sub_y = y_abs
      value = sub_y[np.argsort(-sub_y)].dot(weights)
      places = 4
  
      self.assertAlmostEqual(prox_value, value, delta=value * 1e-7)
  
      strength = 7.4
      fdr = 0.2
      prox.strength = strength
      prox.fdr = fdr
      prox_value = prox.value(y)
  
      weights = self.get_weights_bh(strength, fdr, size=y.shape[0])
      y_abs = np.abs(y)
      sub_y = y_abs
      value = sub_y[np.argsort(-sub_y)].dot(weights)
      self.assertAlmostEqual(prox_value, value, delta=value * 1e-7)
  
      prox.range = (300, 3000)
      fdr = 0.6
      strength = 2.5
      prox.strength = strength
      prox.fdr = fdr
      prox_value = prox.value(y)
  
      a, b = prox.range
      size = b - a
      weights = self.get_weights_bh(strength, fdr, size=size)
      y_abs = np.abs(y[a:b])
      sub_y = y_abs
      value = sub_y[np.argsort(-sub_y)].dot(weights)
      self.assertAlmostEqual(prox_value, value, delta=value * 1e-7)
  
      prox.range = (300, 3000)
      strength = 7.4
      fdr = 0.2
      prox.strength = strength
      prox.fdr = fdr
      prox_value = prox.value(y)
  
      a, b = prox.range
      size = b - a
      weights = self.get_weights_bh(strength, fdr, size=size)
      y_abs = np.abs(y[a:b])
      sub_y = y_abs
      value = sub_y[np.argsort(-sub_y)].dot(weights)
      self.assertAlmostEqual(prox_value, value, delta=value * 1e-7)
  
imports: import unittest
  import numpy
  from scipy.stats import norm
  from tick.prox import ProxSlope
  from tick.prox.tests.prox import TestProx
label_desc: Use image node_id 6 for calling the ProxSlopeTest obj's underlying member method code with example usage: obj.test_ProxSlope_value() without return types