Skip to content
/ QFA Public

Quasar Factor Analysis – An Unsupervised and Probabilistic Quasar Continuum Prediction Algorithm with Latent Factor Analysis

License

Notifications You must be signed in to change notification settings

ZechangSun/QFA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quasar Factor Analysis

An Unsupervised and Probabilistic Quasar Continuum Prediction Algorithm with Latent Factor Analysis

Welcome! This is the source code for Quasar Factor Analysis. 😉

Quasar Factor Analysis (QFA) is an unsupervised and probalistic model for quasar spectrum modeling, which can be used for:

  • Quasar continuum prediction
    • High-accuracy and robust due to its unsupervsied nature
    • Reasonable uncertainty quantification
    • Flexible enough to deal with missing pixels
  • Physically meaningful spectral embedding
    • One can decompose the quasar emission profile into a few components with exact physical meaning
  • Out-of-distribution detection
    • Quasar spectra with interesting features can be selected via QFA thanks to its generative nature

For more details, we refer to

This document is arranged as:

  • How QFA works?: we show the basic idea of QFA to model quasar spectra and infer quasar continuum here 🤏
    • Model assumption: we display the statistical assumptions of QFA here 🧐
    • Training: we show how to train the model here 👊
    • Continuum inference: we show how to perform continuum inference here ✌️
  • How to install this package?: we show how to use this package here 😜
  • About this repository: the document of this repository can be found here 🫶

How QFA works?

QFA generatively models observed quasar spectra and applys the learned model to perform other downstream tasks.

We show the schematic plot of QFA here

icml

Model assumption

QFA is build upon two assumptions:

  1. Quasar continuum can be modeled as a factor model
$$\mathbf{C} = \mu + F\mathbf{h}+\boldsymbol{\Psi}$$
  1. The Ly$\alpha$ forest can be approximated as Gaussian random fluctuations
$$\boldsymbol{\mathrm{\omega}}(z) \sim\mathcal{N}(0,\Sigma_\omega)$$

Training

Continuum Inference

We give an example of continuum inference with QFA here.

example

How to install this package?

To install this package:

  1. git clone https://github.com/ZechangSun/QFA.git
  2. cd ./QFA
  3. python setup.py develop

About this repository

  • REAMDME.md: that's me!
  • setup.py: run python setup.py develop to install this package!
  • train.py: python script to run large training sample.
  • QFA: folder with all source codes.
  • nb: jupyter notebook examples for using QFA.
  • data: example data, including a well-trained model parameters file and a example input data file.
  • figure: figures used for me.
  • AUTHORS.md: author information can be found here.
  • LICENSE: MIT License.