Exemplo n.º 1
0
        public StatForm(Chart chart, string functionName, double pMin = -1, double pMax = 1)
        {
            InitializeComponent();
            this.chart = chart;

            Series series = chart.Series.FindByName(functionName);


            chartAutocor.ChartAreas[0].AxisX.MajorGrid.Enabled = false;
            chartAutocor.ChartAreas[0].AxisY.MajorGrid.Enabled = false;
            chartAutocor.ChartAreas[0].AxisX.Crossing          = 0;
            chartAutocor.ChartAreas[0].AxisY.Crossing          = 0;

            lbMean.Text        = Statistics.ExpectedValue(series.Points).ToString();
            lbMeanSq.Text      = Statistics.MeanSquare(series.Points).ToString();
            lbMeanSqEr.Text    = Statistics.MeanSquareError(series.Points).ToString();
            lbVariance.Text    = Statistics.Variance(series.Points).ToString();
            lbStandartDev.Text = Statistics.StandartDeviation(series.Points).ToString();
            lbMom3.Text        = Statistics.CentralMoment(series.Points, 3).ToString();
            lbMom4.Text        = Statistics.CentralMoment(series.Points, 4).ToString();
            mRndData           = CreateRndData(functionName, pMin, pMax);
            DrawAutocorrelationChart(chartAutocor, functionName, series.Points.Count);
            DrawCrossCorrelationChart(chartCrosscor, functionName, series.Points.Count);

            lbSkewness.Text = Statistics.Skewness(series.Points).ToString();
            lbKurtosis.Text = Statistics.Kurtosis(series.Points).ToString();


            double[] y = Statistics.Density(series.Points, 30);
            DrawDensity(y, functionName);

            lbIsStatic.Text = Statistics.isStatic(series.Points).ToString();
        }
Exemplo n.º 2
0
        public void mCutSigma(double pC)
        {
            double expectedVal = Statistics.ExpectedValue(mValues);
            double sigma       = Statistics.StandartDeviation(mValues);
            double s_count     = pC;

            mFunc = x => Math.Abs(mValues[x]) < expectedVal + s_count * sigma ? mValues[x] :expectedVal;
        }
Exemplo n.º 3
0
        public void mAntiSpike(double pC)
        {
            double expectedVal = Statistics.ExpectedValue(mValues);
            double sigma       = Statistics.StandartDeviation(mValues);
            double s_count     = pC;

            mFunc = x => Math.Abs(mValues[x]) < expectedVal + s_count * sigma ? mValues[x] : x == 0 ? expectedVal : x == mValues.Length ? expectedVal : ((mValues[x - 1] + mValues[x + 1]) / 2);
        }
Exemplo n.º 4
0
        public void mAntiShift()
        {
            double expectedVal = Statistics.ExpectedValue(mValues);

            mFunc = x => mValues[x] - expectedVal;
        }