close all
clear all
clear screen
clc
%%%this ANN architecture is based on minimum value of root mean square
%%%error IN TESTING PEROID
%%%%in data, all data is mean monthly with following composition, the data
%%%%of indus river was from 01.01.2027-31.12.2066
%%Input data is of:
%%Dasu Series Inflows Volume (1969-2008) on daily basis at Besham Qila (m3/day)=(1,:)
%%Dasu Series outflow Volume on daily basis from Dasu Dam (m3/day)=(2,:);
%%%%given by dam operation engineer
%% Dasu Reservoir Capacity at time t(t) in (m3/day) =(3,:); obtained from area capacity elevation curve, reservoir operation level were given by dam operation engineer
%% Dasu Reservoir Capacity at previous time t(t-1) in (m3/day)=(4,:);
%%Target is of:
%%Sediment Retained in the Reservoir (Dasu Reservoir) in (m3/day) =(5,:) %%
%%Use HEC-RAS 1-D model to obtained sediment retained within the resevoir
%%area
%%%%%%Indus River Data
%%Indus River data is with the name of 'Rdata
%%%%%%%%%%%%%%%%%%%%%%%%%%
load('Rdata');
input=Rdata(1:4,:);
target=Rdata(5,:);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Prefix'F' means final of each
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% property
%%%%To store thing which run during whole simulation process%%%
%%FF means function final output
FBest_Solution=[];
FBest_output=[];
FBest_Result_Ts_target=[];
FBest_Result_Ts_output=[];
FBest_Result_Tr_target=[];
FBest_Result_Tr_output=[];
FBest_Result_V_target=[];
FBest_Result_V_output=[];
%STORING OF COUNTER CHECK RESULTS
%%%%STORE COUNTER SOLUTION RESULTS
FBest_Solution_CC=[];
%overall
FBest_output_CC=[];
%training
FBest_Result_Tr_target_CC=[];
FBest_Result_Tr_output_CC=[];
%testing
FBest_Result_Ts_target_CC=[];
FBest_Result_Ts_output_CC=[];
%validation
FBest_Result_V_target_CC=[];
FBest_Result_V_output_CC=[];
% % %%%Description about coulumns of Cross validation solution
% % %%%Corresponding to Min RMSE of Testing, BestLayers_Combination=(:,1:2);
%
% %%%%Corresponding to Min RMSE of Testing, training regression=(:,3)
% % %%%Corresponding to Min RMSE of Testing, training RMSE=(:,4);
% % %%%Corresponding to Min RMSE of Testing, training MAE=(:,5);
%
% % %%%Corresponding to Min RMSE of Testing, testing regression=(:,6)
% % %%%Corresponding to Min RMSE of Testing, testing RMSE=(:,7);
% % %%%Corresponding to Min RMSE of Testing, testing MAE=(:,8);
%
%
% % %%%Corresponding to Min RMSE of Testing, validation regression=(:,9)
% % %%%Corresponding to Min RMSE of Testing, validation RMSE=(:,10);
% % %%%Corresponding to Min RMSE of Testing, validation MAE=(:,11);
%
%
% % %%%Corresponding to Min RMSE of Testing, over all regression=(:,12);
% % %%%Corresponding to Min RMSE of Testing, Over all RMSE=(:,13);
% % %%%Corresponding to Min RMSE of Testing, Over all MAE=(:,14);
%%% EXECUSION OF PROGRAMME WITH DIFFERENT TRANSFER FUNCTION IN
% % % HIDDEN LAYER-1 HIDDEN LAYER-1 OUTPUTLAYER
% % % % Logsig, Logsig, Pureline =(1,;)
% % % Tansig, Tansig, Pureline =(2,;)
% % % Radbas, Radbas, Pureline =(3,;)
% % % Logsig, Tansig, Purelin =(4,;)
% % % Logsig, Radbas, Purelin =(5,;)
% % % Tansig, Radbas, Purelin =(6,;)
% % % Radbas, Logsig, Purelin =(7,;)
% % % Radbas, Tansig, Pureline =(8,;)
% % % Logsig, Logsig, Logsig =(9,;)
% % % Logsig, Tansig, Logisg =(10,;)
% % % Logsig, Radbas, Logsig =(11,;)
% % % Logsig, Radbas, Tansig =(12,;)
% % % Logsig, Tansig, Radbas =(13,;)
% % % Tansig, Tansig, Radbas =(14,;)
% % % Tansig, Logsig, Radbas =(15,;)
% % % Tansig, Tansig, Radbas =(16,;)
% % % Tansig, Tansig, Tansig =(17,;)
% % % Radbas, Radbas, Radbas =(18,;)
% % % Radbas, Logsig, Radbas =(19,;)
% % % Radbas, Logsig, Tansig =(20,;)
%%%Loop to test and run the network with different transfer and training functions
for TF=1:3
FBestLayers_Combination=[];
%%%Overall%%%%
F_O_RMSE=[];
F_O_MAE=[];
FOverallRegression=[];
Foutput=[];
%%%%Testing%%%%
F_Ts_RMSE=[];
F_Ts_MAE=[];
FTesting_Regression=[];
F_Ts_target=[];
F_Ts_output=[];
%%%Training%%%%
F_Tr_RMSE=[];
F_Tr_MAE=[];
FTraining_Regression=[];
F_Tr_target=[];
F_Tr_output=[];
%%%%%Validation%%%%
F_V_RMSE=[];
F_V_MAE=[];
FValidation_Regression=[];
F_V_target=[];
F_V_output=[];
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%ANNRT means ANN Running Time, i mean how much time i run it, 2 times or 3
%%time or more times
%%%to accumulate each output for determination of rmse
%
%
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Prefix'F' means final of each
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% property
% FBestLayers_Combination=[];
% FRegression=[];
% FTraining_Max_Regression=[];
% FTesting_Max_Regression=[];
% FValidation_Max_Regression=[];
% FRMSE=[];
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %%ANNRT means ANN Running Time, i mean how much time i run it, 2 times or 3
% %%time or more times
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Prefix'F' means final of each
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% property
% %%%%To store thing which run during whole simulation process%%%
% FBestLayers_Combination=[];
%
% %%%Overall%%%%
% F_O_RMSE=[];
% F_O_MAE=[];
% FOverallRegression=[];
% Foutput=[];
%
%
% %%%%Testing%%%%
% F_Ts_RMSE=[];
% F_Ts_MAE=[];
% FTesting_Regression=[];
%
% %%%Training%%%%
% F_Tr_RMSE=[];
% F_Tr_MAE=[];
% FTraining_Regression=[];
%
% %%%%%Validation%%%%
% F_V_RMSE=[];
% F_V_MAE=[];
% FValidation_Regression=[];
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%