Ejemplo n.º 1
0
        private void prepareDtw()
        {
            List <double>       dtws          = new List <double>();
            DynamicTimeWrapping dtwCalculator = new DynamicTimeWrapping();

            for (int i = 0; i < this.sign.Count; i++)
            {
                for (int j = 0; j <= i; j++)
                {
                    dtws.Add(dtwCalculator.calcSimilarity(this.sign[i], this.sign[j]));
                }
            }

            this.DtwMax = dtws.Max();
            this.DtwStd = calcStd(dtws.Average(), dtws);
        }
Ejemplo n.º 2
0
        //private double calcTotalRatioForEachStroke_SD(List<List<double>> list)
        //{
        //    double temp = 0;
        //    double[][] array = list.Select(a => a.ToArray()).ToArray();



        //    return temp;
        //}

        private double calcPreciseComparison_SD()
        {
            List <double> forDTW = new List <double>();

            for (int i = 0; i < sign.Count; i++)
            {
                for (int j = i + 1; j < sign.Count; j++)
                {
                    if (i != j)
                    {
                        DynamicTimeWrapping dtw = new DynamicTimeWrapping();
                        forDTW.Add(dtw.calcSimilarity(sign[j], sign[i]));
                    }
                }
            }

            return(calc_SD(forDTW, true));
        }