Optimum input to minimise a result matrix

조회 수: 1 (최근 30일)
Alper Bilgiç
Alper Bilgiç 2020년 3월 2일
답변: Sai Bhargav Avula 2020년 3월 26일
Hi all,
I have a 100+ test that shows me a qualitiy of a process.
For one test, there is an input (4x150) and as a result there is a matrix(260x260) that shows process quality. I want to minimize the result matrix(minimum is desired, means more quality).
To improve result matrix, I want to develop an algorithm that process all 100+ test data with input and output and show me best input for desired result(minimum matrix).
Is it possible, which tool should I use ?
I know the question is too generic, any help will be appreciated.
Best Regards
  댓글 수: 3
Alper Bilgiç
Alper Bilgiç 2020년 3월 2일
First, thanks a lot for the answer.
There is an image that is processed and converted to cielab colour values. For homogenity, I want all colour values to be same. Result matrix will be output = abs(matrix(A)-matrix(mean(A))) and it will be my result matrix. I want my output=0, so it means super homogenity.
Input are some factors that affects my colour values, homogenity.
However, there is no known mathematical model or an equation between input and output.That's why, all data I have is empirical. I have 100+ different input setup and different outputs, that's all.
I want best input setup for minimum result matrix, what I called output above.
I hope it is more clear now.
Aquatris
Aquatris 2020년 3월 3일
I am not an expert in this but you can formulate this as following using OPTI Toolbox (pretty similar in MATLAB built-in functions);
First, define your function that outputs the A matrix given the decision variables;
function A = fun(x)
% calculate your A here however you do it
A = someFunctionOfX;
end
Then, in the script you define;
Ades = [...]; % desired values of A
x0 = [...]; % initial guess for x
Opt = opti('fun',@fun,'ydata',ydata,'x0',x0); % Create OPTI Object
% Solve the NLS (nonlinear least-square problem (min||Ades-A||_2)
[x,fval,exitflag,info] = solve(Opt)
Then, if things go smoothly, you will obtain the x that would give you the desired A. Try to initiate the optimization using different x0 if you do not get good results in your first try. Or formulate the problem differently to use different solvers.
Hope this helps.

댓글을 달려면 로그인하십시오.

답변 (1개)

Sai Bhargav Avula
Sai Bhargav Avula 2020년 3월 26일
Hi,
Adding Aquatris answer, you can also try fmincon and least squares fitting and formulate your problem accordingly.
Hope this helps!

카테고리

Help CenterFile Exchange에서 Least Squares에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by