Skip to content

Commit

Permalink
Merge pull request #34 from garland-culbreth/enh/wiki-links
Browse files Browse the repository at this point in the history
Add wiki links
  • Loading branch information
garland-culbreth authored Mar 24, 2024
2 parents c33c8d6 + ceee494 commit 15e5426
Showing 1 changed file with 1 addition and 77 deletions.
78 changes: 1 addition & 77 deletions dea.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"source": [
"### Run diffusion entropy\n",
"\n",
"Everything you need to work with diffusion entropy is in this cell. For instructions on how to set these options and intepret results, see the User guide section, below."
"Everything you need to work with diffusion entropy is in this cell. For instructions on how to set these options and intepret results, see the [user guide](https://github.com/garland-culbreth/Diffusion-Entropy-Analysis/wiki/User-guide) on the [DEA github wiki](https://github.com/garland-culbreth/Diffusion-Entropy-Analysis/wiki)."
]
},
{
Expand Down Expand Up @@ -108,82 +108,6 @@
" show_data_plot=False\n",
")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## User guide\n",
"---\n",
"\n",
"### Procedure \n",
" \n",
" 1. Load your data into the `data` variable. For testing, the `sample_data` function can be used to generate a random walk.\n",
" 2. Choose the number of stripes to apply, and the interval (slice) over which to fit. \n",
" 3. Run! \n",
" 4. Adjust `number_of_stripes` and slicing indexes, `fit_start` and `fit_stop`, and re-run, as necessary. \n",
"\n",
"### Output \n",
"\n",
"A progress bar will display progress and time elapsed/remaining. On completion, two figures will be drawn with the results:\n",
"\n",
" - One will be of $S(l)$ vs. $ln(l)$, with the slope fit overlaid. This is the main result.\n",
" - The other will be a display of the two possible values for $\\mu$, drawn on a graph of the analytical behavior of $\\delta$ vs. $\\mu$. This is to help you determine which $\\mu$ value is right.\n",
"\n",
"Interpretation of results has its own section, below. \n",
"\n",
"### Choosing number of stripes \n",
"\n",
"Run a few initial tests with different values. e.g. 10, 50, 100. If there is significant disagreement in the scalings measured, vary about those trial numbers. The correct number of stripes to use is that number such that when varied up or down a little, the scaling does not change.\n",
"\n",
"Rigorous rules for this are still being developed.\n",
"\n",
"### Choosing fit interval \n",
"In the result figure, if the results are good, there will be a region in the loglog figure that appears linear. You want the fit interval to line up with this region. $S(l)$ is logged in calculation, $l$ is logged by the scale of the plot. The fitting function accounts for this.\n",
"\n",
"## Interpreting Results\n",
"---\n",
"\n",
"### Basics \n",
"\n",
"$\\delta$ is the measured scaling of the time-series process. \n",
"\n",
"$\\mu$ is a complexity index, defined as the power for the inter-event time distribution $1/\\tau^{\\mu}$ ($\\tau$ being inter-event time). \n",
"\n",
"### Baselines \n",
"\n",
"For a totally random process, DEA yields $\\delta = 0.5.$ \n",
"\n",
"The closer $\\delta$ is to 1, and the closer $\\mu$ is to 2, the more complex the data-series is. Those are the critical values of $\\delta$ and $\\mu$. \n",
"\n",
"If $\\delta < 0.5$, this usually means the time-series is not complex. At least, not in this sense. \n",
"\n",
"### Determining $\\mu$ \n",
"Two ways of calculating $\\mu$ are employed: \n",
"\n",
" - For $1 < \\mu < 2$: $\\mu = 1 + \\delta$. \n",
" - For $2 < \\mu < 3$: $\\mu = 1 + 1/\\delta$. \n",
"\n",
"The correct calculation for $\\mu$ varies. As rigorous rules for determining which is correct in what situation have yet to be laid down, both candidates are calculated and plotted so that the user may compare them. Typically the correct value for $\\mu$ will lie along the line, as the line represents the theoretical relationship. If you already have an expectation for what range $\\mu$ should be in, e.g. from theoretical arguments, use that. The theoretical justifications for the two methods of deriving $\\mu$ from the scaling $\\delta$ are given in Section 3.2 of Reference 1 and Section 3.1-3.2 of Reference 3."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## References\n",
"---\n",
"\n",
"Culbreth, G., West, B.J. and Grigolini, P., 2019. Entropic approach to the detection of crucial events. _Entropy, 21_(2), p.178. doi:[10.3390/e21020178](https://doi.org/10.3390/e21020178) \n",
" - This paper introduced the stripes and describes their role with figure examples.\n",
" - Note: this paper used $\\eta$ to denote scaling, rather than $\\delta$.\n",
" \n",
"Scafetta, N. and Grigolini, P., 2002. Scaling detection in time series: Diffusion entropy analysis. _Physical Review E, 66_(3), p.036130. doi:[10.1103/PhysRevE.66.036130](https://doi.org/10.1103/PhysRevE.66.036130) \n",
" - The actual algorithm for DEA is detailed (mostly only in words) in Section IV. \n",
" \n",
"Grigolini, P., Palatella, L. and Raffaelli, G., 2001. Asymmetric anomalous diffusion: an efficient way to detect memory in time series. _Fractals, 9_(04), pp.439-449. doi:[10.1142/S0218348X01000865](https://doi.org/10.1142/S0218348X01000865) \n",
" - This paper introduced always using positive steps when constructing the event array, rather than the sign of the step at that time index."
]
}
],
"metadata": {
Expand Down

0 comments on commit 15e5426

Please sign in to comment.