File lift_function_kln.hpp

namespace seco
class IKlnLiftFunctionConfig
#include <lift_function_kln.hpp>

Defines an interface for all classes that allow to configure a lift function that monotonously increases according to the natural logarithm of the number of labels for which a rule predicts.

Subclassed by seco::KlnLiftFunctionConfig

Public Functions

inline virtual ~IKlnLiftFunctionConfig()
virtual float64 getK() const = 0

Returns the value of the parameter “k”, which affects the steepness of the lift function.

Returns:

The value of the parameter “k”

virtual IKlnLiftFunctionConfig &setK(float64 k) = 0

Sets the value of the parameter “k”, which affects the steepness of the lift function.

Parameters:

k – The value of the parameter “k”. The steepness of the lift function increases with larger values for “k”. Must be greater than 0

Returns:

A reference to an object of type IKlnLiftFunctionConfig that allows further configuration of the lift function

class KlnLiftFunctionConfig : public seco::ILiftFunctionConfig, public seco::IKlnLiftFunctionConfig
#include <lift_function_kln.hpp>

Allows to configure a lift function that monotonously increases according to the natural logarithm of the number of labels for which a rule predicts.

Public Functions

KlnLiftFunctionConfig()
virtual float64 getK() const override

Returns the value of the parameter “k”, which affects the steepness of the lift function.

Returns:

The value of the parameter “k”

virtual IKlnLiftFunctionConfig &setK(float64 k) override

Sets the value of the parameter “k”, which affects the steepness of the lift function.

Parameters:

k – The value of the parameter “k”. The steepness of the lift function increases with larger values for “k”. Must be greater than 0

Returns:

A reference to an object of type IKlnLiftFunctionConfig that allows further configuration of the lift function

virtual std::unique_ptr<ILiftFunctionFactory> createLiftFunctionFactory(const IRowWiseLabelMatrix &labelMatrix) const override

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

Private Members

float64 k_