File feature_based_search.hpp

class FeatureBasedSearch
#include <feature_based_search.hpp>

Allows to conduct a search for finding the best refinement of an existing rule that can be created from a given feature vector.

Public Functions

void searchForNumericalRefinement(const NumericalFeatureVector &featureVector, const MissingFeatureVector &missingFeatureVector, IWeightedStatisticsSubset &statisticsSubset, SingleRefinementComparator &comparator, uint32 numExamplesWithNonZeroWeights, uint32 minCoverage, Refinement &refinement) const

Conducts a search for the best refinement of an existing rule that can be created from a NumericalFeatureVector.

Parameters:
  • featureVector – A reference to an object of type NumericalFeatureVector, the refinements should be created from

  • missingFeatureVector – A reference to an object of type MissingFeatureVector that provides access to the indices of training examples with missing feature values

  • statisticsSubset – A reference to an object of type IWeightedStatisticsSubset that provides access to weighted statistics about the labels of the training examples, which should serve as the basis for evaluating the quality of potential refinements

  • comparator – A reference to an object of type SingleRefinementComparator that should be used for comparing potential refinements

  • numExamplesWithNonZeroWeights – The total number of examples with non-zero weights that may be covered by a refinement

  • minCoverage – The minimum number of examples that must be covered by the refinement

  • refinement – A reference to an object of type Refinement that should be used for storing the properties of the best refinement that is found

void searchForNumericalRefinement(const NumericalFeatureVector &featureVector, const MissingFeatureVector &missingFeatureVector, IWeightedStatisticsSubset &statisticsSubset, FixedRefinementComparator &comparator, uint32 numExamplesWithNonZeroWeights, uint32 minCoverage, Refinement &refinement) const

Conducts a search for the best refinement of an existing rule that can be created from a NumericalFeatureVector.

Parameters:
  • featureVector – A reference to an object of type NumericalFeatureVector, the refinements should be created from

  • missingFeatureVector – A reference to an object of type MissingFeatureVector that provides access to the indices of training examples with missing feature values

  • statisticsSubset – A reference to an object of type IWeightedStatisticsSubset that provides access to weighted statistics about the labels of the training examples, which should serve as the basis for evaluating the quality of potential refinements

  • comparator – A reference to an object of type MultiRefinementComparator that should be used for comparing potential refinements

  • numExamplesWithNonZeroWeights – The total number of examples with non-zero weights that may be covered by a refinement

  • minCoverage – The minimum number of examples that must be covered by the refinements

  • refinement – A reference to an object of type Refinement that should be used for storing the properties of the best refinement that is found

void searchForNominalRefinement(const NominalFeatureVector &featureVector, const MissingFeatureVector &missingFeatureVector, IWeightedStatisticsSubset &statisticsSubset, SingleRefinementComparator &comparator, uint32 numExamplesWithNonZeroWeights, uint32 minCoverage, Refinement &refinement) const

Conducts a search for the best refinement of an existing rule that can be created from a NominalFeatureVector.

Parameters:
  • featureVector – A reference to an object of type NominalFeatureVector, the refinements should be created from

  • missingFeatureVector – A reference to an object of type MissingFeatureVector that provides access to the indices of training examples with missing feature values

  • statisticsSubset – A reference to an object of type IWeightedStatisticsSubset that provides access to weighted statistics about the labels of the training examples, which should serve as the basis for evaluating the quality of potential refinements

  • comparator – A reference to an object of type SingleRefinementComparator that should be used for comparing potential refinements

  • numExamplesWithNonZeroWeights – The total number of examples with non-zero weights that may be covered by a refinement

  • minCoverage – The minimum number of examples that must be covered by the refinement

  • refinement – A reference to an object of type Refinement that should be used for storing the properties of the best refinement that is found

void searchForNominalRefinement(const NominalFeatureVector &featureVector, const MissingFeatureVector &missingFeatureVector, IWeightedStatisticsSubset &statisticsSubset, FixedRefinementComparator &comparator, uint32 numExamplesWithNonZeroWeights, uint32 minCoverage, Refinement &refinement) const

