how to get aic from gapfill function?
조회 수: 1(최근 30일)
How do I get the values of aic for MATLAB gapfill function?
So taking the example here: https://uk.mathworks.com/help/signal/ref/fillgaps.html
gn = 3;
mt = mtlb;
gl = randi([300 600],gn,1);
for kj = 1:gn
mt(kj*1000+randi(100)+(1:gl(kj))) = NaN;
lb = fillgaps(mt,4001,'aic');
How do I get the aic values that were used to optimize for model as outputs? How do I get the mae and rmse of the accuracy of each prediction of missing values?
I have tried a for loop of model order but it works out very slow.
lb = fillgaps(mt,4001,order(i));
The following function is required for rmse
% Function to calculate root mean square error from a data vector or matrix
% and the corresponding estimates.
% Usage: r=rmse(data,estimate)
% Note: data and estimates have to be of same size
% Example: r=rmse(randn(100,100),randn(100,100));
% delete records with NaNs in both datasets first
I = ~isnan(data) & ~isnan(estimate);
data = data(I); estimate = estimate(I);