Skip to main content
Uses a machine learning model trained on a large database of names and the frequencies of associated genders.

Usage

The following examples show how the step can be used in a recipe.

Examples

  • Example 1
  • Example 2
  • Signature
To use the default labels “male” and “female” in the resulting output simply use
infer_gender(ds.first_name) -> (ds.gender)

Inputs & Outputs

The following are the inputs expected by the step and the outputs it produces. These are generally columns (ds.first_name), datasets (ds or ds[["first_name", "last_name"]]) or models (referenced by name e.g. "churn-clf").
first_name
column[category]
required
Column containing first names.
gender
column[sex]
required
Predicted gender for each name.

Configuration

The following parameters can be used to configure the behaviour of the step by including them in a json object as the last “input” to the step, i.e. step(..., {"param": "value", ...}) -> (output).

Parameters

labels
object
Labels for the male and female categories. An object mapping the “male” and “female” categories to custom labels.
male
string
default:"male"
Label for the “male” category.
female
string
default:"female"
Label for the “female” category.
I