ANN_OIPDERIV - Function to estimate input variables influence on one output variable based on ANN partial derivative
The activation function of the hidden layer is the hyperbolic tangent and the identity function for the output layer.
The network should have only ONE output.
The values of CI indicates the relative importance of inputs into output calculation.
// INPUT t=1:0.03:10; // Two variables : first can explain output values, second is only a random sample : IN = [sin(t)./(t+%eps)+rand(1,size(t,2))/10;rand(1,size(t,2))/2]; TARG= [sin(t)+rand(1,size(t,2))/20]; // Network calibration (10 repetitions, 30 epochs, 4 hidden neurons) Nhid=4; ChemRAND = 'C:\_JUL\!UTILS\sources\RAND.txt'; [W,OUT,C,RMSE,IN_Stat,TARG_Stat]=ANN_REPET(IN,TARG,Nhid,ChemRAND,10,30); [CI,PD]=ANN_OIPDERIV(IN,Nhid,ANN_CONV_W(W(:,3),size(IN,1),Nhid,1,'vector')); // Here : // CI(1) = 857.57 // CI(2) = 1.16 >> Second variable has no impact on output variable // Results subplot(2,1,1),plot2d(t,[TARG' OUT(:,3)]);legends(['Target' 'Network output'],1:2,'lr'); subplot(2,1,2),plot2d(t,PD');legends(['Part. der. with resp. to 1st var.' 'Part. der. with resp. to 2nd var.'],1:2,'ul');
ANN_CONV_W , ANN_JACOB , ANN_NORM , ANN_LMBR , ANN_SIM ,