This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Halton low discrepancy sequence. | |
This snippet implements the Halton sequence following the generalization of | |
a sequence of *Van der Corput* in n-dimensions. | |
--------------------------- | |
MIT License | |
Copyright (c) 2017 Pamphile Tupui ROY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Discrepancy of a sample. | |
Compute the centered discrepancy on a given sample. | |
It is a measure of the uniformity of the points in the parameter space. | |
The lower the value is, the better the coverage of the parameter space is. | |
--------------------------- | |
MIT License | |
Copyright (c) 2017 Pamphile Tupui ROY | |
Permission is hereby granted, free of charge, to any person obtaining a copy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Get info about Cryptocurrency wallets. | |
Gather information about the market and you own wallet. Using transactions | |
file, it also compare your investment with the available capital. | |
Transactions are to be stored in JSON files formated as: | |
{ | |
"2018_01_15": { | |
"rate": 1.505, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Quantile dotplot. | |
Based on R code from https://github.com/mjskay/when-ish-is-my-bus/blob/master/quantile-dotplots.md | |
Reference: | |
Matthew Kay, Tara Kola, Jessica Hullman, Sean Munson. When (ish) is My Bus? | |
User-centered Visualizations of Uncertainty in Everyday, Mobile Predictive Systems. | |
CHI 2016. DOI: 10.1145/2858036.2858558 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Proper Orthogonal Decomposition. | |
Demonstrate how to use it. | |
--------------------------- | |
MIT License | |
Copyright (c) 2018 Pamphile Tupui ROY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Sobol' indices. | |
Compute Sobol' variance based sensitivity indices. | |
Use formulations from Saltelli2010. | |
Reference: | |
Saltelli et al. Variance based sensitivity analysis of model output. Design and estimator for the total sensitivity index, | |
Computer Physics Communications, 2010. DOI: 10.1016/j.cpc.2009.09.018 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Minimum Spanning Tree. | |
MST is used here as a discrepancy criterion. | |
Comparing two different designs: the higher the mean, the better the design is | |
in terms of space filling. | |
--------------------------- | |
MIT License |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Cosine transformation sensitivity indices. | |
Using a Discrete Cosine Transformation (DCT), it is possible to compute | |
first order sensitivity indices. | |
Reference: | |
Plischke E., How to compute variance-based sensitivity indicators with your | |
spreadsheet software, Environmental Modelling & Software, | |
2012. DOI: 10.1016/j.envsoft.2012.03.004 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r"""Visual explanation of Sobol' indices. | |
Sobol' indices are metrics to express sensitivity of the output from | |
perturbations comming from input parameters. First order indices write | |
.. math:: S_{x_i} = \frac{\mathbb{V}_i(Y)}{\mathbb{V}[Y]} = | |
\frac{\mathbb{\mathbb{V}}[\mathbb{E}(Y|x_i)]}{\mathbb{V}[Y]} | |
The following is using the Ishigami function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r"""Visual explanation of Moment independent sensitivity analysis. | |
Moment-based method are based on the whole PDF to mitigate these | |
issues (Borgonovo2007). Based on the unconditional PDF, a conditional PDF per | |
parameter is computed. The more the conditional PDF deviates from the | |
unconditional PDF, the more the parameter has an impact on the quantity of | |
interest. The same procedure can be done using the Empirical Cumulative | |
Density Function (ECDF), respectively with the unconditional ECDF. | |
This visually shows this procedure. Bins of samples (red circles) are used to | |
compute a conditional PDF of the output. This PDF is compared to the |
OlderNewer