Instantiates and computes the RMSE value. Prior to running this, there is
no valid value.
774025
@Override
    public void compute() {
        if (!Double.isNaN(getValue())) {
            // since the data cannot change, avoid re-doing the calculations
            return;
        }
        iniCompute();

        Map<U, List<Double>> data = processDataAsPredictedDifferencesToTest();
        int testItems = 0;
        for (U testUser : getTest().getUsers()) {
            int userItems = 0;
            double umse = 0.0;

            if (data.containsKey(testUser)) {
                for (double difference : data.get(testUser)) {
                    umse += difference * difference;
                    userItems++;
                }
            }

            testItems += userItems;
            setValue(getValue() + umse);
            if (userItems == 0) {
                umse = Double.NaN;
            } else {
                umse = Math.sqrt(umse / userItems);
            }
            getMetricPerUser().put(testUser, umse);
        }
        if (testItems == 0) {
            setValue(Double.NaN);
        } else {
            setValue(Math.sqrt(getValue() / testItems));
        }
    }
916121
protected double valueToNormalized(T value) {
        if (0 == absoluteMaxValuePrim - absoluteMinValuePrim) {
            // prevent division by zero, simply return 0.
            return 0d;
        }
        return (value.doubleValue() - absoluteMinValuePrim) / (absoluteMaxValuePrim - absoluteMinValuePrim);
    }
1163746
def rms(signal, fs):
    
    # if a signal contains a some silence, taking the RMS of the whole
    # signal will be calculated as less loud as a signal without a silent
    # period. I don't like this, so I am going to chunk the signals, and
    # take the value of the most intense chunk
    chunk_time = 0.001  # 1 ms chunk
    chunk_samps = int(chunk_time * fs)
    amps = []
    if chunk_samps > 10:
        for i in range(0, len(signal) - chunk_samps, chunk_samps):
            amps.append(np.sqrt(np.mean(pow(signal[i:i + chunk_samps], 2))))
        amps.append(np.sqrt(np.mean(pow(signal[len(signal) - chunk_samps:], 2))))
        return np.amax(amps)
    else:
        # samplerate low, just rms the whole thing
        return np.sqrt(np.mean(pow(signal, 2)))
642876
def V(self, value):
        

        if np.isscalar(value):
            self._V = np.array([[value]], dtype=float)
        else:
            self._V = value
        self._V_inv = linalg.inv(self._V)
415114
private static double getRmsd(int focusResn, int[] focusRes1, int[] focusRes2, AFPChain afpChain, Atom[] ca1, Atom[] ca2){



		Atom[] tmp1 = new Atom[focusResn];
		Atom[] tmp2 = new Atom[focusResn];

		for ( int i =0 ; i< focusResn;i++){
			tmp1[i] =       ca1[focusRes1[i]];
			tmp2[i] = (Atom)ca2[focusRes2[i]].clone();
			if (tmp1[i].getCoords() == null){
				System.err.println("tmp1 got null: " +i + " pos: " + focusRes1[i]);
			}
			if (tmp2[i].getCoords() == null){
				System.err.println("tmp1 got null: " +i + " pos: " + focusRes2[i]);
			}
			//XX
			//tmp2[i].setParent((Group) ca2[focusRes2[i]].getParent().clone());
		}
		double rmsd = 99;
		try {
			rmsd = getRmsd(tmp1,tmp2);

		} catch (Exception e){
			e.printStackTrace();
		}
		return rmsd;

	}
710203
private static void initialize()
	{
		for (int i = 0; i < 256; ++i)
		{
			long crc = i;
			for (int j = 8; j > 0; j--)
			{
				if ((crc & 1) == 1)
					crc = (crc >>> 1) ^ polynomial;
				else
					crc >>>= 1;
			}
			values[i] = crc;
		}
		init_done = true;
	}
