Ejemplo n.º 1
0
        private double checkPreciseComparison(Signature first, Signature second, double max, double std)
        {
            const double        TOLLERANCE = 0.05;
            const double        SLOPE      = 0.008;
            DynamicTimeWrapping dtw        = new DynamicTimeWrapping();
            var result    = dtw.calcSimilarity(first, second);
            var threshold = max + TOLLERANCE * std;
            var logit     = 1.0 / (1.0 + Math.Exp(-SLOPE * (threshold - result)));

            //Debug.WriteLine("Lkogit to " + logit);
            return(logit);
        }
Ejemplo n.º 2
0
        private double checkPreciseComparisonByJA(Signature first, Signature second, double treshold)
        {
            DynamicTimeWrapping dtw = new DynamicTimeWrapping();
            var result = dtw.calcSimilarity(first, second);
            //Debug.WriteLine(result);

            double temp = 0.0;

            if (result <= treshold)
            {
                temp = 1.0;
            }
            else
            {
                temp = 1.0 - (Math.Abs((treshold - result) / treshold));
            }
            if (temp < 0)
            {
                return(0.0);
            }

            return(temp);
        }