View source: R/predict_ethnicity.R
predict_lastname | R Documentation |
Predicts ethnicity from 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.
predict_lastname(
lastnames,
na.rm = FALSE,
threads = 0L,
labels = NULL,
model_path = NULL
)
lastnames |
character vector, last names |
na.rm |
bool, default to FALSE, whether to remove the na in the |
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) |
data.frame with predicted probability and predicted ethnicity
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.