1
$\begingroup$

I have a linear model that goes as 0.1*x1 + 0.8*x2 + 3.4*x3 + 5.0*x4 + c and this linear model was generated by using a Linear Regression.

  • MAE is ~ 0.4
  • MSE is ~ 0.6
  • R$^{2}$ score is 85.

The goal I want to achieve here is to optimize this function i.e. to find the right values for x1, x2, x3 and x4, by given constraints such as 30 < x1 < 45, 55 < x2 < 60, etc., so the final number of the model would be 150 or 0.1*x1 + 0.8*x2 + 3.4*x3 + 5.0*x4 + c = 150.

I did a small research and it seems that one of the algorithms that does this kind of a linear optimization is Simplex.

However, I'm a total beginner when it comes to this and the research I did showed me only methods for either minimization or maximization. What is the right term for this kind of a problem? If anyone knows a similar example as in my case, could you share it? Also, if someone has solved a problems like this in the past, would you be kind to suggest other methods for optimizing my linear problem that work well?

$\endgroup$
0

2 Answers 2

1
$\begingroup$

I think the term you are looking for is "linear programming".

The constraints you provided as an example are too broad, and they lead to an infinite number of solutions. However, you can play with Wolfram Alpha's linear programming solver to input your actual constraints to check what it gives you.

$\endgroup$
1
$\begingroup$

I would recommend starting to explore Pyomo on Python or JuMP on Julia for solving linear programming problems. Those modeling languages provide a user-friendly interface and offer various solver options to solve linear programming problems.

Personally I suggest JuMP because I think its easier to understand: https://jump.dev/JuMP.jl/stable/tutorials/getting_started/getting_started_with_JuMP/#An-example.

The best part is you don't need to know anything about nor implement a Simplex or another algorithm to obtain optimal solutions to this kind of problem. You could look for tutorials on the internet of how to use those languages.

However, if you are curious, exploring the field of Operations Research, particularly the book "Introduction to Operations Research" by Hillier and Lieberman, can be an excellent way to start learning about.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.