Beispiel #1
0
        /// <summary>
        /// Finds the unidimensional criterion that maximizes accuracy for detecting the target category in a sample.
        /// </summary>
        /// <param name="targetCat">The target category.</param>
        /// <param name="cat">The category labels for each datum in the sample.</param>
        /// <param name="x">The univariate value for each datum in the sample.</param>
        /// <param name="idx">The index into x[.] and cat[.] which rank-orders the sample in terms of increasing x.</param>
        /// <param name="catWeight">The weight of each category on the accuracy.</param>
        /// <returns>The unidimensional criterion.</returns>
        public static UniCrit MaximumAccuracy(int targetCat, byte[] cat, float[] x, int[] idx, double[] catWeight)
        {
            UniCrit output = new UniCrit();

            output.MaximizeAccuracy(targetCat, cat, x, idx, catWeight);
            return(output);
        }