File post_optimization_sequential.hpp

class ISequentialPostOptimizationConfig
#include <post_optimization_sequential.hpp>

Defines an interface for all classes that allow to configure a method that optimizes each rule in a model by relearning it in the context of the other rules. Multiple iterations, where the rules in a model are relearned in the order of their induction, may be carried out.

Subclassed by SequentialPostOptimizationConfig

Public Functions

inline virtual ~ISequentialPostOptimizationConfig()
virtual uint32 getNumIterations() const = 0

Returns the number of iterations that are performed for optimizing a model.

Returns:

The number of iterations that are performed for optimizing a model

virtual ISequentialPostOptimizationConfig &setNumIterations(uint32 numIterations) = 0

Sets the number of iterations that should be performed for optimizing a model.

Parameters:

numIterations – The number of iterations to be performed. Must be at least 1

Returns:

A reference to an object of type ISequentialPostOptimizationConfig that allows further configuration of the optimization method

virtual bool areHeadsRefined() const = 0

Returns whether the heads of rules are refined when being relearned or not.

Returns:

True, if the heads of rules are refined when being relearned, false otherwise

virtual ISequentialPostOptimizationConfig &setRefineHeads(bool refineHeads) = 0

Sets whether the heads of rules should be refined when being relearned or not.

Parameters:

refineHeads – True, if the heads of rules should be refined when being relearned, false otherwise

Returns:

A reference to an object of type ISequentialPostOptimizationConfig that allows further configuration of the optimization method

virtual bool areFeaturesResampled() const = 0

Returns whether a new sample of the available features is created whenever a new rule is refined or not.

Returns:

True, if a new sample of the available features is created whenever a new rule is refined, false, if the conditions of the new rule use the same features as the original rule

virtual ISequentialPostOptimizationConfig &setResampleFeatures(bool resampleFeatures) = 0

Sets whether a new sample of the available features should be created whenever a new rule is refined or not.

Parameters:

resampleFeatures – True, if a new sample of the available features should be created whenever a new rule is refined, false, if the conditions of the new rule should use the same features as the original rule

Returns:

A reference to an object of type ISequentialPostOptimizationConfig that allows further configuration of the optimization method

class SequentialPostOptimizationConfig : public ISequentialPostOptimizationConfig, public IPostOptimizationPhaseConfig
#include <post_optimization_sequential.hpp>

Allows to configure a method that optimizes each rule in a model by relearning it in the context of the other rules.

Public Functions

SequentialPostOptimizationConfig()
virtual uint32 getNumIterations() const override

Returns the number of iterations that are performed for optimizing a model.

Returns:

The number of iterations that are performed for optimizing a model

virtual ISequentialPostOptimizationConfig &setNumIterations(uint32 numIterations) override

Sets the number of iterations that should be performed for optimizing a model.

Parameters:

numIterations – The number of iterations to be performed. Must be at least 1

Returns:

A reference to an object of type ISequentialPostOptimizationConfig that allows further configuration of the optimization method

virtual bool areHeadsRefined() const override

Returns whether the heads of rules are refined when being relearned or not.

Returns:

True, if the heads of rules are refined when being relearned, false otherwise

virtual ISequentialPostOptimizationConfig &setRefineHeads(bool refineHeads) override

Sets whether the heads of rules should be refined when being relearned or not.

Parameters:

refineHeads – True, if the heads of rules should be refined when being relearned, false otherwise

Returns:

A reference to an object of type ISequentialPostOptimizationConfig that allows further configuration of the optimization method

virtual bool areFeaturesResampled() const override

Returns whether a new sample of the available features is created whenever a new rule is refined or not.

Returns:

True, if a new sample of the available features is created whenever a new rule is refined, false, if the conditions of the new rule use the same features as the original rule

virtual ISequentialPostOptimizationConfig &setResampleFeatures(bool resampleFeatures) override

Sets whether a new sample of the available features should be created whenever a new rule is refined or not.

Parameters:

resampleFeatures – True, if a new sample of the available features should be created whenever a new rule is refined, false, if the conditions of the new rule should use the same features as the original rule

Returns:

A reference to an object of type ISequentialPostOptimizationConfig that allows further configuration of the optimization method

virtual std::unique_ptr<IPostOptimizationPhaseFactory> createPostOptimizationPhaseFactory() const override

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

Returns:

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

Private Members

uint32 numIterations_
bool refineHeads_
bool resampleFeatures_