Skip to main content

Implementation of ROGER in Python

Project description

pyROGER pacakage

Documentation Status

Welcome to the pyROGER package, where you will be able to make an automatic dynamical classification of galaxies around clusters.

Installation

You can install pyROGER by doing:

pip install pyROGER

Or install the last version downloading the source:

git clone https://github.com/Martindelosrios/pyROGER.git

And then, in the pyROGER directory just doing:

pip install .

Requirements

For running pyroger you will need:

  • numpy
  • scikit-learn (If you want to use the pre-loaded models, you will need to install scikit-learn==1.3.0)
  • mlxtend
  • pandas
  • joblib

Quick Start

First you can import the roger library and the roger models...

from pyROGER import roger
from pyROGER import models

Then you can check the available models...

models.list_saved_models()

For uploading a model just give the path to the saved .joblib file

models.HighMassRoger1.train(path_to_saved_model= [PATH_TO_MODEL/HighMassRoger1_KNN.joblib',
                                                  PATH_TO_MODEL/HighMassRoger1_RF.joblib',
                                                  PATH_TO_MODEL/HighMassRoger1_SVM.joblib'])

To check that the model is ready to be used you can do:

models.HighMassRoger1

and you should see 'Ready to use' after some comments about the model.

Finally, for using the model you just do:

# For predicting the classes:
pred_class = models.HighMassRoger1.predict_class(data[:,(0,1)], 0)

# For predicting probabilities:
pred_prob = models.HighMassRoger1.predict_prob(data[:,(0,1)], 0)

Tutorials

In Examples you can find some examples to start playing with pyROGER

Citation

If you use pyROGER in your paper please cite https://arxiv.org/abs/2010.11959

@ARTICLE{2021MNRAS.500.1784D,
       author = {{de los Rios}, Mart{\'\i}n and {Mart{\'\i}nez}, H{\'e}ctor J. and {Coenda}, Valeria and {Muriel}, Hern{\'a}n and {Ruiz}, Andr{\'e}s N. and {Vega-Mart{\'\i}nez}, Cristian A. and {Cora}, Sof{\'\i}a A.},
        title = "{ROGER: Reconstructing orbits of galaxies in extreme regions using machine learning techniques}",
      journal = {\mnras},
     keywords = {methods: analytical, methods: numerical, galaxies: clusters: general, galaxies: kinematics and dynamics, Astrophysics - Astrophysics of Galaxies},
         year = 2021,
        month = jan,
       volume = {500},
       number = {2},
        pages = {1784-1794},
          doi = {10.1093/mnras/staa3339},
archivePrefix = {arXiv},
       eprint = {2010.11959},
 primaryClass = {astro-ph.GA},
       adsurl = {https://ui.adsabs.harvard.edu/abs/2021MNRAS.500.1784D},
      adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
A lot of people is already using pyROGER, you can check the [Papers here!](https://scixplorer.org/abs/2021MNRAS.500.1784D/citations?p=1)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyroger-2.0.1.tar.gz (11.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyroger-2.0.1-py3-none-any.whl (11.3 MB view details)

Uploaded Python 3

File details

Details for the file pyroger-2.0.1.tar.gz.

File metadata

  • Download URL: pyroger-2.0.1.tar.gz
  • Upload date:
  • Size: 11.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for pyroger-2.0.1.tar.gz
Algorithm Hash digest
SHA256 779bface152d09721102283eedd7b1cccbf209e186db5fa0f19ab73c0130d127
MD5 031ca3717d96eb78d971d3b0226e65fc
BLAKE2b-256 ac1972276b2de5ccfee71c78510283ebdc060608a012ce4f7c90e0b40dbe8008

See more details on using hashes here.

File details

Details for the file pyroger-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: pyroger-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 11.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for pyroger-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f38bf93d2869ed234570a34e0f1b59bc54fee14b4614f03eec418fe3e1e5d2a3
MD5 0a7adeec72f56d3691de82e9a0afc173
BLAKE2b-256 c8c98c54a354fb06e794658167666dd5e5d38361d4b4be099a43f7ff374a7873

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page