File lift_function.hpp

namespace seco
class ILiftFunction
#include <lift_function.hpp>

An abstract base class for all lift functions that affect the quality of rules, depending on the number of labels for which they predict.

Public Functions

inline virtual ~ILiftFunction()
virtual float64 calculateLift(uint32 numLabels) const = 0

Calculates and returns the lift for a specific number of labels.

Parameters:

numLabels – The number of labels for which the lift should be calculated

Returns:

The lift that has been calculated

virtual float64 getMaxLift(uint32 numLabels) const = 0

Returns the maximum lift that is possible by adding additional labels to a head of a given size.

Parameters:

numLabels – The number of labels for which the current head predicts

Returns:

The maximum lift that is possible by adding additional labels to a head of the given size

class ILiftFunctionFactory
#include <lift_function.hpp>

Defines an interface for all factories that allow to create instances of the type ILiftFunction.

Public Functions

inline virtual ~ILiftFunctionFactory()
virtual std::unique_ptr<ILiftFunction> create() const = 0

Creates and returns a new object of type ILiftFunction.

Returns:

An unique pointer to an object of type ILiftFunction that has been created

class ILiftFunctionConfig
#include <lift_function.hpp>

Defines an interface for all classes that allow to configure a lift function.

Subclassed by seco::KlnLiftFunctionConfig, seco::NoLiftFunctionConfig, seco::PeakLiftFunctionConfig

Public Functions

inline virtual ~ILiftFunctionConfig()
virtual std::unique_ptr<ILiftFunctionFactory> createLiftFunctionFactory(const IRowWiseLabelMatrix &labelMatrix) const = 0

Creates and returns a new object of type ILiftFunctionFactory according to the specified configuration.

Parameters:

labelMatrix – A reference to an object of type IRowWiseLabelMatrix that provides row-wise access to the labels of the training examples

Returns:

An unique pointer to an object of type ILiftFunctionFactory that has been created