## 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()
```

TODO

TODO

TODO

TODO

Bishop, J., & Verleger, M. A. (2013). The flipped classroom: A survey of the research. *2013 ASEE Annual Conference & Exposition*, 23–1200.

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

Research Questions:

- BiAA as a bridge between AA and SBM.
- BiAA extensions:
- Multiple likelihoods (Normal, Bernoulli, Poisson)
- Hard assignment
- Degree correction

- What are the merits of Bi-AA as opposed to SBM?
- Soft clustering
- Better interpretation

This research paper presents an extension of the Biarchetype Analysis (BiAA) method for bridging Archetypal Analysis and Stochastic Block Models analysis. The proposed extension includes the support of multiple likelihood functions (Normal, Bernoulli and Poisson), the use of a hard assignment mode, and the application of degree correction. The paper also compares the merits of BiAA to existing stochastic block model (SBM) algorithms, with a focus on the benefits of soft clustering and better interpretation of the results.

Biarchetype analysis is a statistical method that aims to uncover the underlying structure of data by grouping similar observations into clusters or archetypes. As it is said, the proposed extension of BiAA includes the incorporation of multiple likelihood functions, which allows for the use of different probability distributions to model the data. This enables the method to be applied to a wider range of data types, such as binary data, count data, and continuous data.

In addition, the proposed extension includes the use of a hard assignment mode, which assigns each observation to the archetype with the highest probability of membership. This allows for a more straightforward interpretation of the results, compared to the soft assignment mode used in the original BiAA method, where each observation is assigned a probability of membership in each archetype.

Finally, a degree correction is incorporated to BiAA, which adjusts the weights assigned to the nodes in the network based on their degree (i.e., the number of connections they have to other nodes). This ensures that nodes with higher degrees are not given too much influence in the calculation of the archetypes, which can lead to more accurate and unbiased results.

The paper also compares the merits of BiAA to existing SBM algorithms, which are commonly used for detecting community structure in networks. One key advantage of BiAA is its ability to perform soft clustering, where each observation can belong to multiple archetypes with varying degrees of membership. This allows for a more nuanced representation of the data and the underlying structure of the network. In contrast, SBM algorithms typically perform hard clustering, where each observation is assigned to exactly one block or community.

Another advantage of BiAA is its ability to provide better interpretation of the results. The archetypes identified by BiAA are derived from the data itself, and can be interpreted as extreme points in the data space. This allows for a more intuitive understanding of the patterns and structures in the data, compared to the block assignments produced by SBM algorithms, which are based on the probabilities of connections between nodes in the network.

Overall, the proposed extension of BiAA offers a bridge between archetypal analysis and SBM analysis, providing a different framework for community structure detection analysis. Therefore, BiAA will be an alternative and valuable tool for uncovering the underlying structure of communities and gaining insights into the patterns and structures present in the data.

Likelihood functions are used in statistical modeling to evaluate the quality of a model’s predictions. They are a measure of how well a model fits the observed data. By maximizing the likelihood of the model, it is possible to improve the model’s accuracy and make better predictions.

In the article, log-likelihood functions will be used as error functions in the defined models. This means that the models will be trained to minimize the negative log-likelihood of their predictions, which will improve their accuracy. The Normal, Bernoulli, and Poisson log-likelihood functions will be used in this case, which are appropriate for models that make predictions using normal, binary, and count data, respectively.

The normal log-likelihood function is used to calculate the log-likelihood of a normal distribution given a set of data. The formula for the normal log-likelihood function is as follows:

where is the likelihood function, is the number of data points, is the -th data point, is the mean of the data, is the standard deviation of the data, and the summation is over all data points in the sample.

The Bernoulli log-likelihood function is used to calculate the log-likelihood of a Bernoulli distribution given a set of data. The formula for the Bernoulli log-likelihood function is as follows:

where is the likelihood function, is the outcome of the binary event (1 if the event happened, 0 if it did not), is the probability of the event happening, and the summation is over all events in the data.

Finally, the Poisson log-likelihood function is used to calculate the log-likelihood of a Poisson distribution given a set of data. The formula for the Poisson log-likelihood function is as follows:

where is the likelihood function, is the number of events observed in the -th group, is the rate parameter of the Poisson distribution, and the summation is over all groups in the data.

The Stochastic Block Model (SBM) is a popular model used to generate synthetic networks with community structure. In an SBM, the nodes in the network are divided into groups or “blocks”, and the connections between nodes are determined by the blocks they belong to. The SBM is often used to test the performance of community detection algorithms, which are algorithms that aim to identify the groups or communities present in a network.

For bipartite networks, the SBM can be viewed as a matrix factorization problem where the adjacency matrix (which represents the connections between the nodes) is decomposed into three matrices, one representing the blocks and the others representing the connections between the blocks. More specifically, let be the adjacency matrix of a network with and nodes respectively, where is the number of connections between nodes and . In the SBM, this adjacency matrix can be written as the product of three matrices, , and , where is a matrix, is a matrix and is a matrix:

Here, and are the matrices that represents the blocks, where is the membership of node in block and is the membership of node in block . is the matrix that represents the connections between the blocks, where is the probability of a connection between nodes in block and block .

The matrix factorization of the adjacency matrix in the SBM allows us to model the community structure of the network by defining the blocks and the connections between the blocks. The blocks can be thought of as the groups or communities in the network, and the connections between the blocks can be used to control the strength and structure of the communities. For example, if is high, it indicates that there are many connections between nodes in block and block , and the corresponding communities are likely to be strongly connected. On the other hand, if is low, it indicates that there are few connections between nodes in block and block , and the corresponding communities are likely to be weakly connected.

In summary, the Stochastic Block Model is a popular model for generating synthetic networks with community structure, and it can be viewed as a matrix factorization problem where the adjacency matrix of the network is decomposed into three matrices representing the blocks and the connections between the blocks.

References: .

`# $$X_{MN} \sim A_{MK} Z_{KL} D_{LN}$$`

