# Use trained non linear regression model to identify variables that maximize the predicted value

I trained a non-linear regression model with 23 features. I tried to make sure the model doesn't overfit with ~0.6 r squared on validation data and with 0.75 correlation coefficient between the actual and model-predicted target values.

I would like to know if doing the following would make sense.

• Use the model to identify values of the 23 features that would maximize the predicted value:

For example, consider a model to predict house price using: avg_area_price and sqfeet then identify value of avg_are_price and sqfeet that would result in the maximum house price. Note that we may not have observed this in the data but the regression model captured the input feature to output relationship so it could identify this.

I tried to look into it and found that linear programming could help doing this for linear regression. https://stats.stackexchange.com/questions/475639/can-we-use-linear-regression-to-define-the-objective-function-in-linear-programm

I did not find anything for finding the feature values that leads to the maximum predicted value for non-linear regression model.

Can anyone help with how to do this when we have non-linear regression model?

• Do you llok for feature importance? What type of model didi you use? May 11, 2021 at 7:29
• Thank you for looking at it. I am not looking for feature importance. I want to identify what values of the features leads to the maximum prediction. For example, if we have a model to predict house price using: avg_area_price and sqfeet then identify value of avg_are_price and sqfeet that would result in the maximum house price. Note that we may not have observed this in the data but the regression model captured the input feature to output relationship so it could identify this. I have updated the question with this additional information. May 11, 2021 at 16:27
• try Python's scipy.optimize.minimize method Dec 16, 2023 at 2:59
• what do you mean by "non-linear" ? can you give its objective function ? Dec 16, 2023 at 3:11