Creates a density model of a n-dimensional vector space, based on a kNN graph. The kNN graph is created by connecting each row with *k* rows closest (in terms of Euclidean distance) to it in the feature space ( *k* is the specified number of neighbors). This way each row has at least *k* edges in the kNN graph, however there are two cases in which a row may have more than *k* edges:

- It is among the
*k*nearest neighbors of a row that is not among its own nearest neighbors. - There are multiple rows that would be the
*k*th nearest neighbor because they have the same distance to the row in question.

*Sigma*. The density of a specific row is calculated as the mean weight of all its edge weights. For more details see the RALF Paper by Ebert et al.

If the node fails to execute due to memory problems, this is usually because the number of neighbors is set too high.