Skip to content

Commit

Permalink
Add unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-rapp committed Oct 12, 2023
1 parent bd6e435 commit 5104e06
Show file tree
Hide file tree
Showing 3 changed files with 424 additions and 2 deletions.
1 change: 1 addition & 0 deletions cpp/subprojects/common/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ source_files = [
test_files = [
'test/mlrl/common/input/feature_type_nominal.cpp',
'test/mlrl/common/input/feature_type_numerical.cpp',
'test/mlrl/common/input/feature_type_ordinal.cpp',
'test/mlrl/common/info.cpp'
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ static inline std::unique_ptr<IFeatureVector> createFeatureVectorInternally(
IndexIterator indexIterator, ValueIterator valueIterator, uint32 numElements,
std::unordered_map<int32, Tuple<uint32>>& mapping, uint32 numValues, uint32 numExamples, bool sparse) {
if (numValues > 2) {
// TODO
return nullptr;
return createOrdinalFeatureVector(indexIterator, valueIterator, numElements, mapping, numValues, numExamples,
sparse);
} else if (numValues > 1) {
return createBinaryFeatureVector(indexIterator, valueIterator, numElements, mapping, sparse);
} else {
Expand Down
Loading

0 comments on commit 5104e06

Please sign in to comment.