Sklearn Binarizer icon

Sklearn Binarizer

Binarize data (set feature values to 0 or 1) using scikit-learn

Sklearn Binarizer

AI-generated

Summary

Binarize specified feature columns using scikit-learn, outputting records with new binary fields.

Inputs

  • featureColumns (required) — Comma-separated list of feature column names
  • threshold — Values <= threshold become 0, values > threshold become 1
  • pythonPath — Path to Python executable with scikit-learn installed

Output shape

a list of items, each containing the original record plus <column>_binary fields for each feature column

If continueOnFail is enabled, errors appear as a record with an error field; otherwise they are thrown as an exception.

Examples

Example 1: Binarize age and income with default threshold

featureColumns: age,income; threshold: 0; pythonPath: python3

Discussion