get_class: A function to get the classification of each galaxy in a...

View source: R/get_class.R

get_classR Documentation

A function to get the classification of each galaxy in a catalog.

Description

This function allows you to estimate the orbital classification of each galaxy inside a catalog using phase-space information.

Usage

get_class(cat, model, type = "prob", threshold = 0)

Arguments

cat:

Data frame with the galaxy catalog. It should have as columns the distance to the cluster center normalized to the virial radius of each cluster ('r') and the line-of-sight velocity relative to the cluster normalized to the line-of-sight velocity of the cluster ('v').

model:

Machine Learning model to be used for the classification.

type:

Output of the machine learning algorithm. Either 'prob' for probabilities or 'class' for the most probable class. Default 'prob'.

threshold:

If type = 'prob' this is the probability threshold to determine the predicted class of a certain galaxy. If threshold = 0, the function returns the full probility vector. Default = 0.

Details

model: There are 3 available models. knn for a K-nearest neighbour, svm for a Support Vector Machine and rf for a Random Forest. See XXXX.XXXX for more ddetails on the models.

Examples

get_class(cat, knn, type = 'prob', threshold = 0.5)

Martindelosrios/pratto documentation built on Oct. 17, 2023, 12:17 p.m.