Description Usage Arguments Details Value Examples

This function computes the sum of squared Euclidean distance of each observation to its nearest center.

1 | ```
cumulative_loss(centers, observations)
``` |

`centers` |
a matrix containing m centers of length d, where each row corresponds to coordinates of a center. |

`observations` |
a matrix containing T observations of length d, where each row of the matrix is an observation of length d. |

Given a set *C* of m centers of length d (*i.e.,* *C* = *{c_{1}, c_{2}, …, c_{m}}*) and a set *X* of T observations of length d (*i.e.,* *X* = *{x_{1}, x_{2}, …, x_{T}}*), this function computes the sum of squared euclidean distance of each observation in X to its nearest center in *C*, *i.e.,*

*S_{T}(C) =∑_{t=1,2,…,T} min_{1<= i <= m}|x_{t}-c_{i}|_{2}^{2}.*

The sum of squared Euclidean distance of each of T observations in matrix `observations`

to its nearest center within `centers`

.

1 2 3 4 5 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.