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

Description Usage Arguments Details Examples

View source: R/get_class.R

Description

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

Usage

1
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 'raw' 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

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

Martindelosrios/pratto documentation built on Feb. 17, 2020, 10:26 p.m.