@Hidd_1 "I found a function that fitt the surface with R2 = 0.92, do you have any tips how can I improve it?" About this problem, you may try this, here's the result: R-squared: 0.999089
RMSE: 0.1797
MAE: 0.1202
The fitted surface match your data quite well.
The model I used is a neural net, and its mathematical model is just lots of "weighted sigmoid function".
Notation:
is point-wise sigmoid function, and
are weight matrices and bias vectors The neural net perform the following operation;
Neural nets are universal approximator, so if you want further improvement, use a larger net, but be careful of overfitting.
output(count)=Inter_cubic(count);
NN.InputAutoScaling='on'; NN.LabelAutoScaling='on';
NN.ActivationFunction='Sigmoid';
LayerStruct=[InSize,5,5,5,OutSize];
NN=Initialization(LayerStruct,NN);
NN=OptimizationSolver(input,output,NN,option);
R=FittingReport(input,output,NN);
SST=sum((output-mean(output)).^2);
SSE=sum(R.ErrorVector.^2);
[Xmesh,Ymesh]=meshgrid(X,Y);
pMatrix=reshape(p,size(Z,1),size(Z,2));
scatter3(input(1,:),input(2,:),output,'.')
s=surf(Xmesh,Ymesh,pMatrix);
legend('data point','fitted surface')