Skip to content

Commit

Permalink
Add DOI badge
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Fernández Fernández committed Jun 11, 2024
1 parent f9d4001 commit 1f24913
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 22 deletions.
18 changes: 8 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@

![Interpretable autoregressive β-VAE architecture.](fig1.png)

<div>

[![](https://zenodo.org/badge/667817128.svg)](https://zenodo.org/doi/10.5281/zenodo.11572993)

DOI

</div>

SPIVAE is a machine learning method to study stochastic processes. It
tries to learn the probability distribution of input trajectories and
permits us to interpret its functioning and generate new trajectories
Expand Down Expand Up @@ -50,13 +58,3 @@ If you use this library, please give us credit.
{Data Analysis, Statistics and Probability (physics.data-an)},
Quantitative Methods (q-bio.QM)}
}

@misc{fernandez2023spivae,
title = {{{SPIVAE}}},
author = {{Fern{\'a}ndez-Fern{\'a}ndez}, Gabriel},
year = {2023},
month = jul,
url = {https://github.com/GabrielFernandezFernandez/SPIVAE},
urldate = {2023-07-21},
copyright = {Apache-2.0}
}
2 changes: 1 addition & 1 deletion SPIVAE/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __call__(self, pred, target,):
log_likelihood = mix_gaussian_loss(y_hat, target, reduction=self.reduction)
else:
log_likelihood = mix_gaussian_loss(y_hat, target[:,self.RF:], reduction=self.reduction)

if self.reduction=='none':
kl = kl_divergence(mu, logvar, reduction='none') if self.c else 0
return log_likelihood, self.beta, kl
Expand Down
17 changes: 7 additions & 10 deletions nbs/index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
"![Interpretable autoregressive β-VAE architecture.](fig1.png)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"[![DOI](https://zenodo.org/badge/667817128.svg)](https://zenodo.org/doi/10.5281/zenodo.11572993)"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -75,16 +82,6 @@
" {Data Analysis, Statistics and Probability (physics.data-an)},\n",
" Quantitative Methods (q-bio.QM)}\n",
"}\n",
"\n",
"@misc{fernandez2023spivae,\n",
" title = {{{SPIVAE}}},\n",
" author = {{Fern{\\'a}ndez-Fern{\\'a}ndez}, Gabriel},\n",
" year = {2023},\n",
" month = jul,\n",
" url = {https://github.com/GabrielFernandezFernandez/SPIVAE},\n",
" urldate = {2023-07-21},\n",
" copyright = {Apache-2.0}\n",
"}\n",
"```"
]
}
Expand Down
2 changes: 1 addition & 1 deletion nbs/source/02_utils.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
" log_likelihood = mix_gaussian_loss(y_hat, target, reduction=self.reduction)\n",
" else:\n",
" log_likelihood = mix_gaussian_loss(y_hat, target[:,self.RF:], reduction=self.reduction)\n",
" \n",
"\n",
" if self.reduction=='none':\n",
" kl = kl_divergence(mu, logvar, reduction='none') if self.c else 0\n",
" return log_likelihood, self.beta, kl\n",
Expand Down
14 changes: 14 additions & 0 deletions nbs/tutorials/2_generation_FBM.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,20 @@
"We can extract both parameters, $\\alpha$ and $D$, by fitting the scaling of the TA-MSD."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The time average mean squared displacement (TA-MSD) can be defined in terms of a trajectory that is\n",
"sampled at $T$ discrete times $t_i = i\\Delta t$ as,\n",
"$$ \\mathrm{TA−MSD}(\\Delta t) =\n",
"\\frac{1}{T − \\Delta t}\n",
"\\sum\\limits^{T −\\Delta t}_{i=1}\n",
"[x(t_i) − x(t_i + \\Delta t)]^2,\n",
"$$\n",
"where $\\Delta t$ is the time lag."
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down

0 comments on commit 1f24913

Please sign in to comment.