section-engineering-education / engineering-education

“Section's Engineering Education (EngEd) Program is dedicated to offering a unique quality community experience for computer science university students."
Apache License 2.0
363 stars 889 forks source link

Getting Started with Simplex Optimization Algorithm in Machine Learning #5602

Closed Daniel695 closed 2 years ago

Daniel695 commented 2 years ago

NOTE: All 1st-time contributors should know Topic approval and PR submission does NOT guarantee your Topic/Article will be published. Our team of Peer Reviewers and Content Moderators will review all PRs that come in to make sure they adhere to the standard of quality we expect from the EngEd community.

We expect all community memebers to go through provided examples, resources, and previously published material before submitting content. As a rule of thumb, please only submit articles (pull requests) that are complete, formatted correctly, and include a fully polished article (ready to be published and error free).

All revisions and edits should be completed on your own forked repo (as to not take up room in the queue). Any PR that is submitted incomplete (meaning not ready to be published as is) will be closed. A PR being closed does NOT mean the article can not be published (or fixed) it simply means that the edits, revisions, and fixes will happen outside of the queue.

Topic Suggestion

Enter topic suggestion here...

Pre-submission advice

By following all our pre-submission advice and reviewing our Resources folder, you will maximise your chances of your topic being approved.

We ask that you please be patient as our team works through approving and publishing all articles/tutorials in a timely manner.

Allow 1-3 days for a topic to be reviewed and/or approved - allow 3-7 days for an articles to be reviewed and/or published (subject to vary depending on volume and/or backlog of articles).

Be sure to visit our Resources Page for tools, resources, and example articles that will help you propose and write a successful article.

Please ensure that you have only one open issue + linked pull request at a time. This will ensure that we complete the article in a timely manner from inception to publishing.)

We tend to stray away or tend not to publish reviews/comparisons of commercial product offerings.

Writing sample(s):

Include any links or writing samples - to help our team better gauge your writing quality.

Proposal Submission

Getting Started with Simplex Optimization Algorithm in Machine Learning

Use keyword research to improve your article's SEO.

Proposed article introduction

The simplex method is one of the Convex Optimization machine learning methods and is used for solving a linear programming problem using the slack variable, the tableau, and a pivot variable as means to finding the optimal solution to an optimization problem.

To solve a linear programming model using the Simplex algorithm, We follow the following steps:

In this article, we shall break down the simplex method into the above steps and follow a real problem throughout our discussion to solve a linear programming problem. Later, we shall leverage a python library called scipy that contains an optimization function, and we shall implement the problem we shall have solved above and see if we really get the same answer. Again the trick is on how we present the matrices we fit the python function. We might miss the format and end up obtaining a totally wrong output. We shall learn the way we normally represent these matrices in this article.

Key takeaways

By the end of the session the reader will have a good understanding of;

  1. What is the Simplex algorithm
  2. How to set up an optimization problem for Simplex method
  3. How the Simplex algorithm work(all steps until we have a an optimal solution)
  4. How Simplex algorithm is implemented in python

    Article quality

    As the real-world problems are only in the problem statement form and not set up for solving, this article will teach how to formulate the optimization problem from the problem statement so as to ensure we have the correct setup for the Simplex method. This might sound like an easy task, but trust me, formulating an optimization problem is not straightforward. For example, one might know all the steps for solving a Simplex method problem and not know how to formulate a correct optimization problem. Due to this, the learner ends up optimizing the wrong function, and as a result, the final answer is not reliable.

Many articles online teach how the simplex method works only using an already formulated problem. This is because it's easy to do so, but setting up an optimization problem from the problem statement is not a straightforward task. So they chose to leave it in the hands of the learners. When the learner comes across such an unstructured problem, it becomes highly challenging for them and even unable to present the problem in the desired manner to get started. What makes this article different is that the learner will be taught how to solve a simplex method and a clever way to formulate optimization functions from the problem statement so that they do not end up optimizing a wrong function. In this article, we are not going to optimize an already set up problem; instead, we shall set up the problem of our own so that the learner can know how to do so by themselves in future problems.

References

N/A

Conclusion

Finally, remove the Pre-Submission advice section and all our blockquoted notes as you fill in the form before you submit. We look forwarding to reviewing your topic suggestion.

Templates to use as guides

ahmadmardeni1 commented 2 years ago

Sounds like a helpful topic - let's please be sure it adds value beyond what is in any official docs and/or what is covered in other blog sites. (the articles should go beyond a basic explanation - and it is always best to reference any EngEd article and build upon it). @Daniel695

Please be attentive to grammar/readability and make sure that you put your article through a thorough editing review prior to submitting it for final approval. (There are some great free tools that we reference in EngEd resources.) ANY ARTICLE SUBMITTED WITH GLARING ERRORS WILL BE IMMEDIATELY CLOSED.

Please be sure to double-check that it does not overlap with any existing EngEd articles, articles on other blog sites, or any incoming EngEd topic suggestions (if you haven't already) to avoid any potential article closure, please reference any relevant EngEd articles in yours. - Approved