Skip to content

Commit d2a8ad5

Browse files
committed
WIF - Classifiers - Introduce getter for model path for ScikitMlClassifier
TG-45
1 parent 375ee7b commit d2a8ad5

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

include/wif/classifiers/scikitMlClassifier.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ class ScikitMlClassifier : public Classifier {
2929
*/
3030
ScikitMlClassifier(const std::string& bridgePath, const std::string& mlModelPath);
3131

32+
/**
33+
* @brief Get the path to the used ML model
34+
*
35+
* @return const std::string& the path to the used ML model
36+
*/
37+
const std::string& getMlModelPath() const noexcept;
38+
3239
/**
3340
* @brief Set feature IDs which will be used for classification
3441
*

include/wif/ml/scikitMlWrapper.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ class ScikitMlWrapper {
5757
void setFeatureSourceIDs(const std::vector<FeatureID>& sourceFeatureIDs);
5858

5959
/**
60-
* @brief Getter for used ML model path
60+
* @brief Getter for path of the used ML model
6161
* @return const std::string&
6262
*/
63-
const std::string& mlModelPath() const noexcept { return m_mlModelPath; }
63+
const std::string& getMlModelPath() const noexcept { return m_mlModelPath; }
6464

6565
/**
6666
* @brief Reload model from disk

src/wif/classifiers/scikitMlClassifier.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ ScikitMlClassifier::ScikitMlClassifier(
1717
m_scikitMlWrapper = std::make_unique<ScikitMlWrapper>(bridgePath, mlModelPath);
1818
}
1919

20+
const std::string& ScikitMlClassifier::getMlModelPath() const noexcept
21+
{
22+
return m_scikitMlWrapper->getMlModelPath();
23+
}
24+
2025
void ScikitMlClassifier::setFeatureSourceIDs(const std::vector<FeatureID>& sourceFeatureIDs)
2126
{
2227
Classifier::setFeatureSourceIDs(sourceFeatureIDs);

0 commit comments

Comments
 (0)