# Unsupervised machine learning 2D hard disks
###### tags: `glasses` `local structures` `machine learning`
---
---
### Owners (the only ones with the permission to edit the main text)
Utku, Susana, Giuseppe, Frank
---
---
### Mean squared displacement
- Loop over all frames (after the first)
- Check distance between current and previous frame
- while (x - x_prev > L/2) x-= L and so on
- Calculate mean squared displacement
- Pick a starting time $t_0$
- Loop over later times, calculate squared displacements
- Put them in a list as a function of ($t - t_0$)
- Repeat for later $t_0$. (for better statistics)
$\langle r^2(t)\rangle = \langle\frac{1}{N}\sum_{i=1}^N (\mathbf{r}_i(t + t_0) - \mathbf{r}_i(t_0))^2 \rangle$
Angular brackets denote the average over multiple starting times
box =3
x-old = (0.5, 0.7, 1.0, 1.5, 1.3, 1.9, 2.5, 0.5, 0.7)
x-new = (0.5, 0.7, 1.0, 1.5, 1.3, 1.9, 2.5, 3.5, 3.7)
(x(t_0 + t)-x(t_0))^2
---
Here are some results of the propensity calculations and the clustering for different packing fractions $\eta$. Histograms are plotted with their associated probability densities (estimated by kernel density estimation).
Note: Normalized histogram with kernel density estimation based on the normalized summation of standard normal distributions around each data point. Set the kde keyword to False to see the counts on the y axis.
We define an order parameter $P_{red}$ after the dimensionality reduction. It corresponds to the probability of a particle belonging to one of the two clusters. The choice of the reduced dimension is arbitrary for the moment.
## $\eta = 0.75$
|  |  |
| :---: | :---: |
| Mean Squared Displacement for small and large disks | Bayesian Information Criterion for small and large disks |
#### Histogram of dynamic propensities
---
| ||
| --- | --- |
| ||
---
|Histogram of propensities for a given time frame|
| --- |
|
|
---
|Clustering of particles corresponding to $P_{red}$|
| --- |
|
|
---
Here, the ticks on the colour bar show the minimum, the maximum, and the average particle propensity within its species.
|Clustering of particles corresponding to their propensities|
| --- |
|
|
---
Here, the plot is the same as above. Only the colour bar is different which is scaled according to $(prop - <prop>)/std(prop)$.
|Variation of particle propensities from the average|
| --- |
|
|
## $\eta = 0.76$
|  |  |
| :---: | :---: |
| Mean Squared Displacement for small and large disks | Bayesian Information Criterion for small and large disks |
#### Histogram of dynamic propensities
---
| ||
| --- | --- |
| ||
---
|Histogram of propensities for a given time frame|
| --- |
|
|
---
|Clustering of particles corresponding to $P_{red}$|
| --- |
|
|
---
Here, the ticks on the colour bar show the minimum, the maximum, and the average particle propensity within its species.
|Clustering of particles corresponding to their propensities|
| --- |
|
|
---
Here, the plot is the same as above. Only the colour bar is different which is scaled according to $(prop - <prop>)/std(prop)$.
|Variation of particle propensities from the average|
| --- |
|
|
## $\eta = 0.77$
|||
| :---: | :---: |
| Mean Squared Displacement for small and large disks | Bayesian Information Criterion for small and large disks |
#### Histogram of dynamic propensities
---
|| |
| --- | --- |
|| |
---
|Histogram of propensities for a given time frame|
| --- |
|
|
---
|Clustering of particles corresponding to $P_{red}$|
| --- |
|
|
---
Here, the ticks on the colour bar show the minimum, the maximum, and the average particle propensity within its species.
|Clustering of particles corresponding to their propensities|
| --- |
|
|
---
Here, the plot is the same as above. Only the colour bar is different which is scaled according to $(prop - <prop>)/std(prop)$.
|Variation of particle propensities from the average|
| --- |
|
|
## $\eta = 0.78$
|| |
| :---: | :---: |
| Mean Squared Displacement for small and large disks | Bayesian Information Criterion for small and large disks |
#### Histogram of dynamic propensities
---
|| |
| --- | --- |
|| |
---
|Histogram of propensities for a given time frame|
| --- |
|
|
---
|Clustering of particles corresponding to $P_{red}$|
| --- |
|
|
---
Here, the ticks on the colour bar show the minimum, the maximum, and the average particle propensity within its species.
|Clustering of particles corresponding to their propensities|
| --- |
|
|
---
Here, the plot is the same as above. Only the colour bar is different which is scaled according to $(prop - <prop>)/std(prop)$.
|Variation of particle propensities from the average|
| --- |
|
|
## $\eta = 0.79$
|||
| :---: | :---: |
| Mean Squared Displacement for small and large disks | Bayesian Information Criterion for small and large disks |
#### Histogram of dynamic propensities
---
|||
| --- | --- |
|||
---
|Histogram of propensities for a given time frame|
| --- |
|
|
---
|Clustering of particles corresponding to $P_{red}$|
| --- |
|
|
---
Here, the ticks on the colour bar show the minimum, the maximum, and the average particle propensity within its species.
|Clustering of particles corresponding to their propensities|
| --- |
|
|
---
Here, the plot is the same as above. Only the colour bar is different which is scaled according to $(prop - <prop>)/std(prop)$.
|Variation of particle propensities from the average|
| --- |
|
|
## $\eta = 0.80$
|||
| :---: | :---: |
| Mean Squared Displacement for small and large disks | Bayesian Information Criterion for small and large disks |
#### Histogram of dynamic propensities
---
|||
| --- | --- |
|||
---
|Histogram of propensities for a given time frame|
| --- |
||
---
|Clustering of particles corresponding to $P_{red}$|
| --- |
||
---
Here, the ticks on the colour bar show the minimum, the maximum, and the average particle propensity within its species.
|Clustering of particles corresponding to their propensities|
| --- |
|
|
---
Here, the plot is the same as above. Only the colour bar is different which is scaled according to $(prop - <prop>)/std(prop)$.
|Variation of particle propensities from the average|
| --- |
|
|
## $\eta = 0.81$
| Mean Squared Displacement for small and large disks | Bayesian Information Criterion for small and large disks |
| :---: | :---: |
|||
---
#### Histogram of dynamic propensities
|||
| --- | --- |
|||
---
We choose a time frame and compute the average propensities for that frame. Clustering of the particles are also done in the same frame. Histogram of the propensities for the chosen time frame is also shown below.
|Histogram of propensities for a given time frame|
| --- |
||
---
|Clustering of particles corresponding to $P_{red}$|
| --- |
||
---
Here, the ticks on the colour bar show the minimum, the maximum, and the average particle propensity within its species.
|Clustering of particles corresponding to their propensities|
| --- |
||
---
Here, the plot is the same as above. Only the colour bar is different which is scaled according to $(prop - <prop>)/std(prop)$.
|Variation of particle propensities from the average|
| --- |
||
## Using local averages
We consider the local averages of BOPs before feeding them into the neural network. We realise that it improves the FVE for small particles and the BIC now suggests that $N_g = 2$ might be a reasonable choice.
### $\eta = 0.75$
Fraction of variances explained: $FVE_{large} = , FVE_{small} = $
Training parameters: 300 epochs with learning rate=0.001.
|Bayesian Information Criterion|
| --- |
||
|Clustering of particles corresponding to $\overline{P}_{red}$|
| --- |
||
|Particle Propensity|
| --- |
||
***
### $\eta = 0.76$
Fraction of variances explained: $FVE_{large} = , FVE_{small} = $
Training parameters: 300 epochs with learning rate=0.001.
|Bayesian Information Criterion|
| --- |
||
|Clustering of particles corresponding to $\overline{P}_{red}$|
| --- |
||
|Particle Propensity|
| --- |
||
***
### $\eta = 0.77$
Fraction of variances explained: $FVE_{large} = , FVE_{small} = $
Training parameters: 300 epochs with learning rate=0.001.
|Bayesian Information Criterion|
| --- |
||
|Clustering of particles corresponding to $\overline{P}_{red}$|
| --- |
||
|Particle Propensity|
| --- |
||
***
### $\eta = 0.78$
Fraction of variances explained: $FVE_{large} = 0.5561, FVE_{small} = 0.5118$
Training parameters: 300 epochs with learning rate=0.001.
|Bayesian Information Criterion|
| --- |
||
|Clustering of particles corresponding to $\overline{P}_{red}$|
| --- |
||
|Particle Propensity|
| --- |
||
***
### $\eta = 0.79$
Fraction of variances explained: $FVE_{large} = 0.5560, FVE_{small} = 0.5331$
Training parameters: 300 epochs with learning rate=0.001.
|Bayesian Information Criterion|
| --- |
||
|Clustering of particles corresponding to $\overline{P}_{red}$|
| --- |
||
|Particle Propensity|
| --- |
||
***
### $\eta = 0.80$
Fraction of variances explained: $FVE_{large} = -, FVE_{small} = -$
Training parameters: 300 epochs with learning rate=0.001.
|Bayesian Information Criterion|
| --- |
||
|Clustering of particles corresponding to $\overline{P}_{red}$|
| --- |
||
|Particle Propensity|
| --- |
||
### $\eta = 0.81$
Fraction of variances explained: $FVE_{large} = 0.5908, FVE_{small} = 0.5019$
Training parameters: 300 epochs with learning rate=0.001.
|Bayesian Information Criterion|
| --- |
||
|Clustering of particles corresponding to $\overline{P}_{red}$|
| --- |
||
|Particle Propensity|
| --- |
||
***
## Latest
| Diffusion Coefficients |
|:------------------------------------:|
||
***
### $\eta = 0.75$
|MSD|
| --- |
||
#### Linear fit to MSD at large time scales
| Large | Small|
| :---: | :---: |
|||
|Chosen frame|
| --- |
||
|Bayesian Information Criterion|
| --- |
||
|Particle Propensity|
| --- |
||
|Particles coloured by $P_{red}$|
| --- |
||
|Particles coloured by $\overline{P}_{red}$|
| --- |
||
#### Correlations
| $P_{red}$ | $\overline{P}_{red}$|
| :---: | :---: |
|||
***
### $\eta = 0.755$
|MSD|
| --- |
||
#### Linear fit to MSD at large time scales
| Large | Small|
| :---: | :---: |
|||
|Chosen frame|
| --- |
||
|Bayesian Information Criterion|
| --- |
||
|Particle Propensity|
| --- |
||
|Particles coloured by $P_{red}$|
| --- |
||
|Particles coloured by $\overline{P}_{red}$|
| --- |
||
#### Correlations
| $P_{red}$ | $\overline{P}_{red}$|
| :---: | :---: |
|||
***
### $\eta = 0.76$
|MSD|
| --- |
||
#### Linear fit to MSD at large time scales
| Large | Small|
| :---: | :---: |
|||
|Chosen frame|
| --- |
||
|Bayesian Information Criterion|
| --- |
||
|Particle Propensity|
| --- |
||
|Particles coloured by $P_{red}$|
| --- |
||
|Particles coloured by $\overline{P}_{red}$|
| --- |
||
#### Correlations
| $P_{red}$ | $\overline{P}_{red}$|
| :---: | :---: |
|||
***
### $\eta = 0.765$
|MSD|
| --- |
||
#### Linear fit to MSD at large time scales
| Large | Small|
| :---: | :---: |
|||
|Chosen frame|
| --- |
||
|Bayesian Information Criterion|
| --- |
||
|Particle Propensity|
| --- |
||
|Particles coloured by $P_{red}$|
| --- |
||
|Particles coloured by $\overline{P}_{red}$|
| --- |
||
#### Correlations
| $P_{red}$ | $\overline{P}_{red}$|
| :---: | :---: |
|| |
***
### $\eta = 0.77$
|MSD|
| --- |
||
#### Linear fit to MSD at large time scales
| Large | Small|
| :---: | :---: |
|||
|Chosen frame|
| --- |
||
|Bayesian Information Criterion|
| --- |
||
|Particle Propensity|
| --- |
||
|Particles coloured by $P_{red}$|
| --- |
||
|Particles coloured by $\overline{P}_{red}$|
| --- |
||
#### Correlations
| $P_{red}$ | $\overline{P}_{red}$|
| :---: | :---: |
|||
***
### $\eta = 0.775$
|MSD|
| --- |
||
#### Linear fit to MSD at large time scales
| Large | Small|
| :---: | :---: |
|||
|Chosen frame|
| --- |
||
|Bayesian Information Criterion|
| --- |
||
|Particle Propensity|
| --- |
||
|Particles coloured by $P_{red}$|
| --- |
||
|Particles coloured by $\overline{P}_{red}$|
| --- |
||
#### Correlations
| $P_{red}$ | $\overline{P}_{red}$|
| :---: | :---: |
|||
***
### $\eta = 0.78$
|MSD|
| --- |
||
#### Linear fit to MSD at large time scales
| Large | Small|
| :---: | :---: |
|||
|Chosen frame|
| --- |
||
|Bayesian Information Criterion|
| --- |
||
|Particle Propensity|
| --- |
||
|Particles coloured by $P_{red}$|
| --- |
||
|Particles coloured by $\overline{P}_{red}$|
| --- |
||
#### Correlations
| $P_{red}$ | $\overline{P}_{red}$|
| :---: | :---: |
|||
***
### $\eta = 0.785$
|MSD|
| --- |
||
#### Linear fit to MSD at large time scales
| Large | Small|
| :---: | :---: |
|||
|Chosen frame|
| --- |
||
|Bayesian Information Criterion|
| --- |
||
|Particle Propensity|
| --- |
||
|Particles coloured by $P_{red}$|
| --- |
||
|Particles coloured by $\overline{P}_{red}$|
| --- |
||
#### Correlations
| $P_{red}$ | $\overline{P}_{red}$|
| :---: | :---: |
|||
***
### $\eta = 0.79$
|MSD|
| --- |
||
#### Linear fit to MSD at large time scales
| Large | Small|
| :---: | :---: |
|||
|Chosen frame|
| --- |
||
|Bayesian Information Criterion|
| --- |
||
|Particle Propensity|
| --- |
||
|Particles coloured by $P_{red}$|
| --- |
||
|Particles coloured by $\overline{P}_{red}$|
| --- |
||
#### Correlations
| $P_{red}$ | $\overline{P}_{red}$|
| :---: | :---: |
|||
***
### $\eta = 0.795$
|MSD|
| --- |
||
#### Linear fit to MSD at large time scales
| Large | Small|
| :---: | :---: |
|||
|Chosen frame|
| --- |
||
|Bayesian Information Criterion|
| --- |
||
|Particle Propensity|
| --- |
||
|Particles coloured by $P_{red}$|
| --- |
||
|Particles coloured by $\overline{P}_{red}$|
| --- |
||
#### Correlations
| $P_{red}$ | $\overline{P}_{red}$|
| :---: | :---: |
|||
***
### $\eta = 0.80$
|MSD|
| --- |
||
#### Linear fit to MSD at large time scales
| Large | Small|
| :---: | :---: |
|||
|Chosen frame|
| --- |
||
|Bayesian Information Criterion|
| --- |
||
|Particle Propensity|
| --- |
||
|Particles coloured by $P_{red}$|
| --- |
||
|Particles coloured by $\overline{P}_{red}$|
| --- |
||
#### Correlations
| $P_{red}$ | $\overline{P}_{red}$|
| :---: | :---: |
|||
***
### $\eta = 0.805$
|MSD|
| --- |
||
#### Linear fit to MSD at large time scales
| Large | Small|
| :---: | :---: |
|||
|Chosen frame|
| --- |
||
|Bayesian Information Criterion|
| --- |
||
|Particle Propensity|
| --- |
||
|Particles coloured by $P_{red}$|
| --- |
||
|Particles coloured by $\overline{P}_{red}$|
| --- |
||
#### Correlations
| $P_{red}$ | $\overline{P}_{red}$|
| :---: | :---: |
|||
***
### $\eta = 0.81$
|MSD|
| --- |
||
#### Linear fit to MSD at large time scales
| Large | Small|
| :---: | :---: |
|||
|Chosen frame|
| --- |
||
|Bayesian Information Criterion|
| --- |
||
|Particle Propensity|
| --- |
||
|Particles coloured by $P_{red}$|
| --- |
||
|Particles coloured by $\overline{P}_{red}$|
| --- |
||
#### Correlations
| $P_{red}$ | $\overline{P}_{red}$|
| :---: | :---: |
|||
***