Esempio n. 1
0
        public List <double[]> Fit()
        {
            var            vec     = new List <double[]>();
            ARMAFoundation ar_math = new ARMAFoundation();
            var            armaCoe = ar_math.computeARMACoe(this.data, this.p, this.q);

            var arCoe = new double[this.p + 1];

            for (int i = 0; i < arCoe.Length; i++)
            {
                arCoe[i] = armaCoe[i];
            }

            var maCoe = new double[this.q + 1];

            for (int i = 0; i < maCoe.Length; i++)
            {
                maCoe[i] = armaCoe[i + this.p + 1];
            }

            //aggregate coefficients
            vec.Add(arCoe);
            vec.Add(maCoe);

            return(vec);
        }