public static void GetPredictionExp(CartesianChart cc, double[] data, int x, double[] anal, int number)
        {
            if (analitics == null)
            {
                MessageBox.Show("Вы не анализировали временной ряд.");
            }
            Drawer pen = new Drawer(cc);

            double[] arr_predict = analitics.GetExpPrediction(data, number, 0, anal);
            pen.DrawLinerChart(arr_predict, x, "Аналитика");
            arr_data = arr_predict;
        }
        public static void GetAnaliticsExp(CartesianChart cc, DataGrid dgv, double[] data, int x, int y, double error_need)
        {
            analitics = new PredictionM();
            Drawer pen = new Drawer(cc);

            var buffer_data = data.Skip(x).Take(y - x + 1);
            int count       = 0;

            double[] buffer = new double[y - x + 1];
            foreach (var item in buffer_data)
            {
                buffer[count] = Convert.ToDouble(item);
                count++;
            }

            double alfa  = 0.3;
            double error = 0;

            arr_analitics = analitics.GetExpPrediction(buffer, 0, alfa);
            //do
            //{

            //    double sum = 0;

            //    for (int i = 0; i < buffer.Length; i++)
            //    {
            //        sum += ((buffer[i] - arr_analitics[i])/ buffer[i]) * 100;
            //    }
            //    error = sum / buffer.Length;

            //    List<Darbin> table = new List<Darbin>();
            //    table.Add(new Darbin { N = alfa.ToString(), D = Math.Round(error, 2) });
            //    dgv.Items.Add(table);
            //    alfa += 0.1;

            //} while (error > error_need);
            pen.DrawLinerChart(arr_analitics, x, "Аналитика");
            Darbins = PredictionUpdate.darbins;
        }