# How does an unsupervised learning model learn?

How does an unsupervised learning model learn, if it does not involve any target values?

Supervised learning is typically an attempt to learn a mathematical function, $$f(\bf X)=\bf y$$. For this, you need both the input vector $$\bf X$$ and the output vector $$\bf y$$. The model outputs have whatever dimensionality that the target values have.
Unsupervised learning models instead learn a structure from the data. A clustering model, for example, is learning both how many clusters exist in the data (a number that's not the same type as the inputs) and where those clusters are located (which is also a different type from the inputs). The output of running this model on a new datapoint $$x$$ is not the same type as $$x$$, but instead a classification label.