Skip to content

Commit 96f7544

Browse files
fix default_features
fix default_features and add a test
2 parents acdb2ec + bf92582 commit 96f7544

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/feature_classes.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,5 @@ function default_features(np)
4848
if np >= 80
4949
append!(features, [ProductFeature()])
5050
end
51+
return features
5152
end

test/runtests.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ env1 = map(e -> [e[1]], env) # just the first row
1414
@test Maxnet.features_from_string("lqpt") == [LinearFeature(), CategoricalFeature(), QuadraticFeature(), ProductFeature(), ThresholdFeature()]
1515

1616
@test Maxnet.default_features(100) == [LinearFeature(), CategoricalFeature(), QuadraticFeature(), HingeFeature(), ProductFeature()]
17+
@test Maxnet.default_features(1) == [LinearFeature(), CategoricalFeature()]
1718

1819
@test Maxnet.hinge(1:5, 3) == [
1920
# 1:5 3:5 1:3 1:5

0 commit comments

Comments
 (0)