AstroML is a Python module for machine learning and data mining built on numpy, scipy, scikit-learn, matplotlib, and astropy, and distributed under the 3-clause BSD license. It contains a growing library of statistical and machine learning routines for analyzing astronomical data in Python, loaders for several open astronomical datasets, and a large suite of examples of analyzing and visualizing astronomical datasets.

The goal of astroML is to provide a community repository for fast Python implementations of common tools and routines used for statistical data analysis in astronomy and astrophysics, to provide a uniform and easy-to-use interface to freely available astronomical datasets. We hope this package will be useful to researchers and students of astronomy. If you have an example you’d like to share, we are happy to accept a contribution via a GitHub Pull Request: the code repository can be found at http://github.com/astroML/astroML.

## Textbook¶

The astroML project was started in 2012 to accompany the book **Statistics,
Data Mining, and Machine Learning in Astronomy**, by Željko Ivezić, Andrew
Connolly, Jacob Vanderplas, and Alex Gray, published by Princeton University Press. The
table of contents is available `here(pdf)`

,
or you can preview or purchase the book on
Amazon.

A second edition is published in December 2019. This updated edition features new sections on deep learning methods, hierarchical Bayes modeling, and approximate Bayesian computation. The chapters have been revised throughout and the astroML code has been brought completely up to date.

Did you find a mistake or typo in the book? We maintain an up-to-date listing of errata in the text which you can view on GitHub. If you find a mistake which is not yet noted on that page, please let us know via email or GitHub pull request!

## User Guide¶

- User Guide
- 1. Introduction
- 2. Installation of astroML
- 3. Data Sets
- 4. Unsupervised Learning: Density Estimation
- 5. Unsupervised Learning: Clustering
- 6. Two-point Correlation Functions
- 7. Unsupervised Learning: Dimensionality Reduction
- 8. Supervised Learning: Regression
- 9. Supervised Learning: Classification
- 10. Time Series Analysis
- 11. Class reference
- 12. Other Resources

## Example Plot Gallery and Tutorials¶

## Development¶

## Citing astroML¶

If you make use of any of these datasets, tools, or examples in a scientific publication, please consider citing astroML. You may reference the following paper:

Introduction to astroML: Machine learning for astrophysics, Vanderplas

*et al*, proc. of CIDU, pp. 47-54, 2012.**Recipient of the best paper award for CIDU 2012**Bibtex entry:

@INPROCEEDINGS{astroML, author={{Vanderplas}, J.T. and {Connolly}, A.J. and {Ivezi{\'c}}, {\v Z}. and {Gray}, A.}, booktitle={Conference on Intelligent Data Understanding (CIDU)}, title={Introduction to astroML: Machine learning for astrophysics}, month={oct.}, pages={47 -54}, doi={10.1109/CIDU.2012.6382200}, year={2012} }

You may also reference the accompanying textbook:

Statistics, Data Mining, and Machine Learning for Astronomy, Ivezic

*et al*, 2014Bibtex entry:

@BOOK{astroMLText, title={Statistics, Data Mining and Machine Learning in Astronomy}, author={{Ivezi{\'c}}, {\v Z}. and {Connolly}, A.J. and {Vanderplas}, J.T. and {Gray}, A.}, publisher={Princeton University Press}, location={Princeton, NJ}, year={2014} }