File feature_space.hpp

class IFeatureSpace
#include <feature_space.hpp>

Defines an interface for all classes that provide access to the feature space.

Public Functions

inline virtual ~IFeatureSpace()
virtual std::unique_ptr<IFeatureSubspace> createSubspace(const EqualWeightVector &weights) = 0

Creates and returns a new subspace of this feature space.

Parameters:

weights – A reference to an object of type EqualWeightVector that provides access to the weights of individual training examples

Returns:

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

virtual std::unique_ptr<IFeatureSubspace> createSubspace(const BitWeightVector &weights) = 0

Creates and returns a new subspace of this feature space.

Parameters:

weights – A reference to an object of type BitWeightVector that provides access to the weights of individual training examples

Returns:

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

virtual std::unique_ptr<IFeatureSubspace> createSubspace(const DenseWeightVector<uint32> &weights) = 0

Creates and returns a new subspace of this feature space.

Parameters:

weights – A reference to an object of type DenseWeightVector that provides access to the weights of individual training examples

Returns:

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

virtual IStatisticsProvider &getStatisticsProvider() const = 0

Returns a reference to an object of type IStatisticsProvider that provides access to the statistics that correspond to individual training examples in the feature space.

Returns:

A reference to an object of type IStatisticsProvider

class IFeatureSpaceFactory
#include <feature_space.hpp>

Defines an interface for all classes that allow to create instances of the type IFeatureSpace.

Subclassed by TabularFeatureSpaceFactory

Public Functions

inline virtual ~IFeatureSpaceFactory()
virtual std::unique_ptr<IFeatureSpace> create(const IColumnWiseFeatureMatrix &featureMatrix, const IFeatureInfo &featureInfo, IStatisticsProvider &statisticsProvider) const = 0

Creates and returns a new object of type IFeatureSpace.

Parameters:
  • featureMatrix – A reference to an object of type IColumnWiseFeatureMatrix that provides column-wise access to the feature values of individual training examples

  • featureInfo – A reference to an object of type IFeatureInfo that provides information about the types of individual features

  • statisticsProvider – A reference to an object of type IStatisticsProvider that provides access to statistics about the labels of the training examples

Returns:

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