## Code

```
import numpy as np
import matplotlib.pyplot as plt
r = np.arange(0, 2, 0.01)
theta = 2 * np.pi * r
fig, ax = plt.subplots(
subplot_kw = {'projection': 'polar'}
)
ax.plot(theta, r)
ax.set_rticks([0.5, 1, 1.5, 2])
ax.grid(True)
plt.show()
```

Archetypal analysis was introduced by Cutler & Breiman (1994). Let be a (real-valued) data matrix where the rows represent the samples of the data and the columns, the features. They defined the archetypes as convex combinations of the data samples, i.e. where is a stochastic matrix. In addition, the data samples are approximated by convex combinations of the archetypes, i.e. where and is also stochastic matrix. This is equivalent to solve the following optimization problem:

TODO: Interpretation

In BiAA, the archetypes are assumed to be convex combinations of the data in both dimensions, i.e. where and are stochastic matrices. At the same time, the data is approximated by convex combinations of the archetypes, i.e. where and are also stochastic matrices.

This is equivalent to solve the following optimization problem:

In Equation 2, just as Seth & Eugster (2016) proposed for archetypal analysis, could be a negative log-likelihood function. Therefore,

for Bernoulli distributions is defined as

and for normal distributions,

```
import numpy as np
import matplotlib.pyplot as plt
r = np.arange(0, 2, 0.01)
theta = 2 * np.pi * r
fig, ax = plt.subplots(
subplot_kw = {'projection': 'polar'}
)
ax.plot(theta, r)
ax.set_rticks([0.5, 1, 1.5, 2])
ax.grid(True)
plt.show()
```

Cutler, A., & Breiman, L. (1994). Archetypal analysis. *Technometrics*, *36*, 338–347. https://doi.org/10.1080/00401706.1994.10485840

Mørup, M., & Hansen, L. K. (2012). Archetypal analysis for machine learning and data mining. *Neurocomputing*, *80*, 54–63. https://doi.org/10.1016/j.neucom.2011.06.033

Seth, S., & Eugster, M. J. A. (2016). Probabilistic archetypal analysis. *Machine Learning*, *102*, 85–113. https://doi.org/10.1007/S10994-015-5498-8/FIGURES/14

BibTeX citation:

```
@online{2022,
author = {},
title = {Biarchetype Analysis},
date = {2022-11-16},
url = {https://aleixalcacer.com/posts/2022-06-11_archetypal-analysis},
langid = {en}
}
```

For attribution, please cite this work as: