File lift_function_peak.hpp¶
-
namespace seco
-
class IPeakLiftFunctionConfig¶
- #include <lift_function_peak.hpp>
Defines an interface for all classes that allow to configure a lift function that monotonously increases until a certain number of labels, where the maximum lift is reached, and monotonously decreases afterwards.
Subclassed by seco::PeakLiftFunctionConfig
Public Functions
-
inline virtual ~IPeakLiftFunctionConfig()¶
-
virtual uint32 getPeakLabel() const = 0¶
Returns the number of labels for which the lift is maximal.
- Returns:
The number of labels for which the lift is maximal or 0, if the average label cardinality is used
-
virtual IPeakLiftFunctionConfig &setPeakLabel(uint32 peakLabel) = 0¶
Sets the number of labels for which the lift should be maximal.
- Parameters:
peakLabel – The number of labels for which the lift should be maximal. Must be at least 1 or 0, if the average label cardinality should be used
- Returns:
A reference to an object of type
IPeakLiftFunctionConfig
that allows further configuration of the lift function
-
virtual float64 getMaxLift() const = 0¶
Returns the lift at the peak label.
- Returns:
The lift at the peak label
-
virtual IPeakLiftFunctionConfig &setMaxLift(float64 maxLift) = 0¶
Sets the lift at the peak label.
- Parameters:
maxLift – The lift at the peak label. Must be at least 1
- Returns:
A reference to an object of type
IPeakLiftFunctionConfig
that allows further configuration of the lift function
-
virtual float64 getCurvature() const = 0¶
Returns the curvature of the lift function.
- Returns:
The curvature of the lift function
-
virtual IPeakLiftFunctionConfig &setCurvature(float64 curvature) = 0¶
Sets the curvature of the lift function.
- Parameters:
curvature – The curvature of the lift function. A greater value results in a steeper curvature, a smaller value results in a flatter curvature. Must be greater than 0
- Returns:
A reference to an object of type
IPeakLiftFunctionConfig
that allows further configuration of the lift function
-
inline virtual ~IPeakLiftFunctionConfig()¶
-
class PeakLiftFunctionConfig : public seco::ILiftFunctionConfig, public seco::IPeakLiftFunctionConfig¶
- #include <lift_function_peak.hpp>
Allows to configure a lift function that monotonously increases until a certain number of labels, where the maximum lift is reached, and monotonously decreases afterwards.
Public Functions
-
PeakLiftFunctionConfig()¶
-
virtual uint32 getPeakLabel() const override¶
Returns the number of labels for which the lift is maximal.
- Returns:
The number of labels for which the lift is maximal or 0, if the average label cardinality is used
-
virtual IPeakLiftFunctionConfig &setPeakLabel(uint32 peakLabel) override¶
Sets the number of labels for which the lift should be maximal.
- Parameters:
peakLabel – The number of labels for which the lift should be maximal. Must be at least 1 or 0, if the average label cardinality should be used
- Returns:
A reference to an object of type
IPeakLiftFunctionConfig
that allows further configuration of the lift function
-
virtual float64 getMaxLift() const override¶
Returns the lift at the peak label.
- Returns:
The lift at the peak label
-
virtual IPeakLiftFunctionConfig &setMaxLift(float64 maxLift) override¶
Sets the lift at the peak label.
- Parameters:
maxLift – The lift at the peak label. Must be at least 1
- Returns:
A reference to an object of type
IPeakLiftFunctionConfig
that allows further configuration of the lift function
-
virtual float64 getCurvature() const override¶
Returns the curvature of the lift function.
- Returns:
The curvature of the lift function
-
virtual IPeakLiftFunctionConfig &setCurvature(float64 curvature) override¶
Sets the curvature of the lift function.
- Parameters:
curvature – The curvature of the lift function. A greater value results in a steeper curvature, a smaller value results in a flatter curvature. Must be greater than 0
- Returns:
A reference to an object of type
IPeakLiftFunctionConfig
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
-
PeakLiftFunctionConfig()¶
-
class IPeakLiftFunctionConfig¶