File condition.hpp

Typedefs

typedef std::variant<float32, int32> Threshold

A union of types that may be used for the threshold used by a condition of a rule.

Enums

enum Comparator

An enum that specifies all possible types of operators used by a condition of a rule.

Values:

enumerator NUMERICAL_LEQ
enumerator NUMERICAL_GR
enumerator ORDINAL_LEQ
enumerator ORDINAL_GR
enumerator NOMINAL_EQ
enumerator NOMINAL_NEQ
struct Condition : public Interval
#include <condition.hpp>

Stores the properties of a condition of a rule. It consists of the index of the feature, the condition corresponds to, the type of the operator that is used by the condition, as well as a threshold. In addition, it stores the range [start, end) that corresponds to the elements, e.g. examples or bins, that are covered (or uncovered, if covered == false) by the condition, as well as the sum of the weights of all covered elements.

Subclassed by Refinement

Public Functions

inline Condition()
inline Condition(const Condition &other)
Parameters:

other – A reference to an existing condition to be copied

inline virtual ~Condition() override
inline Condition &operator=(const Condition &rhs)

Assigns the properties of an existing condition to this condition.

Parameters:

rhs – A reference to the existing condition

Returns:

A reference to the modified condition

Public Members

uint32 featureIndex

The index of the feature, the condition corresponds to.

Comparator comparator

The type of the operator that is used by the condition.

Threshold threshold

The threshold that is used by the condition.

uint32 numCovered

The number of elements that are covered by the condition.