Skip to content

This project provides a tutorial on performing leave-one-out cross-validation (LOO-CV) using the Pareto-smoothed importance sampling (PSIS) approximation. The tutorial leverages the arviz package and applies these techniques to a synthetic dataset from Welbanks et al. 2023, focusing on exoplanet atmospheric analysis.

Notifications You must be signed in to change notification settings

exoInference/loo_cv_tutorials

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

LOO-CV Tutorial

This repository contains a Jupyter notebook tutorial demonstrating how to carry out leave-one-out cross-validation (LOO-CV) using the Pareto-smoothed importance sampling (PSIS) approximation. The tutorial uses a synthetic dataset example from Welbanks et al. 2023 and the arviz package (link).

Overview

In this tutorial, you will learn how to:

  • Perform LOO-CV using PSIS.
  • Use the arviz package for LOO-CV.
  • Apply these techniques to exoplanet atmospheric analysis using synthetic data.

Tutorial Content

The main steps covered in the notebook include:

  1. Introduction to LOO-CV: An overview of the method and its applications.
  2. Required Packages: Importing necessary libraries including numpy, matplotlib, arviz, and spectres.
  3. Generating Pointwise Log Likelihood: Instructions on how to generate the required data for LOO-CV.
  4. Performing LOO-CV: Detailed steps to carry out LOO-CV using the provided dataset.
  5. Analysis and Visualization: Techniques to analyze and visualize the results.

Citation

If you find this tutorial helpful, please consider citing the following papers:

  1. Welbanks et al. 2023, On the Application of Bayesian Leave-one-out Cross-validation to Exoplanet Atmospheric Analysis. Link

  2. McGill et al. 2023, First semi-empirical test of the white dwarf mass-radius relationship using a single white dwarf via astrometric microlensing. Link

  3. Nixon et al. 2024, Methods for Incorporating Model Uncertainty into Exoplanet Atmospheric Analysis. Link

Getting Started

Prerequisites

Ensure you have the following packages installed:

  • numpy
  • matplotlib
  • arviz
  • spectres

You can install them using pip:

pip install numpy matplotlib arviz spectres

Running the Tutorial

  1. Clone the repository:
git clone https://github.com/your-username/loocv_tutorial.git
  1. Navigate to the repository directory:
cd loocv_tutorial
  1. Open the Jupyter notebook:
jupyter notebook loocv_tutorial.ipynb
  1. Follow the steps in the notebook to perform LOO-CV on the provided synthetic dataset.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License.

About

This project provides a tutorial on performing leave-one-out cross-validation (LOO-CV) using the Pareto-smoothed importance sampling (PSIS) approximation. The tutorial leverages the arviz package and applies these techniques to a synthetic dataset from Welbanks et al. 2023, focusing on exoplanet atmospheric analysis.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published