public EstimationResult Estimate(IEnumerable <IDateValue> dateValues) { var series = new TimeSeries(); dateValues.ForEach(x => series.Add(x.Date, x.Value, true)); armaModel.SetInput(0, series, null); armaModel.FitByMLE(200, 100, 0, null); armaModel.ComputeResidualsAndOutputs(); var result = armaModel.GetOutput(3) as TimeSeries; return(EstimationResult.Create(result[0], this)); }
protected override TimeSeries _BuildOutput(TimeSeries simulatedData, object userState = null) { ARMAModel model = new ARMAModel(mAROrder, mMAOrder); model.SetInput(0, simulatedData, null); //Maximum Likelihood Estimation model.FitByMLE(mNumberIterLDS, mNumberIterOpt, 0, null); // first param is # low discrepancy sequence iterations, should be at least about 200 // second param is # standard optimizer iterations, should be at least about 100 //Compute the residuals model.ComputeResidualsAndOutputs(); //model1.GetOutputName(3); //model1.Description; //Get the predicted values return(model.GetOutput(3) as TimeSeries); }