function [TY] = ELM_AE_Reconstruct(testP, model) stack = model.stack; HN = model.HN; sigscale = model.sigscale; no_Layers = model.no_Layers; InputDataLayer = testP; for i=1:1:no_Layers tempH_test=(stack{i}.w)*(InputDataLayer); if HN(i+1) == HN(i) InputDataLayer = tempH_test; else InputDataLayer = 1 ./ (1 + exp(-sigscale(i)*tempH_test)); end clear tempH_test; end TY=(InputDataLayer' * stack{no_Layers+1}.w)'; %TY: the actual output of the testing data end