Skip to content

Commit

Permalink
Rename class ExactThresholds to TabularFeatureSpace.
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-rapp committed Feb 21, 2024
1 parent a6e1788 commit a69d30d
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
#include "mlrl/common/thresholds/feature_space.hpp"

/**
* A factory that allows to create instances of the type `ExactThresholds`.
* Allows to create objects of type `IFeatureSpace` that provide access to a tabular feature space.
*/
class ExactThresholdsFactory final : public IFeatureSpaceFactory {
class TabularFeatureSpaceFactory final : public IFeatureSpaceFactory {
private:

const std::unique_ptr<IFeatureBinningFactory> featureBinningFactoryPtr_;
Expand All @@ -25,7 +25,7 @@ class ExactThresholdsFactory final : public IFeatureSpaceFactory {
* @param numThreads The number of CPU threads to be used to update statistics in parallel. Must
* be at least 1
*/
ExactThresholdsFactory(std::unique_ptr<IFeatureBinningFactory> featureBinningFactoryPtr, uint32 numThreads);
TabularFeatureSpaceFactory(std::unique_ptr<IFeatureBinningFactory> featureBinningFactoryPtr, uint32 numThreads);

std::unique_ptr<IFeatureSpace> create(const IColumnWiseFeatureMatrix& featureMatrix,
const IFeatureInfo& featureInfo,
Expand Down
2 changes: 1 addition & 1 deletion cpp/subprojects/common/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ source_files = [
'src/mlrl/common/stopping/stopping_criterion_size.cpp',
'src/mlrl/common/stopping/stopping_criterion_time.cpp',
'src/mlrl/common/thresholds/coverage_mask.cpp',
'src/mlrl/common/thresholds/thresholds_exact.cpp',
'src/mlrl/common/thresholds/feature_space_tabular.cpp',
'src/mlrl/common/info.cpp',
'src/mlrl/common/learner.cpp'
]
Expand Down
4 changes: 2 additions & 2 deletions cpp/subprojects/common/src/mlrl/common/learner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "mlrl/common/prediction/label_space_info_no.hpp"
#include "mlrl/common/stopping/stopping_criterion_size.hpp"
#include "mlrl/common/thresholds/thresholds_exact.hpp"
#include "mlrl/common/thresholds/feature_space_tabular.hpp"
#include "mlrl/common/util/validation.hpp"

/**
Expand Down Expand Up @@ -215,7 +215,7 @@ std::unique_ptr<IFeatureSpaceFactory> AbstractRuleLearner::createFeatureSpaceFac
config_.getFeatureBinningConfigPtr()->createFeatureBinningFactory(featureMatrix, labelMatrix);
uint32 numThreads =
config_.getParallelStatisticUpdateConfigPtr()->getNumThreads(featureMatrix, labelMatrix.getNumLabels());
return std::make_unique<ExactThresholdsFactory>(std::move(featureBinningFactoryPtr), numThreads);
return std::make_unique<TabularFeatureSpaceFactory>(std::move(featureBinningFactoryPtr), numThreads);
}

std::unique_ptr<IRuleInductionFactory> AbstractRuleLearner::createRuleInductionFactory(
Expand Down
Loading

0 comments on commit a69d30d

Please sign in to comment.