Giter Club home page Giter Club logo

data-compression-inference-in-cosmology-with-ssl's Introduction

Data Compression and Inference in Cosmology with Self-Supervised Machine Learning (SSL)

This repository contains the code used for the paper "Data Compression and Inference in Cosmology with Self-Supervised Machine Learning" (in preparation). It was also used for the paper "Compression of Cosmological Data and Inference with Self-Supervised Machine Learning" submitted to the ICML 2023 Workshop on Machine Learning for Astrophysics.

Software dependencies and datasets

This code uses numpy, scipy, matplotlib, scikit-learn, and pytorch packages.

The data for mock lognormal fields is generated with the powerbox1 and pyccl2 packages. Simulation-based inference on SSL summaries is conducted with the sbi3 package.

The total matter density fields are from the IllustrisTNG and SIMBA suites of the CAMELS simulations4.

Code description

The code is organized according to the three datasets used in the study: mock lognormal fields (ln_fields), total matter density fields from CAMELS simulations (camels_fields), and toy power spectra with various baryonic effects (baryonic_effects_toy_Pk). Each folder contains Jupyter notebooks to generate, plot, and analyze the datasets. The trained_models folders include trained neural network models used to quote the results and the analysis in the paper.

The utils_modules folder contains help functions used throughout the notebooks, including self-supervised loss function, custom neural network architectures for the encoder and projector neural networks, and custom dataset classes for SSL.

Footnotes

  1. https://powerbox.readthedocs.io/

  2. https://ccl.readthedocs.io/

  3. https://www.mackelab.org/sbi/

  4. https://camels.readthedocs.io/

data-compression-inference-in-cosmology-with-ssl's People

Contributors

aizhanaakhmet avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.