[Archetype and biarchetype analysis definition]

Therfore, this method can be seen as a particular case of the Stochastic Block Model where the matrix , that represents the relationships between groups, is defined by taking convex combinations of the data . This means that the matrix , called the archetypal matrix, is constructed as where is the matrix representing the original data points and and are matrices that represent the coefficients of the convex combination. By defining the relationship matrix in this way, Biarchetype Analysis is able to interpret the matrix based on input data.

A degree corrected algorithm is a variant of an existing algorithm that has been modified to account for the fact that the nodes in a network may have different degrees (i.e., different numbers of connections to other nodes). In many networks, the nodes have varying degrees, and a standard algorithm may not perform well when applied to such a network because it may give more weight to nodes with higher degrees, leading to biased or inaccurate results. A degree corrected algorithm addresses this issue by taking into account the degrees of the nodes when calculating the algorithm’s result.

For example, when applying a community detection algorithm to a network generated using the SBM, it is important to take into account the degree distribution of the nodes in the network. The degree distribution of a network is the distribution of the number of connections (or “edges”) that each node has to other nodes in the network. In a network generated using the SBM, the degree distribution of the nodes will be different depending on the blocks they belong to. For example, nodes in the same block will tend to have similar degrees, while nodes in different blocks will have different degrees.

If a standard community detection algorithm is applied to a network generated using the SBM, it may not perform well because it may give more weight to nodes with higher degrees, leading to biased or inaccurate results. A degree corrected version of the algorithm, on the other hand, would take into account the degree distribution of the nodes and give less weight to nodes with higher degrees, resulting in more accurate community detection.

References:

BiAA is a special case of SBM ().

such that:NOTE: The prototypes are not in the boundary of the CH. References:

Change restrictions 2, 3 such that

Normalized Mutual Information:

3 When Bernoulli likelihood is used for SBM synthetic graphs, the matrix of the SBM and the matrix () of the BiAA are equal to the probabilities used to construct the graph.

Source:

Source: