How can I use the regression learner generated model as an objective function and constraint function in fmincon

조회 수: 2 (최근 30일)
I have 1000 data for A,p,M,S. i have to find out objective function as M= f(A,p) and constraint function as S=g(A,p). To do that i have used regression learner app. from 'generate function' option i got the trainRegressionModel.m and saved it. Then in the command line i called it as,
[model, validation RMSE]= trainRegressionModel(dataTable) ; where dataTable is my table which consists all those 1000 data of each variable.
then i can write the function as simply model.predictFcn I should be able to give the input of this function as @model.predictFcn in the space of objective function etc. in fmincon solver. as it is just like any equation like f(x,y). but fmincon is not receiving it. can not run.
Another problem is constraint function. As the condition is g(A,p) needs to be less than or equal to 20000 so i have to write another function using that model.predictFcn right? I tried. but not successful. Can anyone please help me?
In the attachment trainRegressionModel.m is curve fitting model for objective function data and trainRegressionModel2.m is for constraint function data.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Regression Tree Ensembles에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by