Description Usage Arguments Value Author(s) Examples

View source: R/CosmoPhotoZestimator.R

`CosmoPhotoZestimator`

returns photometric redshift estimated from photometric
data and a training dataset with photometry and spectroscopy. The estimation is
based on generalized linear models (see `glmTrainPhotoZ`

and `glmPredictPhotoZ`

).

1 | ```
CosmoPhotoZestimator(trainData, testData, numberOfPcs, method, family, robust)
``` |

`trainData` |
vector containing spectroscopic redshift data and photometry (at least one column shall be called redshift) |

`testData` |
vector containing spectroscopic redshift data and photometry (at least one column shall be called redshift) |

`numberOfPcs` |
an integer indicating the number of principal components to consider |

`method` |
a string containing the chosen GLM method. Two options are available: |

`family` |
a string containing |

`robust` |
a boolean indicating if robust PCA should be used or not |

a vector with the estimated photometric redshifts

Alberto Krone-Martins, Rafael S. de Souza

1 2 3 4 5 6 7 8 9 10 11 12 | ```
## Not run:
# Load the data
data(PHAT0train)
data(PHAT0test)
# Run the analysis
photoZest <- CosmoPhotoZestimator(PHAT0train, PHAT0test, 6)
# Create a boxplot showing the results
plotDiagPhotoZ(photoz = photoZest, specz = PHAT0test$redshift, type = "box")
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.