Conducts a search for the best refinement of an existing rule that can be created from a NominalFeatureVector.

Parameters:
  • featureVector – A reference to an object of type NominalFeatureVector, the refinements should be created from

  • missingFeatureVector – A reference to an object of type MissingFeatureVector that provides access to the indices of training examples with missing feature values

  • statisticsSubset – A reference to an object of type IWeightedStatisticsSubset that provides access to weighted statistics about the labels of the training examples, which should serve as the basis for evaluating the quality of potential refinements

  • comparator – A reference to an object of type MultiRefinementComparator that should be used for comparing potential refinements

  • numExamplesWithNonZeroWeights – The total number of examples with non-zero weights that may be covered by a refinement

  • minCoverage – The minimum number of examples that must be covered by the refinements

  • refinement – A reference to an object of type Refinement that should be used for storing the properties of the best refinement that is found

void searchForBinaryRefinement(const BinaryFeatureVector &featureVector, const MissingFeatureVector &missingFeatureVector, IWeightedStatisticsSubset &statisticsSubset, SingleRefinementComparator &comparator, uint32 numExamplesWithNonZeroWeights, uint32 minCoverage, Refinement &refinement) const

Conducts a search for the best refinement of an existing rule that can be created from a BinaryFeatureVector.

Parameters:
  • featureVector – A reference to an object of type BinaryFeatureVector, the refinements should be created from

  • missingFeatureVector – A reference to an object of type MissingFeatureVector that provides access to the indices of training examples with missing feature values

  • statisticsSubset – A reference to an object of type IWeightedStatisticsSubset that provides access to weighted statistics about the labels of the training examples, which should serve as the basis for evaluating the quality of potential refinements

  • comparator – A reference to an object of type SingleRefinementComparator that should be used for comparing potential refinements

  • numExamplesWithNonZeroWeights – The total number of examples with non-zero weights that may be covered by a refinement

  • minCoverage – The minimum number of examples that must be covered by the refinement

  • refinement – A reference to an object of type Refinement that should be used for storing the properties of the best refinement that is found

void searchForBinaryRefinement(const BinaryFeatureVector &featureVector, const MissingFeatureVector &missingFeatureVector, IWeightedStatisticsSubset &statisticsSubset, FixedRefinementComparator &comparator, uint32 numExamplesWithNonZeroWeights, uint32 minCoverage, Refinement &refinement) const

Conducts a search for the best refinement of an existing rule that can be created from a BinaryFeatureVector.

Parameters:
  • featureVector – A reference to an object of type BinaryFeatureVector, the refinements should be created from

  • missingFeatureVector – A reference to an object of type MissingFeatureVector that provides access to the indices of training examples with missing feature values

  • statisticsSubset – A reference to an object of type IWeightedStatisticsSubset that provides access to weighted statistics about the labels of the training examples, which should serve as the basis for evaluating the quality of potential refinements

  • comparator – A reference to an object of type MultiRefinementComparator that should be used for comparing potential refinements

  • numExamplesWithNonZeroWeights – The total number of examples with non-zero weights that may be covered by a refinement

  • minCoverage – The minimum number of examples that must be covered by the refinements

  • refinement – A reference to an object of type Refinement that should be used for storing the properties of the best refinement that is found

void searchForOrdinalRefinement(const OrdinalFeatureVector &featureVector, const MissingFeatureVector &missingFeatureVector, IWeightedStatisticsSubset &statisticsSubset, SingleRefinementComparator &comparator, uint32 numExamplesWithNonZeroWeights, uint32 minCoverage, Refinement &refinement) const

Conducts a search for the best refinement of an existing rule that can be created from an OrdinalFeatureVector.

