predict_fullname {rethnicity} | R Documentation |
Predict ethnicity from full name
Description
Predicts ethnicity from first names and last names, using self-trained model with customized labels. This is designed for advanced users who wish to use their own models. For most use cases, use [predict_ethnicity()] for prediction.
Usage
predict_fullname(
firstnames,
lastnames,
na.rm = FALSE,
threads = 0L,
labels = NULL,
model_path = NULL
)
Arguments
firstnames |
character vector, first names |
lastnames |
character vector, last names |
na.rm |
bool, default to FALSE, whether to remove the na in the 'lastnames' |
threads |
int, number of threads for multi-threading |
labels |
character vector, labels of the classification model, needs to be in the same order as the trained model |
model_path |
character file path, the path to the trained model in .json format (converted from Keras by frugally-deep) |
Value
data.frame with predicted probability and predicted ethnicity
[Package rethnicity version 0.2.5 Index]