cii-text-analysis/vendor/rubix/ml/docs/transformers/boolean-converter.md
Jéremy Munsch f68d2ac333
premier poc
2026-02-11 08:24:04 +01:00

1 KiB

[source]

Boolean Converter

This transformer is used to convert boolean values to a compatible continuous or categorical datatype. Strings should be used when the boolean should be treated as a categorical value. Ints or floats when the boolean should be treated as a continuous value.

Interfaces: Transformer

Data Type Compatibility: Categorical, Continuous

Parameters

# Name Default Type Description
1 trueValue 'true' string, int, float The value to convert true to.
2 falseValue 'false' string, int, float The value to convert false to.

Example

use Rubix\ML\Transformers\BooleanConverter;

$transformer = new BooleanConverter('true', 'false);

$transformer = new BooleanConverter('tall', 'not tall');

$transformer = new BooleanConverter(1, 0);

Additional Methods

This transformer does not have any additional methods.