Parameters:
  • featureVector – A reference to an object of type OrdinalFeatureVector, the refinements should be created from

  • missingFeatureVector – A reference to an object of type MissingFeatureVector that provides access to the indices of training examples with missing feature values

  • statisticsSubset – A reference to an object of type IWeightedStatisticsSubset that provides access to weighted statistics about the labels of the training examples, which should serve as the basis for evaluating the quality of potential refinements

  • comparator – A reference to an object of type SingleRefinementComparator that should be used for comparing potential refinements

  • numExamplesWithNonZeroWeights – The total number of examples with non-zero weights that may be covered by a refinement

  • minCoverage – The minimum number of examples that must be covered by the refinement

  • refinement – A reference to an object of type Refinement that should be used for storing the properties of the best refinement that is found

void searchForOrdinalRefinement(const OrdinalFeatureVector &featureVector, const MissingFeatureVector &missingFeatureVector, IWeightedStatisticsSubset &statisticsSubset, FixedRefinementComparator &comparator, uint32 numExamplesWithNonZeroWeights, uint32 minCoverage, Refinement &refinement) const

Conducts a search for the best refinement of an existing rule that can be created from an OrdinalFeatureVector.

Parameters:
  • featureVector – A reference to an object of type OrdinalFeatureVector, the refinements should be created from

  • missingFeatureVector – A reference to an object of type MissingFeatureVector that provides access to the indices of training examples with missing feature values

  • statisticsSubset – A reference to an object of type IWeightedStatisticsSubset that provides access to weighted statistics about the labels of the training examples, which should serve as the basis for evaluating the quality of potential refinements

  • comparator – A reference to an object of type MultiRefinementComparator that should be used for comparing potential refinements

  • numExamplesWithNonZeroWeights – The total number of examples with non-zero weights that may be covered by a refinement

  • minCoverage – The minimum number of examples that must be covered by the refinements

  • refinement – A reference to an object of type Refinement that should be used for storing the properties of the best refinement that is found

void searchForBinnedRefinement(const BinnedFeatureVector &featureVector, const MissingFeatureVector &missingFeatureVector, IWeightedStatisticsSubset &statisticsSubset, SingleRefinementComparator &comparator, uint32 numExamplesWithNonZeroWeights, uint32 minCoverage, Refinement &refinement) const

Conducts a search for the best refinement of an existing rule that can be created from a BinnedFeatureVector.

Parameters:
  • featureVector – A reference to an object of type BinnedFeatureVector, the refinements should be created from

  • missingFeatureVector – A reference to an object of type MissingFeatureVector that provides access to the indices of training examples with missing feature values

  • statisticsSubset – A reference to an object of type IWeightedStatisticsSubset that provides access to weighted statistics about the labels of the training examples, which should serve as the basis for evaluating the quality of potential refinements

  • comparator – A reference to an object of type SingleRefinementComparator that should be used for comparing potential refinements

  • numExamplesWithNonZeroWeights – The total number of examples with non-zero weights that may be covered by a refinement

  • minCoverage – The minimum number of examples that must be covered by the refinement

  • refinement – A reference to an object of type Refinement that should be used for storing the properties of the best refinement that is found

void searchForBinnedRefinement(const BinnedFeatureVector &featureVector, const MissingFeatureVector &missingFeatureVector, IWeightedStatisticsSubset &statisticsSubset, FixedRefinementComparator &comparator, uint32 numExamplesWithNonZeroWeights, uint32 minCoverage, Refinement &refinement) const

Conducts a search for the best refinement of an existing rule that can be created from a BinnedFeatureVector.

Parameters:
  • featureVector – A reference to an object of type BinnedFeatureVector, the refinements should be created from

  • missingFeatureVector – A reference to an object of type MissingFeatureVector that provides access to the indices of training examples with missing feature values

  • statisticsSubset – A reference to an object of type IWeightedStatisticsSubset that provides access to weighted statistics about the labels of the training examples, which should serve as the basis for evaluating the quality of potential refinements

  • comparator – A reference to an object of type MultiRefinementComparator that should be used for comparing potential refinements

  • numExamplesWithNonZeroWeights – The total number of examples with non-zero weights that may be covered by a refinement

  • minCoverage – The minimum number of examples that must be covered by the refinements

  • refinement – A reference to an object of type Refinement that should be used for storing the properties of the best refinement that is found