LinkedEarth / PyleoTutorials

Jupyter-based, science-driven tutorials for using the LinkedEarth data-software Python ecosystem
http://linked.earth/PyleoTutorials
Apache License 2.0
14 stars 7 forks source link

Update L2_principal_component_analysis.ipynb #58

Closed alexkjames closed 3 months ago

alexkjames commented 3 months ago

include mcpca, resolution, and time_coverage_plot in the pca notebook

review-notebook-app[bot] commented 3 months ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

alexkjames commented 3 months ago

Nice work! The notebook looks great and I really like the addition of time_coverage_plot() and resolution(). A couple of suggestions:

* please add your name and ORCID to the authors

* The default exponential distribution is not a very good model for those kinds of uncertainties. I recommend using the `random_choice` method instead. I'm happy to talk you through how it works.

Thanks!

I'm familiar with the random choice method, though I'm not sure how to create realistic looking age ensembles with it. By nature its discrete, so it produces pretty jagged looking ensembles (from my brief experimentation anyway). From what I can tell, the poisson method seems to create more realistic looking ensembles because it samples from a continuous distribution.

I'd show a visualization of the ensembles in the notebook, we just don't have a stackplot method for MulEnsGeoSeries objects yet (I've created an issue to address this)

CommonClimate commented 3 months ago

L2_correlations.ipynb has the answer! You can generate your time perturbations this way, and simply add them to the original time:

pert = pyleo.utils.tsmodel.random_time_axis(n,
                                         delta_t_dist='random_choice',
                                         param =[[-0.1,0,0.1],[0.02,0.96,0.02]])
alexkjames commented 3 months ago

Ran into conflict issues, opened a new PR #67