Where do Machine Learning Algorithms store their learnt data?

I do not know whether what I’m asking is right or wrong, but I’m confused,

Considering I’ve written a ML Algorithm to detect faces on a computer A, and I train it with around a million images now according to theory the algorithm has learnt to detect faces,

now if I host the algorithm online will it forget all the data that I had trained it with, and I’ve start all over again? or will it be the same?

As you’ve written the algorithm, I would imagine you know where it stores its data! Usually it would be in some kind of database, and when you host your algorithm online, wont you be storing the database online along with it.

Yes, you’re talking about training dataset, right? Or the results database?

If you’ve trained it with a set of data, A, it’s holding it’s learned values somewhere - where, depends on your code.

Theoretically, if you moved the algorithm without its learned values to a new place, and retrained it with the same set of data, it should learn the same set of values again. (Whether it does or not is somewhat dependent on how you select initial values)

That said, the Algorithm determines how the Model sets its values (or adjusts them with new data), the Model should be carrying around the values somewhere, and should save those values between executions of the model. (If Pixel6 < 200, then Result = Yes, for example, is an extremely simple model.)

A model doesnt learn anymore - it takes input, and spits out output. If i send the same image through a model 1000 times, it gives me the same answer every time.

If you take the results of a model, give it the correct values ("Was this a face? Yes/No), and run the additional set of data through the Algorithm, you generate a new Model, with slightly different values. (I take the input from my model, and tell if that such and such was NOT a face. Now running that data through the algorithm generates a model such that If Pixel6 < 190 then Result = Yes)

Hmmmm, so we need to store the O/P data everytime we provide Algorithm with some input data?

For ex: If for Pic1 (is a face?) algorithm produces output as Yes, should I store output (Yes) in somekind of DB and compare it with next time when giving real inputs?

No, you don’t store input/output values, but internal state of the algorithm. For example a neural network, which is often used for face recognition and such, has a number of variables internally that change as the model learns. These are the variables you would need to store.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.