GithubHelp home page GithubHelp logo

rupt / paper-which-is-real Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 3.52 MB

Code and data to reproduce content for "A method to challenge symmetries in data with self-supervised learning" (https://arxiv.org/abs/2111.05442)

Home Page: https://doi.org/10.1088/1748-0221/17/08/P08024

License: MIT License

Makefile 0.02% Python 1.70% Shell 0.01% Jupyter Notebook 98.27%
machine-learning physics symmetry

paper-which-is-real's Introduction

Supporting code for:
A method to challenge symmetries in data with self-supervised learning

Test symmetries with sklearn decision tree models.

Setup

Begin from an environment with a recent version of python 3.
We recommend using anaconda:

conda create -n which-is-real python==3.10.4

followed by

conda activate which-is-real

Install and activate a python virtual environment with our required packages:

source setup.sh

You can leave the environment with deactivate.
To clean up fully, remove the installation directory env/.

Run experiments

We include scripts to reproduce all experiments from the paper and a few others.
To run all, execute:

make

This dumps plots into the various directories example_*/.

We describe each in a little more detail below.

Experiment 1: Gappy detector

The cylindrical particle detector with holes and varying efficiencies.
In the paper, this is illustrated in Figures 2 and 3, and discussed in Section 5.

Notebook version: example_ring_paper.ipynb.
You should be able to view this on GitHub with all figures and other outputs.

Execute the plain python version with:

make example_ring_paper.log

This reproduces plots from the paper and dumps them into the directory example_ring_paper/. \

Experiment 2: Height map

The topographical map from Figure 4 and Section 6 of the paper.

Notebook version: example_map_paper.ipynb.
You should be able to view this on GitHub with all figures and other outputs.

Execute the plain python version with:

make example_map_paper.log

This reproduces plots from the paper and dumps them into the directory example_map_paper/.

Bonus experiments:

  • make example_ring.log
    • Similar to Experiment 1, plotted in 2D, showing both real and fake (transformed) data.
    • Plots dump to example_ring/.
  • make example_map.log
    • Similar to Experiment 2, with more variety in its filtering symmetry-breaking wave.
    • Plots dump to example_map/.
  • make example_step.log
    • A minimal example testing translation symmetry on the unit interval.
    • Uses rejection sampling for fakes.
    • Plots dump to example_step/.

These make commands run corresponding example_*.py scripts after ensuring that input data are prepared.

paper-which-is-real's People

Contributors

rupt avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

kesterlester

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.