# Module: tfdf.py_tree.condition

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/decision-forests/blob/main/tensorflow_decision_forests/component/py_tree/condition.py) |

Conditions / splits for non-leaf nodes.

A condition (e.g. a\>0.5) is evaluated to a binary value (e.g. True if a=5).
Condition evaluations control the branching of an example in a tree.

## Classes

[`class AbstractCondition`](https://www.tensorflow.org/decision_forests/api_docs/python/tfdf/py_tree/condition/AbstractCondition): Generic condition.

[`class CategoricalIsInCondition`](https://www.tensorflow.org/decision_forests/api_docs/python/tfdf/py_tree/condition/CategoricalIsInCondition): Condition of the form "attribute in \[...set of items...\]".

[`class CategoricalSetContainsCondition`](https://www.tensorflow.org/decision_forests/api_docs/python/tfdf/py_tree/condition/CategoricalSetContainsCondition): Condition of the form "attribute intersect \[...set of items...\]!=empty".

[`class IsMissingInCondition`](https://www.tensorflow.org/decision_forests/api_docs/python/tfdf/py_tree/condition/IsMissingInCondition): Condition of the form "attribute is missing".

[`class IsTrueCondition`](https://www.tensorflow.org/decision_forests/api_docs/python/tfdf/py_tree/condition/IsTrueCondition): Condition of the form "attribute is true".

[`class NumericalHigherThanCondition`](https://www.tensorflow.org/decision_forests/api_docs/python/tfdf/py_tree/condition/NumericalHigherThanCondition): Condition of the form "attribute \>= threhsold".

[`class NumericalSparseObliqueCondition`](https://www.tensorflow.org/decision_forests/api_docs/python/tfdf/py_tree/condition/NumericalSparseObliqueCondition): Condition of the form "attributes \* weights \>= threshold".

[`class SimpleColumnSpec`](https://www.tensorflow.org/decision_forests/api_docs/python/tfdf/inspector/SimpleColumnSpec): Simplified representation of a column spec.

## Functions

[`column_spec_bitmap_to_items(...)`](https://www.tensorflow.org/decision_forests/api_docs/python/tfdf/py_tree/condition/column_spec_bitmap_to_items): Converts a mask-bitmap into a list of elements.

[`column_spec_items_to_bitmap(...)`](https://www.tensorflow.org/decision_forests/api_docs/python/tfdf/py_tree/condition/column_spec_items_to_bitmap): Converts a list of elements into a mask-bitmap.

[`core_condition_to_condition(...)`](https://www.tensorflow.org/decision_forests/api_docs/python/tfdf/py_tree/condition/core_condition_to_condition): Converts a condition from the core to python format.

[`set_core_node(...)`](https://www.tensorflow.org/decision_forests/api_docs/python/tfdf/py_tree/condition/set_core_node): Sets a core node (proto format) from a python value.

<br />

<br />

<br />

| ## Other Members ||
|---|---|
| ColumnType | Instance of `google.protobuf.internal.enum_type_wrapper.EnumTypeWrapper` |

<br />