MATLAB Answers

Goal seek two variables with unusual function (contains summation and data-dependent)

1 ビュー (過去 30 日間)
Abdul Kadir Alhamid
Abdul Kadir Alhamid 2020 年 8 月 10 日
Hi there!
I think I have a bit simple and interesting question but might take a while to look at the code below. I am doing a regression using RBF neural network. I have to change the r_slr and r_depth variable accordingly so that the root mean square error between the data and the regression estimation is 0. Is there any way to make a 'goalseek' as in excel for these two variables and for such unusual 3D function below? The function depends on the data by the way, x and y is the input and z is the output.
x_data=x_data'; %1600 x 1 double, given data input
y_data=y_data'; %1600 x 1 double, given data input
z_data=z_data'; %1600 x 1 double, given data output
phi=zeros(size(x_data,1),size(y_data,1)); %1600 x 1600 double
r_slr=0.9222; %Shape parameter in x, object of interest, want to adjust this
r_depth=2.0417; %Shape parameter in y, want to adjust this as well
%Making phi matrix
for i=1:size(phi,1)
for j=1:size(phi,2)
%Making w array
w=(phi*phi')\phi'*z_data; %1600 x 1 double
x_est=x_data; %since this is input, so it's the same
y_est=y_data; %this is the same as well
%below is the function
for i=1:size(z,1)
%the function above depends on x_data and y_data, also has a summation for every point of estimation.
RMSE = sqrt(mean((z_data - z_est).^2)); %the goal is to make this as minimum as possible (0 if possible)
Thank you

  0 件のコメント


回答 (0 件)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by