406313
public static void checkEigenvalues() {
        DoubleMatrix A = new DoubleMatrix(new double[][]{
                    {3.0, 2.0, 0.0},
                    {2.0, 3.0, 2.0},
                    {0.0, 2.0, 3.0}
                });

        DoubleMatrix E = new DoubleMatrix(3, 1);

        NativeBlas.dsyev('N', 'U', 3, A.data, 0, 3, E.data, 0);
        check("checking existence of dsyev...", true);
    }
955872
def get_numeric_value(self, value_str, dimension = None):
        

        n = None
        i = len(value_str)
        while n is None:
            try:
                part = value_str[0:i]
                nn = float(part)
                n = nn
                s = value_str[i:]
            except ValueError:
                i = i-1


        number = n
        sym = s

        numeric_value = None

        if sym == '':
            numeric_value = number
        else:
            if sym in self.units:
                unit = self.units[sym]
                if dimension:
                    if dimension != unit.dimension and dimension != '*':
                        raise SimBuildError("Unit symbol '{0}' cannot "
                                            "be used for dimension '{1}'",
                                            sym, dimension)
                else:
                    dimension = unit.dimension

                numeric_value = (number * (10 ** unit.power) * unit.scale) + unit.offset
            else:
                raise SimBuildError("Unknown unit symbol '{0}'. Known: {1}",
                                    sym, self.units)
                                    
        #print("Have converted %s to value: %s, dimension %s"%(value_str, numeric_value, dimension))                            
        return numeric_value
256310
def rmsd_eval(rmsd_params):
    
    specification, sequence, parsed_ind, reference_pdb = rmsd_params
    model = specification(*parsed_ind)
    model.pack_new_sequences(sequence)
    ca, bb, aa = run_profit(model.pdb, reference_pdb, path1=False, path2=False)
    return bb
1134753
def value(self):
        
        load_average_range = self.max_load_average - self.min_load_average
        return (self.load_average - self.min_load_average) / load_average_range
533742
def getValue(self, unit=None):
        

        if unit or self.unit:
            r = float(self.value * UnitToValue(self.unit)) / UnitToValue(unit)
            return int(round(r)) if isinstance(self.value, int) else r
        return self.value
275324
private void minmax() {
        gmin = Double.MAX_VALUE;
        gmax = -Double.MAX_VALUE;

        for (SupportVector v : sv) {
            double g = -v.g[0];
            double a = v.alpha[0];
            if (g < gmin && a > 0.0) {
                svmin = v;
                gmin = g;
                gminindex = 0;
            }
            if (g > gmax && a < v.C) {
                svmax = v;
                gmax = g;
                gmaxindex = 0;
            }

            g = v.g[1];
            a = v.alpha[1];
            if (g < gmin && a < v.C) {
                svmin = v;
                gmin = g;
                gminindex = 1;
            }
            if (g > gmax && a > 0.0) {
                svmax = v;
                gmax = g;
                gmaxindex = 1;
            }
        }
    }
1003363
def exp_rmspe(pred:Tensor, targ:Tensor)->Rank0Tensor:
    ""
    pred,targ = flatten_check(pred,targ)
    pred, targ = torch.exp(pred), torch.exp(targ)
    pct_var = (targ - pred)/targ
    return torch.sqrt((pct_var**2).mean())
742975
def value(self):
        
        try:
            if isinstance(self.__value, Expression):
                return self.__value.value
            return self.__value
        except AttributeError:
            return 0
295645
public static double rmsd(Point3d[] x, Point3d[] y) {

		if (x.length != y.length) {
			throw new IllegalArgumentException(
					"Point arrays are not of the same length.");
		}

		double sum = 0.0;
		for (int i = 0; i < x.length; i++) {
			sum += x[i].distanceSquared(y[i]);
		}
		return Math.sqrt(sum / x.length);
	}
875163
def value(self, new_value):
        
        if self.unit != units.Undefined and new_value.unit != self.unit:
            raise AttributeError("%s must be in %s" % (
                self.__class__, self.unit))
        self._value = new_value
1353570
def value(self, value):
        
        args = (self.__ptr, int(value))
        _ec.metric_set(args)