Giter VIP home page Giter VIP logo

binaryjax's Introduction

BinaryJax

This code is a auto-diff version of the VBozza's BinaryLensing.It is built on the JAX library which provides a NumPy-like interface with GPU support and automatic differentiation for high-performance machine learning research.

Installation

You can install it from source by cloning the repository and running after installing Jax.For how to install Jax, please refer to Jax installation guide.
git clone https://github.com/CoastEgo/microlensing.git
cd microlensing
pip install -e .

Usage

There are examples in the examples folder. You can run them directly can change the input parameters by yourself.

Numpy version

There are two versions of the code: numpy version and jax version. The difference is that numpy version can return the image curve while jax version can not. For the reason that Jax is hard to debug and its JIT compilation overhead, you can test it with VBBL to avoid VBBL's potential failures . It is better to do this when you use VBBL+MCMC to fit data.

Jax version

The jax version can be used to calculate the gradient light curve for meachine learning or other optimization methods.For example, you can combine it with Numpyro to do MCMC or HMC sampling. The combination of NUTS in numpyro and Jax version is still testing.

Features

  • Optimal sampling and countour integral with error control
  • JIT compilation to sppeed up and GPU support
  • Automatic differentiation for high-performance machine learning and optimization
  • Laguerre's method to find the root of the polynomial and liner sum assignment algorithm to match the images

Future work

  • High order effects: parallax, orbital motion etc.
  • Using NUTS in numpyro and Jax version to model real data
  • More test and comparison with VBBL

Reference

under development and Paper is coming soon.

binaryjax's People

Contributors

coastego avatar

Stargazers

Anything avatar Zhaoan Wang avatar Haimeng Zhao avatar  avatar Shota Miyazaki avatar  avatar

Watchers

 avatar

Forkers

kmzzhang

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.