Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where does machine learning algorithme store the result?

Tags:

I think this is kind of "blasphemy" for someone who comes from the AI world, but since I come from the world where we program and get a result, and there is the concept of storing something un memory, here is my question :

Machine learning works by iterations, the more there are iterations, the best our algorithm becomes, but after those iterations, there is a result stored somewhere ? because if I think as a programmer, if I re-run the program, I must store previous results somewhere, or they will be overwritten ? or I need to use an array for example to store my results.

For example, if I train my image recognition algorithme with a bunch of cats pictures data sets, what are the variables I need to add to my algorithme, so if I use it with an image library, it will always success everytime I find a cat, but I will use what? since there is nothing saved for my next step ?

All videos and tutorials I have seen, they only draw a graph as decision making visualy, and not applying something to use it in future program ?

For example, this example, kNN is used to teach how to detect a written digit, but where is the explicit value to use ?

https://github.com/aymericdamien/TensorFlow-Examples/blob/master/examples/2_BasicModels/nearest_neighbor.py

NB: people clicking on close request or downvoting at least give a reason.

like image 816
Abdelouahab Avatar asked Jul 25 '17 15:07

Abdelouahab


People also ask

Where is data stored for machine learning?

Given the various trade-offs, some machine learning/AI implementations will use a mix of platform types, storing the majority of data, for example, on an object store, then moving the active data set to a high-performance file system as part of the training process.

How are machine learning models stored?

Pickle is one of the most popular ways to serialize objects in Python; You can use Pickle to serialize your trained machine learning model and save it to a file. At a later time or in another script, you can deserialize the file to access the trained model and use it to make predictions.

Where are trained ML models stored?

It makes sense to store your data where the model training will occur and the results will be served: on-premise model training and serving will be best suited for on-premise data especially if the data is large, while data stored in cloud storage systems like GCS, AWS S3, or Azure storage should be matched with cloud ...

What is the result of a machine learning algorithm?

Machine Learning algorithms can predict patterns based on previous experiences. The overarching practice of Machine Learning includes both robotics (dealing with the real world) and the processing of data (the computer's equivalent of thinking).


2 Answers

the more there are iterations, the best our algorithm becomes, but after those iterations, there is a result stored somewhere

What you're alluding to here is the optimization part.

However to optimize a model, we first have to represent it.

For example, if I'm creating a very simple linear model to predict house prices using its surface in square meters I might go for this model:

price = a * surface + b

That's the representation.

Now that you have represented the model, you want to optimize it, i.e. find the params a and b that minimize the prediction error.

there is a result stored somewhere ?

In the above, we say that we have learned the params or weights a and b.

That's what you keep, the weights which come from optimization (also called training) and of course the model itself.

like image 193
bakkal Avatar answered Oct 11 '22 13:10

bakkal


I think there is some confusion. Let's clear it up.

Machine Learning models usually have parameters, and these parameters are trainable. This means a training algorithm find the "right" values of these parameters in order to properly work for a given task. This is the learning part. The actual parameter values are "inferred" from training data.

What you would call the result of the training process is a model. The model is represented by formulas with parameters, and these parameters must be stored. Typically when you use a ML/DL framework (like scikit-learn or Keras), the parameters are stored alongside some information about the type of model, so it can be reconstructed at runtime.

like image 42
Dr. Snoopy Avatar answered Oct 11 '22 12:10

Dr. Snoopy