Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the exact difference between a model and an algorithm?

What is the exact difference between a model and an algorithm?

Let us take as an example logistic regression. Is logistic regression an model or an algorithm, and why?

like image 331
Nages Avatar asked Jun 29 '17 11:06

Nages


Video Answer


2 Answers

An algorithm is the general approach you will take. The model is what you get when you run the algorithm over your training data and what you use to make predictions on new data.

You can generate a new model with the same algorithm but with different data, or you can get a new model from the same data but with a different algorithm.

like image 56
Gurukul Analytics Avatar answered Oct 12 '22 05:10

Gurukul Analytics


Do you like Ferrari? They have a very nice 812 Superfast model, but they also have other models. Every model is different and leads to a different behavior and experience.

Think of a model more like a mathematical description of a system. An equation that gives you a general way how to achieve your vision or an idea. For example: enter image description here is a model function that yields a straight line (see least squares linear regression).

Whereas an algorithm is a set of actions (or rules) that you need to perform in order to implement your vision. For example, the famous minimax algorithm often used in AI game players that have to choose the next move.

To finish my above idea, imagine that a Ferrari model is an already existing idea on a paper and an algorithm is a robot in a factory that performs its set of programmed actions. It is sequence of actions. This is naively speaking of course, but hopefully you get the idea.

like image 33
Ivan Sivak Avatar answered Oct 12 '22 05:10

Ivan Sivak