Machine Learning: creating a prediction without previous trends Is there a machine learning algorithm that allows one to give an input a classification without a grouping or previous classification? Example: with a dataset of 5 digit numbers, the user inputs a random 5 digit number (12345), can the machine output &quot;alteration&quot; when 12345 is similar to something in the dataset, or output &quot;completely new&quot; when 12345 or anything similar doesn't exist? To clarify, the machine would do something like &quot;alteration&quot; when it finds something similar to 12345 such as 12445 where its only number difference, and output &quot;completely new&quot; when no similar numbers exist.
At first sight I don't see the need for ML, you just need a similarity measure which would return a score between two objects:

Given the input object, say &quot;12345&quot;, compare it against any known object using the similarity measure. The result is a similarity score for every known object.
Rank the known objects according to their similarity against the input object, or just obtain the object with the highest similarity. for example &quot;12445&quot; is the most similar with score 0.8.
Apply a threshold $t$: if the max similarity is higher than $t$, then the corresponding known object is returned; otherwise the system says that the input object is &quot;completely new&quot;.

Of course ML could still be used, for instance to tune the similarity measure or to find the optimal threshold.