예제 #1
0
        /// <summary>
        /// Looks to see if the first enumeration of doubles is bigger than the second enumeration, using a one-tailed test.
        /// </summary>
        /// <param name="myDataAnd01Labels"></param>
        /// <param name="maxNumPermutations"></param>
        /// <param name="forceAssymptoticApprox"></param>
        /// <returns>The z score and the p-value</returns>
        public static KeyValuePair <double, double> MannWhitneyUTestOneSided(IEnumerable <double> dataAssumedToBeBigger, IEnumerable <double> dataAssumedToBeSmaller,
                                                                             int maxNumPermutations, bool forceAssymptoticApprox = false, bool neverDoExactPermutations = false, ParallelOptions parallelOptionsOrNullFor1 = null)
        {
            var asSingleLabeledList = SpecialFunctions.EnumerateAll(
                dataAssumedToBeBigger.Select(d => new KeyValuePair <double, int>(d, 1)),
                dataAssumedToBeSmaller.Select(d => new KeyValuePair <double, int>(d, 0))).ToList();

            return(MannWhitneyUTestOneSided(asSingleLabeledList, maxNumPermutations, forceAssymptoticApprox, neverDoExactPermutations, parallelOptionsOrNullFor1));
        }
예제 #2
0
 public static void CheckForCaseMismatchesInColKeys <TRowKey, TVal>(this Matrix <TRowKey, string, TVal> m, Matrix <TRowKey, string, TVal> matrices)
 {
     SpecialFunctions.EnumerateAll(m.AsSingletonEnumerable(), matrices.AsSingletonEnumerable()).CheckForCaseMismatchesInColKeys();
 }